Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

7
LINES

< > BotCompany Repo | #1033287 - assertListsEqual

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (3831L) is out of date.

svoid assertListsEqual(S msg default "", L l1, L l2) {
  if (l(l1) != l(l2)) fail("Different size: " + l(l1) + "/" + l(l2));
  int iDiff = indexOfDifference(l1, l2);
  if (iDiff < 0) print(msg, "OK (" + l(l1) + ")");
  else
    fail(prependWithColonSpace(msg) + "Error in element " + iDiff + "/" + l(l1) + " (" + get(l1, iDiff) + "/" + get(l2, iDiff) + ")");
}

Author comment

Began life as a copy of #1033286

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1033287
Snippet name: assertListsEqual
Eternal ID of this version: #1033287/8
Text MD5: 4de5e8fb0911225c815807c63685411f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-10-18 10:04:05
Source code size: 366 bytes / 7 lines
Pitched / IR pitched: No / No
Views / Downloads: 16 / 33
Version history: 7 change(s)
Referenced in: [show references]