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

14
LINES

< > BotCompany Repo | #1037254 // test_leftArrowScript_doWhile

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

Uses 679K of libraries. Click here for Pure Java version (37160L/184K).

1  
!include once #1034831 // Gazelle 22 Function Include for Testing
2  
3  
svoid test_leftArrowScript_doWhile() {
4  
  S script = [[
5  
    sum <- 0
6  
    do {
7  
      sum <- sum plus 1
8  
    } while { lessThan sum N }
9  
    sum
10  
  ]];
11  
  
12  
  assertEqualsVerbose(5, leftArrowVerbose(jreplace(script, N := "5"));
13  
  assertEqualsVerbose(1, leftArrowVerbose(jreplace(script, N := "0"));
14  
}

Author comment

Began life as a copy of #1034238

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1037254
Snippet name: test_leftArrowScript_doWhile
Eternal ID of this version: #1037254/3
Text MD5: 32d7f7fed91453501072472d1d7fe518
Transpilation MD5: c7dcf397ffa3894178d99f6d07f89740
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-09-22 17:56:11
Source code size: 372 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 127 / 188
Version history: 2 change(s)
Referenced in: [show references]