From e34f3a55ca3263bd549e54bc3fe1feeda5ebfcd3 Mon Sep 17 00:00:00 2001 From: Kenan Date: Wed, 26 Oct 2016 21:26:30 -0400 Subject: [PATCH] Fixing test testThatParserFailsWhenIncompleteDataIsPresent Was previously not iterating over test cases and instead using hard-coded string `" "` to test `JSONParser.parse` --- Tests/JSONParserTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/JSONParserTests.swift b/Tests/JSONParserTests.swift index 9c1c52b1..c459acbe 100644 --- a/Tests/JSONParserTests.swift +++ b/Tests/JSONParserTests.swift @@ -151,7 +151,7 @@ class JSONParserTests: XCTestCase { func testThatParserFailsWhenIncompleteDataIsPresent() { for s in [" ", "[0,", "{\"\":"] { do { - let value = try JSONParser.parse(" ") + let value = try JSONParser.parse(s) XCTFail("Unexpectedly parsed \(s) as \(value)") } catch JSONParser.Error.endOfStreamUnexpected { // expected error - do nothing