Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ public void compareValues(String prefix, Object expectedValue, Object actualValu
public void compareJSONArray(String prefix, JSONArray expected, JSONArray actual, JSONCompareResult result)
throws JSONException {
if (expected.length() != actual.length()) {
result.fail(prefix + "[]: Expected " + expected.length() + " values but got " + actual.length());
result.fail(prefix + "[]: Expected " + expected.length() + " values but got " + actual.length() + ", "
+ "Expected: " + expected + ", " + "Actual: " + actual);
return;
} else if (expected.length() == 0) {
return; // Nothing to compare
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public void succeedsWithEmptyArrays() throws JSONException {
@Test
public void reportsArraysOfUnequalLength() throws JSONException {
JSONCompareResult result = compareJSON("[4]", "[]", LENIENT);
assertThat(result, failsWithMessage(equalTo("[]: Expected 1 values but got 0")));
assertThat(result, failsWithMessage(equalTo("[]: Expected 1 values but got 0, Expected: [4], Actual: []")));
}

@Test
Expand Down