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

9
LINES

< > BotCompany Repo | #1023865 // testFunctionValues_twoArgs - call two-argument function, compare output and print

JavaX fragment (include)

// params = pair(inputs), output, pair(inputs), output, ...
svoid mapLike testFunctionValues_twoArgs(O function, O... params) {
  for (int i = 0; i+1 < l(params); i += 2) {
    Pair in = cast params[i];
    O expected = params[i+1];
    print(function + "(" + in + ")");
    assertEqualsVerbose(expected, callFWithVarArgs(function, in.a, in.b));
  }
}

Author comment

Began life as a copy of #1018444

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1023865
Snippet name: testFunctionValues_twoArgs - call two-argument function, compare output and print
Eternal ID of this version: #1023865/4
Text MD5: dce2b65d313935e4e1a4d8883e9293da
Author: stefan
Category: javax / testing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-10-26 05:29:08
Source code size: 359 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 312 / 355
Version history: 3 change(s)
Referenced in: [show references]