Skip to content

Commit d680396

Browse files
committed
Test comparable conformance
1 parent d5b131a commit d680396

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/stdlib/Synchronization/Atomics/WordPair.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,16 @@ suite.test("basics") {
4545
let value1 = WordPair(first: .max, second: 0)
4646
expectEqual(value1.first, .max)
4747
expectEqual(value1.second, 0)
48+
49+
let c0 = WordPair(first: 0, second: 0)
50+
let c1 = WordPair(first: 1, second: 0)
51+
let c2 = WordPair(first: 2, second: 0)
52+
let c3 = WordPair(first: 0, second: 1)
53+
expectFalse(c0 < c0)
54+
expectTrue(c0 < c1)
55+
expectTrue(c0 < c2)
56+
expectTrue(c0 < c3)
57+
expectFalse(c1 < c0)
4858
}
4959

5060
} // if #available(SwiftStdlib 6.0, *)

0 commit comments

Comments
 (0)