added tests for rdar://problem/18317906

Swift SVN r25206
This commit is contained in:
Maxwell Swadling
2015-02-11 23:26:19 +00:00
parent 135a6dcb74
commit 3e160b0b7a

View File

@@ -772,6 +772,10 @@ NSStringAPIs.test("init(format:_:...)") {
let world: NSString = "world"
expectEqual("Hello, world!%42",
String(format: "Hello, %@!%%%ld", world, 42))
// test for rdar://problem/18317906
expectEqual("3.12", String(format: "%.2f", 3.123456789))
expectEqual("3.12", NSString(format: "%.2f", 3.123456789))
}
NSStringAPIs.test("init(format:arguments:)") {