Created
September 1, 2014 06:09
-
-
Save drd/b8429e849b5a2d7dda84 to your computer and use it in GitHub Desktop.
where is the bug?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testOMGWTF() { | |
var err: NSError? | |
let plist = [ | |
"a": "c", | |
// note that 1 is a String | |
"b": "1" | |
] | |
let data = NSPropertyListSerialization.dataWithPropertyList( | |
plist, | |
format: NSPropertyListFormat.BinaryFormat_v1_0, | |
options: 0, | |
error: nil) | |
if let properties = NSPropertyListSerialization.propertyListWithData( | |
data, | |
options: 0, | |
format: nil, | |
error: &err) as? NSDictionary { | |
println("heyo") | |
} else { | |
XCTFail(err!.description) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testOMGWTF() { | |
var err: NSError? | |
let plist = [ | |
"a": "c", | |
// making this an Int is the difference | |
"b": 1 | |
] | |
let data = NSPropertyListSerialization.dataWithPropertyList( | |
plist, | |
format: NSPropertyListFormat.BinaryFormat_v1_0, | |
options: 0, | |
error: nil) | |
if let properties = NSPropertyListSerialization.propertyListWithData( | |
data, | |
options: 0, | |
format: nil, | |
error: &err) as? NSDictionary { | |
println("heyo") | |
} else { | |
XCTFail(err!.description) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment