Skip to content

Commit c27f3d8

Browse files
committed
Add 64-bit values to test UnsafePointer.<
1 parent 419187c commit c27f3d8

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

test/1_stdlib/UnsafePointer.swift.gyb

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -394,14 +394,23 @@ UnsafeMutablePointerTestSuite.test("customPlaygroundQuickLook") {
394394
% ('UnsafeMutablePointer', 'UnsafeMutablePointer<Int>')]:
395395

396396
${SelfName}TestSuite.test("Comparable") {
397-
let instances = [
397+
var addresses: [UInt] = [
398398
0x00000001,
399399
0xFF00FF00,
400400
0x00001111,
401401
0x00000002,
402402
0xFFFFFFFF,
403403
0x00001111
404-
].map { ($0, ${SelfType}(bitPattern: $0)!) }
404+
]
405+
406+
#if arch(x86_64) || arch(arm64) || arch(powerpc64) || arch(powerpc64le)
407+
addresses += [
408+
0xFFFFFFFF80000000,
409+
0x8000000000000000
410+
]
411+
#endif
412+
413+
let instances = addresses.map { ($0, ${SelfType}(bitPattern: $0)!) }
405414

406415
func comparisonOracle(i: Int, j: Int) -> ExpectedComparisonResult {
407416
return instances[i].0 <=> instances[j].0

0 commit comments

Comments
 (0)