|
2 | 2 | // RUN: mkdir -p %t
|
3 | 3 | //
|
4 | 4 | // RUN: %S/../../utils/gyb %s -o %t/main.swift
|
5 |
| -// RUN: %target-clang -fobjc-arc %S/Inputs/SlurpFastEnumeration/SlurpFastEnumeration.m -c -o %t/SlurpFastEnumeration.o |
6 |
| -// RUN: %S/../../utils/line-directive %t/main.swift -- %target-build-swift %S/Inputs/DictionaryKeyValueTypes.swift %S/Inputs/DictionaryKeyValueTypesObjC.swift %t/main.swift -I %S/Inputs/SlurpFastEnumeration/ -Xlinker %t/SlurpFastEnumeration.o -o %t/Array -Xfrontend -disable-access-control |
| 5 | +// RUN: if [ %target-runtime == "objc" ]; then \ |
| 6 | +// RUN: %target-clang -fobjc-arc %S/Inputs/SlurpFastEnumeration/SlurpFastEnumeration.m -c -o %t/SlurpFastEnumeration.o; \ |
| 7 | +// RUN: %S/../../utils/line-directive %t/main.swift -- %target-build-swift %S/Inputs/DictionaryKeyValueTypes.swift %S/Inputs/DictionaryKeyValueTypesObjC.swift %t/main.swift -I %S/Inputs/SlurpFastEnumeration/ -Xlinker %t/SlurpFastEnumeration.o -o %t/Array -Xfrontend -disable-access-control; \ |
| 8 | +// RUN: else \ |
| 9 | +// RUN: %S/../../utils/line-directive %t/main.swift -- %target-build-swift %S/Inputs/DictionaryKeyValueTypes.swift %t/main.swift -o %t/Array -Xfrontend -disable-objc-attr-requires-foundation-module -Xfrontend -disable-access-control; \ |
| 10 | +// RUN: fi |
7 | 11 | // RUN: %S/../../utils/line-directive %t/main.swift -- %target-run %t/Array
|
8 | 12 | // REQUIRES: executable_test
|
9 | 13 |
|
10 |
| -// XFAIL: linux |
11 |
| - |
12 |
| -import Darwin |
13 | 14 | import StdlibUnittest
|
14 | 15 | import StdlibCollectionUnittest
|
15 | 16 |
|
16 | 17 |
|
17 |
| -import StdlibUnittestFoundationExtras |
18 |
| -import Foundation |
19 |
| - |
20 | 18 | %{
|
21 | 19 | all_array_types = ['ContiguousArray', 'ArraySlice', 'Array']
|
22 | 20 | }%
|
@@ -56,6 +54,9 @@ func withInoutT<T>(_ x: inout T, body: (x: inout T) -> Void) {
|
56 | 54 |
|
57 | 55 | % for element_type in ['TestValueTy', 'TestBridgedValueTy']:
|
58 | 56 | % for array_type in all_array_types:
|
| 57 | +% if element_type == 'TestBridgedValueTy': |
| 58 | +#if _runtime(_ObjC) |
| 59 | +% end |
59 | 60 |
|
60 | 61 | ArrayTestSuite.test("${array_type}<${element_type}>/subscript(_: Int)/COW") {
|
61 | 62 | var a: ${array_type}<${array_type}<${element_type}>> = [[
|
@@ -225,9 +226,17 @@ ArrayTestSuite.test("${array_type}<${element_type}>/subscript(_: Range<Int>)/COW
|
225 | 226 | expectEqual(90, a[0][8].value)
|
226 | 227 | }
|
227 | 228 |
|
| 229 | +% if element_type == 'TestBridgedValueTy': |
| 230 | +#endif // _runtime(_ObjC) |
| 231 | +% end |
228 | 232 | % end
|
229 | 233 | % end
|
230 | 234 |
|
| 235 | +#if _runtime(_ObjC) |
| 236 | +import Darwin |
| 237 | +import StdlibUnittestFoundationExtras |
| 238 | +import Foundation |
| 239 | + |
231 | 240 | // FIXME: all the tests below are applicable to ArraySlice, too.
|
232 | 241 |
|
233 | 242 | //===----------------------------------------------------------------------===//
|
@@ -1140,5 +1149,7 @@ ArrayTestSuite.tearDown {
|
1140 | 1149 | }
|
1141 | 1150 | }
|
1142 | 1151 |
|
| 1152 | +#endif // _runtime(_ObjC) |
| 1153 | + |
1143 | 1154 | runAllTests()
|
1144 | 1155 |
|
0 commit comments