Uses 1485K of libraries. Click here for Pure Java version (39189L/261K).
1 | !include once #1034831 // Gazelle 22 Function Include for Testing |
2 | |
3 | set flag PingV3. |
4 | |
5 | svoid test_leftArrowScript_pinging() { |
6 | embedded S countLoop(int n) { |
7 | ret [[ i <- 0; while lessThan i ]] + n + [[ { i <- plus i 1 }; i ]]; |
8 | } |
9 | |
10 | // Test that ping is called at least once per loop iteration |
11 | var script1 = leftArrowParse(countLoop(5)); |
12 | var script2 = leftArrowParse(countLoop(6)); |
13 | long pingCount1 = countPingCalls(-> script1!); |
14 | long pingCount2 = countPingCalls(-> script2!); |
15 | printVars(+pingCount1, +pingCount2); |
16 | assertTrue(pingCount2 > pingCount1); |
17 | } |
Began life as a copy of #1033988
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034264 |
Snippet name: | test_leftArrowScript_pinging |
Eternal ID of this version: | #1034264/2 |
Text MD5: | fa5cceb758d336bd2d7ee2aa0b667aa5 |
Transpilation MD5: | 7f1927bffe8584926cac29f72254dd94 |
Author: | stefan |
Category: | javax |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-11 02:25:16 |
Source code size: | 584 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 190 / 295 |
Version history: | 1 change(s) |
Referenced in: | [show references] |