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

16
LINES

< > BotCompany Repo | #1001598 - assertTrue - no longer accepts a function returning a boolean

JavaX fragment (include)

static void assertTrue(O o) {
  if (!(eq(o, true) /*|| isTrue(pcallF(o))*/))
    fail(str(o));
}
  
static bool assertTrue(S msg, bool b) {
  if (!b)
    fail(msg);
  ret b;
}

static bool assertTrue(bool b) {
  if (!b)
    fail("oops");
  ret b;
}

download  show line numbers  debug dex   

Travelled to 14 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, jozkyjcghlvl, lpdgvwnxivlt, mqqgnosmbjvj, odhhsrjjbcgr, onxytkatvevr, tslmcundralx, tvejysmllsmz, whxojlpjdney

No comments. add comment

Snippet ID: #1001598
Snippet name: assertTrue - no longer accepts a function returning a boolean
Eternal ID of this version: #1001598/7
Text MD5: 3a09fc5907fe9d45845d64b18ef71d77
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-03 13:48:27
Source code size: 263 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 401 / 3560
Version history: 6 change(s)
Referenced in: [show references]