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

9
LINES

< > BotCompany Repo | #1024234 // testFunctionValues_multipleArgs - call multi-argument function, compare output and print

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

Libraryless. Click here for Pure Java version (1729L/11K).

1  
// params = ll(inputs), output, ll(inputs), output, ...
2  
svoid mapLike testFunctionValues_multipleArgs(O function, O... params) {
3  
  for (int i = 0; i+1 < l(params); i += 2) {
4  
    L in = cast params[i];
5  
    O expected = params[i+1];
6  
    print(function + "(" + joinWithComma(in) + ")");
7  
    assertEqualsVerbose(expected, callF(function, asObjectArray(in)));
8  
  }
9  
}

Author comment

Began life as a copy of #1023865

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: #1024234
Snippet name: testFunctionValues_multipleArgs - call multi-argument function, compare output and print
Eternal ID of this version: #1024234/4
Text MD5: 7139ab2ada27d6e8f30cada1279d930d
Transpilation MD5: 3ae4a8f9f1a74e29b643e59037717d47
Author: stefan
Category: javax / testing
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-07-28 15:44:53
Source code size: 368 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 238 / 315
Version history: 3 change(s)
Referenced in: [show references]