File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %target-run-simple-swift
2
+ // REQUIRES: executable_test
3
+
4
+ import StdlibUnittest
5
+
6
+ // Also import modules which are used by StdlibUnittest internally. This
7
+ // workaround is needed to link all required libraries in case we compile
8
+ // StdlibUnittest with -sil-serialize-all.
9
+ import SwiftPrivate
10
+ #if _runtime(_ObjC)
11
+ import ObjectiveC
12
+ #endif
13
+
14
+ var StringOrderRelationTestSuite = TestSuite ( " StringOrderRelation " )
15
+
16
+ StringOrderRelationTestSuite . test ( " StringOrderRelation/ASCII/NullByte " )
17
+ . xfail ( . LinuxAny( reason: " String comparison: ICU vs. Foundation " ) )
18
+ . xfail ( . FreeBSDAny( reason: " String comparison: ICU vs. Foundation " ) )
19
+ . code {
20
+ let baseString = " a "
21
+ let nullbyteString = " a \0 "
22
+ expectTrue ( baseString < nullbyteString)
23
+ expectTrue ( baseString <= nullbyteString)
24
+ expectFalse ( baseString > nullbyteString)
25
+ expectFalse ( baseString >= nullbyteString)
26
+ expectFalse ( baseString == nullbyteString)
27
+ expectTrue ( baseString != nullbyteString)
28
+ }
29
+
30
+ runAllTests ( )
31
+
You can’t perform that action at this time.
0 commit comments