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

11
LINES

< > BotCompany Repo | #1018444 - testFunctionValues - call function, compare output and print

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

Transpiled version (2151L) is out of date.

// params = input, output, input, output, ...
svoid mapLike testFunctionValues(O function, O... params) {
  for (int i = 0; i+1 < l(params); i += 2) {
    O in = params[i], expected = params[i+1];
    testFunctionValue(function, in, expected);
  }
}

svoid testFunctionValues(IF1 function, O... params) {
  testFunctionValues((O) function, params);
}

Author comment

Began life as a copy of #1013575

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1018444
Snippet name: testFunctionValues - call function, compare output and print
Eternal ID of this version: #1018444/7
Text MD5: 733d8f80c8fe4a32309d66e55df70105
Author: stefan
Category: javax / testing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-22 14:00:14
Source code size: 360 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 159 / 257
Version history: 6 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1018444 & http://1018444.tinybrain.de