Download Jar. Libraryless. Click here for Pure Java version (5787L/41K).
1 | !7 |
2 | |
3 | set flag _MethodCache_debug. |
4 | |
5 | sclass Bla { |
6 | S ok() { ret 'jaOK; } |
7 | int yo(int x) { ret x+5; } |
8 | S yo(S x) { ret 'ja + x; } |
9 | S testMe(int x) { ret 'int; } |
10 | } |
11 | |
12 | sclass DaStatic { |
13 | sS sOK() { ret 'sJaOK; } |
14 | static int yo(int x) { ret x+5; } |
15 | sS yo(S x) { ret 'ja + x; } |
16 | } |
17 | |
18 | p-exp { |
19 | twice { |
20 | assertEqualsVerbose('jaOK, callOpt_cached(new Bla, 'ok)); |
21 | assertNull(callOpt_cached(new Bla, 'sOK)); |
22 | assertEqualsVerbose(15, callOpt_cached(new Bla, 'yo, 10)); |
23 | assertEqualsVerbose('jaX, callOpt_cached(new Bla, 'yo, 'X)); |
24 | assertNull(callOpt_cached(new Bla, 'yoyo)); |
25 | assertNull(callOpt_cached(new Bla, 'yo, 5.0)); |
26 | assertNull(callOpt_cached(Bla, 'ok)); // non-static method |
27 | assertNull(callOpt_cached(new Bla, 'testMe, 'test)); |
28 | |
29 | assertNull(callOpt_cached(DaStatic, 'ok)); |
30 | assertEqualsVerbose('sJaOK, callOpt_cached(DaStatic, 'sOK)); |
31 | assertEqualsVerbose(15, callOpt_cached(DaStatic, 'yo, 10)); |
32 | assertEqualsVerbose('jaX, callOpt_cached(DaStatic, 'yo, 'X)); |
33 | assertNull(callOpt_cached(DaStatic, 'yoyo)); |
34 | assertNull(callOpt_cached(DaStatic, 'yo, 5.0)); |
35 | } |
36 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1018498 |
Snippet name: | Test callOpt_cached |
Eternal ID of this version: | #1018498/7 |
Text MD5: | fc8b9141683df7b6d69439648f615ecb |
Transpilation MD5: | 22a5e9826b80c18431220cce7b0bce27 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-10-02 12:29:55 |
Source code size: | 1140 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 438 / 1304 |
Version history: | 6 change(s) |
Referenced in: | [show references] |