Skip to content

Commit 2da07db

Browse files
committed
Merge pull request #905 from ezephir/linux-test-reflection-hashing
[StdLib] Extend ReflectionHashing test to pass on Linux
2 parents 0c808b0 + def419b commit 2da07db

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

test/1_stdlib/ReflectionHashing.swift

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// RUN: %target-run %t.out
33
// REQUIRES: executable_test
44

5-
// XFAIL: linux
6-
75
//
86
// This file contains reflection tests that depend on hash values.
97
// Don't add other tests here.
@@ -38,7 +36,7 @@ Reflection.test("Dictionary") {
3836
var output = ""
3937
dump(dict, &output)
4038

41-
#if arch(i386) || arch(arm)
39+
#if _runtime(_ObjC) && (arch(i386) || arch(arm))
4240
var expected = ""
4341
expected += "▿ 5 key/value pairs\n"
4442
expected += " ▿ [0]: (2 elements)\n"
@@ -56,7 +54,7 @@ Reflection.test("Dictionary") {
5654
expected += " ▿ [4]: (2 elements)\n"
5755
expected += " - .0: Three\n"
5856
expected += " - .1: 3\n"
59-
#elseif arch(x86_64) || arch(arm64)
57+
#elseif _runtime(_ObjC) && (arch(x86_64) || arch(arm64))
6058
var expected = ""
6159
expected += "▿ 5 key/value pairs\n"
6260
expected += " ▿ [0]: (2 elements)\n"
@@ -74,6 +72,24 @@ Reflection.test("Dictionary") {
7472
expected += " ▿ [4]: (2 elements)\n"
7573
expected += " - .0: Four\n"
7674
expected += " - .1: 4\n"
75+
#elseif !_runtime(_ObjC) && arch(x86_64)
76+
var expected = ""
77+
expected += "▿ 5 key/value pairs\n"
78+
expected += " ▿ [0]: (2 elements)\n"
79+
expected += " - .0: One\n"
80+
expected += " - .1: 1\n"
81+
expected += " ▿ [1]: (2 elements)\n"
82+
expected += " - .0: Five\n"
83+
expected += " - .1: 5\n"
84+
expected += " ▿ [2]: (2 elements)\n"
85+
expected += " - .0: Two\n"
86+
expected += " - .1: 2\n"
87+
expected += " ▿ [3]: (2 elements)\n"
88+
expected += " - .0: Four\n"
89+
expected += " - .1: 4\n"
90+
expected += " ▿ [4]: (2 elements)\n"
91+
expected += " - .0: Three\n"
92+
expected += " - .1: 3\n"
7793
#else
7894
fatalError("unimplemented")
7995
#endif

0 commit comments

Comments
 (0)