Skip to content

Commit 13529d0

Browse files
committed
Comment out Bridged tests that cannot run on Linux
1 parent 5d3e17a commit 13529d0

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

test/stdlib/ParseFloat64.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// REQUIRES: swift_feature_Extern
1010

1111
import StdlibUnittest
12-
import Foundation
1312

1413
let tests = TestSuite("FloatingPointParsing")
1514

@@ -326,14 +325,24 @@ tests.test("Decimal Floats") {
326325
expectParse("999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.999999999999999999999999999", Float64.infinity)
327326
}
328327

329-
tests.test("Substring") {
328+
tests.test("Substring - short") {
330329
let s1 = "1.02.03.0"
331330
let s1sub = s1[s1.firstIndex(of: "2")!..<s1.firstIndex(of: "3")!]
332331
let parsed = Float64(s1sub)
333332
expectNotNil(parsed)
334333
expectEqual(parsed!.bitPattern, (2.0).bitPattern)
335334
}
336335

336+
tests.test("Substring - long") {
337+
let s1 = "1.00000000000000000000000000000000002.0000000000000000000000000000000000000000000000000000000003.00000000000000004.0000000000000000"
338+
let s1sub = s1[s1.firstIndex(of: "2")!..<s1.firstIndex(of: "3")!]
339+
let parsed = Float64(s1sub)
340+
expectNotNil(parsed)
341+
expectEqual(parsed!.bitPattern, (2.0).bitPattern)
342+
}
343+
344+
/*
345+
// These need Foundation to run, so can't run on Linux?
337346
tests.test("Bridged - short") {
338347
let s1 = "1.02.03.0"
339348
let nss1 = NSString(utf8String: s1)!
@@ -355,6 +364,7 @@ tests.test("Bridged - long") {
355364
expectNotNil(parsed)
356365
expectEqual(parsed!.bitPattern, (2.0).bitPattern)
357366
}
367+
*/
358368

359369
@_extern(c, "_swift_stdlib_strtod_clocale")
360370
func _swift_stdlib_strtod_clocale(

0 commit comments

Comments
 (0)