improve error message when comparing JSON arrays

This commit is contained in:
Grahame Grieve 2023-08-14 15:35:53 +10:00
parent a57afef5a4
commit dd70d185df
1 changed files with 1 additions and 1 deletions

View File

@ -316,7 +316,7 @@ public class CompareUtilities extends BaseTestingUtilities {
if (i == expectedArray.size() - 1 && isOptional(expectedArray.get(i))) {
return null; // this is OK
} else {
return "One or more array items did not match at "+path;
return "One or more array items did not match at "+path+" starting at index "+i;
}
}
String s = compareNodes(path + "[" + Integer.toString(i) + "]", expectedArray.get(i), actualArray.get(c));