Download Jar. Uses 3874K of libraries. Click here for Pure Java version (8635L/62K).
1 | !7 |
2 | |
3 | p-experiment { |
4 | testOptEval("vmPort()", vmPort()); |
5 | testOptEval([[reversedString("abc")]], reversedString("abc")); |
6 | testOptEval([[reversedString("abc");]], reversedString("abc")); |
7 | testOptEval([[#123]], #123); |
8 | testEval("1+2", 3); |
9 | print("\nAll OK"); |
10 | } |
11 | |
12 | svoid testOptEval(S code, O expectedResult) { |
13 | if (testEval(code, expectedResult)) |
14 | quickFail("Shouldn't bail"); |
15 | } |
16 | |
17 | static bool testEval(S code, O expectedResult) { |
18 | print(code); |
19 | long time = sysNow(); |
20 | int bails = optimizedJavaEval_bails!; |
21 | O result = optimizedJavaEval(code); |
22 | bool bailed = bails < optimizedJavaEval_bails!; |
23 | printIndent("[" + (elapsedMS(time) + " ms" + (bailed ? ", bailed" : "") + "] " + sfu(result)); |
24 | assertEquals(expectedResult, result); |
25 | ret bailed; |
26 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1015631 |
Snippet name: | Test optimizedJavaEval [OK] |
Eternal ID of this version: | #1015631/13 |
Text MD5: | b7db09d8811838068e0ad1e63284c2e9 |
Transpilation MD5: | 700623f28fac501c26d706ded4227289 |
Author: | stefan |
Category: | javax |
Type: | JavaX source code (desktop) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-20 13:47:05 |
Source code size: | 777 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 512 / 1242 |
Version history: | 12 change(s) |
Referenced in: | [show references] |