File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -307,10 +307,17 @@ FixedPoint.test("OverflowCheck") {
307
307
308
308
FixedPoint.test("String.init") {
309
309
let x: UInt32 = 0xdeadbeef
310
+ #if _endian(little)
310
311
expectEqual("efbeadde", String(x.bigEndian, radix: 16))
311
312
312
313
let y = UInt32(bigEndian: 0xdeadbeef)
313
314
expectEqual("deadbeef", String(y.bigEndian, radix: 16))
315
+ #else
316
+ expectEqual("efbeadde", String(x.littleEndian, radix: 16))
317
+
318
+ let y = UInt32(littleEndian: 0xdeadbeef)
319
+ expectEqual("deadbeef", String(y.littleEndian, radix: 16))
320
+ #endif
314
321
}
315
322
316
323
FixedPoint.test("byteSwapped") {
@@ -426,5 +433,4 @@ BoolTestSuite.test("||") {
426
433
expectFalse(getBool(false) || getBool(false))
427
434
}
428
435
429
- runAllTests()
430
-
436
+ runAllTests()
You can’t perform that action at this time.
0 commit comments