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

21
LINES

< > BotCompany Repo | #1001055 // assertEquals - not using structure() for making the message anymore [saving code]

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

Transpiled version (3040L) is out of date.

1  
static <A> A assertEquals(O x, A y) {
2  
  ret assertEquals("", x, y);
3  
}
4  
5  
static <A> A assertEquals(S msg, O x, A y) {
6  
  if (assertVerbose()) ret assertEqualsVerbose(msg, x, y);
7  
  if (!(x == null ? y == null : x.equals(y)))
8  
    fail((msg != null ? msg + ": " : "") + y + " != " + x);
9  
  ret y;
10  
}
11  
12  
ifclass Scorer
13  
  svoid assertEquals(Scorer scorer, O x, O y) {
14  
    assertEquals(scorer, "", x, y);
15  
  }
16  
  
17  
  svoid assertEquals(Scorer scorer, S msg, O x, O y) {
18  
    if (scorer == null) ret with assertEquals(msg, x, y);
19  
    scorer.add(eq(x, y), nullIfEmpty(msg));
20  
  }
21  
endif

download  show line numbers  debug dex  old transpilations   

Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, ppjhyzlbdabe, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1001055
Snippet name: assertEquals - not using structure() for making the message anymore [saving code]
Eternal ID of this version: #1001055/8
Text MD5: 6642b41586c4b70c9d4af11e8c8aa5e4
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-11 06:09:11
Source code size: 585 bytes / 21 lines
Pitched / IR pitched: No / No
Views / Downloads: 913 / 4903
Version history: 7 change(s)
Referenced in: [show references]