]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/While3.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / While3.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/While3.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/While3.scl
new file mode 100644 (file)
index 0000000..0520769
--- /dev/null
@@ -0,0 +1,11 @@
+import "Prelude"\r
+\r
+main = do\r
+    a = ref 1\r
+    b = ref 0\r
+    while (getRef a < 5) do\r
+        b := getRef b + 1\r
+        a := getRef a + 1\r
+    getRef b             \r
+--\r
+4
\ No newline at end of file