Libraryless. Click here for Pure Java version (9373L/52K).
1 | static void assertTrue(O o) { |
2 | if (!(eq(o, true) /*|| isTrue(pcallF(o))*/)) |
3 | fail(str(o)); |
4 | } |
5 | |
6 | static bool assertTrue(S msg, bool b) { |
7 | if (!b) |
8 | fail(msg); |
9 | ret b; |
10 | } |
11 | |
12 | static bool assertTrue(bool b) { |
13 | if (!b) |
14 | fail("oops"); |
15 | ret b; |
16 | } |
17 | |
18 | sbool assertTrue(Scorer scorer, bool b) { |
19 | scorer.add(b); |
20 | ret b; |
21 | } |
download show line numbers debug dex old transpilations
Travelled to 21 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, ekrmjmnbrukm, gwrvuhgaqvyk, ishqpsrjomds, jozkyjcghlvl, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, odhhsrjjbcgr, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, whxojlpjdney, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1001598 |
Snippet name: | assertTrue - no longer accepts a function returning a boolean |
Eternal ID of this version: | #1001598/8 |
Text MD5: | b17c912257dd4575f0ac0bee13f2d625 |
Transpilation MD5: | a97cbaf246cc9dd9d12bfefebdce10cb |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-10-26 01:15:49 |
Source code size: | 339 bytes / 21 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 823 / 4219 |
Version history: | 7 change(s) |
Referenced in: | [show references] |