Skip to content

Commit

Permalink
Update error message location (+1)
Browse files Browse the repository at this point in the history
`JSONTokener.back()` call removed from `JSONObject(JSONTokener)` constructor.
  • Loading branch information
migueltt authored Aug 14, 2017
1 parent 68b2629 commit b90bee0
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/test/java/org/json/junit/JSONObjectTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -1988,7 +1988,7 @@ public void jsonObjectParsingErrors() {
fail("Expected an exception");
} catch (JSONException e) {
assertEquals("Expecting an expection message",
"Duplicate key \"attr03\" at 89 [character 12 line 5]",
"Duplicate key \"attr03\" at 90 [character 13 line 5]",
e.getMessage());
}
try {
Expand All @@ -2007,7 +2007,7 @@ public void jsonObjectParsingErrors() {
fail("Expected an exception");
} catch (JSONException e) {
assertEquals("Expecting an expection message",
"Duplicate key \"attr03\" at 89 [character 12 line 5]",
"Duplicate key \"attr03\" at 90 [character 13 line 5]",
e.getMessage());
}
try {
Expand All @@ -2028,7 +2028,7 @@ public void jsonObjectParsingErrors() {
fail("Expected an exception");
} catch (JSONException e) {
assertEquals("Expecting an expection message",
"Duplicate key \"attr03\" at 89 [character 12 line 5]",
"Duplicate key \"attr03\" at 90 [character 13 line 5]",
e.getMessage());
}
try {
Expand All @@ -2048,7 +2048,7 @@ public void jsonObjectParsingErrors() {
fail("Expected an exception");
} catch (JSONException e) {
assertEquals("Expecting an expection message",
"Duplicate key \"attr04-03\" at 214 [character 19 line 9]",
"Duplicate key \"attr04-03\" at 215 [character 20 line 9]",
e.getMessage());
}
try {
Expand All @@ -2072,7 +2072,7 @@ public void jsonObjectParsingErrors() {
fail("Expected an exception");
} catch (JSONException e) {
assertEquals("Expecting an expection message",
"Duplicate key \"attr04-03\" at 214 [character 19 line 9]",
"Duplicate key \"attr04-03\" at 215 [character 20 line 9]",
e.getMessage());
}
try {
Expand All @@ -2098,7 +2098,7 @@ public void jsonObjectParsingErrors() {
fail("Expected an exception");
} catch (JSONException e) {
assertEquals("Expecting an expection message",
"Duplicate key \"attr04-03\" at 214 [character 19 line 9]",
"Duplicate key \"attr04-03\" at 215 [character 20 line 9]",
e.getMessage());
}
try {
Expand All @@ -2117,7 +2117,7 @@ public void jsonObjectParsingErrors() {
fail("Expected an exception");
} catch (JSONException e) {
assertEquals("Expecting an expection message",
"Duplicate key \"attr01\" at 123 [character 16 line 8]",
"Duplicate key \"attr01\" at 124 [character 17 line 8]",
e.getMessage());
}
try {
Expand All @@ -2142,7 +2142,7 @@ public void jsonObjectParsingErrors() {
fail("Expected an exception");
} catch (JSONException e) {
assertEquals("Expecting an expection message",
"Duplicate key \"attr02-01\" at 268 [character 23 line 13]",
"Duplicate key \"attr02-01\" at 269 [character 24 line 13]",
e.getMessage());
}
}
Expand Down

0 comments on commit b90bee0

Please sign in to comment.