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).

!include once #1034831 // Gazelle 22 Function Include for Testing

svoid test_leftArrowScript_doWhile() {
  S script = [[
    sum <- 0
    do {
      sum <- sum plus 1
    } while { lessThan sum N }
    sum
  ]];
  
  assertEqualsVerbose(5, leftArrowVerbose(jreplace(script, N := "5"));
  assertEqualsVerbose(1, leftArrowVerbose(jreplace(script, N := "0"));
}

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: 126 / 186
Version history: 2 change(s)
Referenced in: [show references]