Created
November 16, 2015 17:56
-
-
Save bsneed/944c9f9c460b5550e7cf to your computer and use it in GitHub Desktop.
Some unit test code to compare coconut against Argo and By_Hand decoding.
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 test_measure_coconut() { | |
let json = THGCodable.JSON(bundleClass: TestingStuffTests.self, filename: "test.json") | |
measureBlock { | |
let array = json?.array | |
if let array = array { | |
let _: [Person] = array.map { object in | |
let jsonPerson = object as THGCodable.JSON | |
return try! Person.decode(jsonPerson) | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment