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

13
LINES

< > BotCompany Repo | #1033010 // assertJavaSourceEqualsVerbose_v2

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

Transpiled version (3962L) is out of date.

svoid assertJavaSourceEqualsVerbose_v2(S msg default "", S src, LS tok) {
  LS tokens1 = javaTokC(src), tokens2 = codeTokens(tok);
  int iDiff = indexOfDifference(tokens1, tokens2);
  if (iDiff < 0) print(msg, "OK: \n" + join(tok));
  else {
    print(sfu(tok));
    fail(prependWithColonSpace(msg) + "Error in token " + iDiff + " (" + get(tokens1, iDiff) + "/" + get(tokens2, iDiff) + "):\n"
      + "= got =\n"
      + join(tok) + "\n"
      + "= expected =\n"
      + src);
  }
}

Author comment

Began life as a copy of #1031313

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1033010
Snippet name: assertJavaSourceEqualsVerbose_v2
Eternal ID of this version: #1033010/9
Text MD5: 09e78e20b745b6d2e043160cbb01ac10
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-04-28 23:33:13
Source code size: 494 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 176 / 267
Version history: 8 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1033286 - assertDoubleArraysEqual