1 | static <A> A assertEqualsVerbose_struct(O x, A y) { |
2 | assertEqualsVerbose_struct((S) null, x, y); |
3 | ret y; |
4 | } |
5 | |
6 | static <A> A assertEqualsVerbose_struct(S msg, O x, A y) { |
7 | if (!eq(x, y)) { |
8 | fail((msg != null ? msg + ": " : "") + "expected " + sfu(y) + ", got " + sfu(x)); |
9 | } else |
10 | print("OK: " + sfu(x)); |
11 | ret y; |
12 | } |
13 | |
14 | |
15 | ifclass Scorer |
16 | static void assertEqualsVerbose_struct(Scorer scorer, O x, O y) { |
17 | if (!eq(x, y)) { |
18 | print(sfu(y) + " != " + sfu(x)); |
19 | scorer.add(false); |
20 | } else { |
21 | print("OK: " + sfu(x)); |
22 | scorer.add(true); |
23 | } |
24 | } |
25 | endif |
Began life as a copy of #1002936
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1018446 |
Snippet name: | assertEqualsVerbose_struct - print structs |
Eternal ID of this version: | #1018446/4 |
Text MD5: | 82d3d6fa500b0fa0d2365b3bbeab0eec |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2020-06-07 18:07:43 |
Source code size: | 580 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 304 / 388 |
Version history: | 3 change(s) |
Referenced in: | [show references] |