mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
added tests for rdar://problem/18317906
Swift SVN r25206
This commit is contained in:
@@ -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:)") {
|
||||
|
||||
Reference in New Issue
Block a user