-
Notifications
You must be signed in to change notification settings - Fork 10.5k
/
Copy pathStdlibUnittestFilter.swift
45 lines (35 loc) · 1.19 KB
/
StdlibUnittestFilter.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// RUN: %target-build-swift %s -o %t.out
// RUN: %target-run %t.out --stdlib-unittest-filter abc | FileCheck --check-prefix=CHECK-ABC %s
// RUN: %target-run %t.out --stdlib-unittest-filter xyz | FileCheck --check-prefix=CHECK-XYZ %s
// CHECK-ABC: StdlibUnittest: using filter: abc{{$}}
// CHECK-ABC: [ RUN ] Filter.abc{{$}}
// CHECK-ABC: [ OK ] Filter.abc{{$}}
// CHECK-ABC: [ RUN ] Filter.abcdef{{$}}
// CHECK-ABC: [ OK ] Filter.abcdef{{$}}
// CHECK-ABC-NOT: xyz
// CHECK-XYZ: StdlibUnittest: using filter: xyz{{$}}
// CHECK-XYZ-NOT: abc
// CHECK-XYZ: [ RUN ] Filter.xyz{{$}}
// REQUIRES: executable_test
// CHECK-XYZ: [ OK ] Filter.xyz{{$}}
// CHECK-XYZ-NOT: abc
// CHECK-XYZ-NOT: xyz
import StdlibUnittest
// Also import modules which are used by StdlibUnittest internally. This
// workaround is needed to link all required libraries in case we compile
// StdlibUnittest with -sil-serialize-all.
import SwiftPrivate
#if _runtime(_ObjC)
import ObjectiveC
#endif
var FilterTestSuite = TestSuite("Filter")
FilterTestSuite.test("abc") {
expectEqual(1, 1)
}
FilterTestSuite.test("abcdef") {
expectEqual(1, 1)
}
FilterTestSuite.test("xyz") {
expectEqual(1, 1)
}
runAllTests()