Download Jar. Libraryless. Click here for Pure Java version (6220L/44K).
1 | !7 |
2 | |
3 | sclass Bla { |
4 | S ok(S s) { ret s + " " + s; } |
5 | S ok(S s, S... x) { ret s + " " + joinWithComma(x); } |
6 | S single(S... x) { ret joinWithComma(x); } |
7 | } |
8 | |
9 | p-exp { |
10 | assertEqualsVerbose("hello hello", call_withVarargs(new Bla, 'ok, 'hello)); |
11 | assertEqualsVerbose("hello what's, up", call_withVarargs(new Bla, 'ok, 'hello, "what's", 'up)); |
12 | |
13 | assertEqualsVerbose("hello hello", callOpt_withVarargs(new Bla, 'ok, 'hello)); |
14 | assertEqualsVerbose("hello what's, up", callOpt_withVarargs(new Bla, 'ok, 'hello, "what's", 'up)); |
15 | assertNullVerbose(callOpt_withVarargs(new Bla, 'ok, "", 5)); |
16 | |
17 | assertEqualsVerbose("a, b", callOpt_withVarargs(new Bla, 'single, 'a, 'b)); |
18 | } |
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1022096 |
Snippet name: | Test call_withVarargs & callOpt_withVarargs [OK] |
Eternal ID of this version: | #1022096/6 |
Text MD5: | 9abef586cb8455002641d8b4896ee5d5 |
Transpilation MD5: | 02ee3a2867472413fa59c46f16c149b1 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-03-15 08:40:24 |
Source code size: | 685 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 371 / 1109 |
Version history: | 5 change(s) |
Referenced in: | [show references] |