]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
oceani: discard AssignRef and DeclareRef
[ocean] / csrc / oceani-tests.mdc
index 0b7c76a726ca8ecc66ee4d68efb9f6f09dc43728..fafb78821b76d5d1891cf1a630ad8896ef918a11 100644 (file)
@@ -295,6 +295,19 @@ Now we need to test if/else and some different loops
                else
                        print 'larger'
 
+               // different parsing options
+               for {
+                       x:=1; sum := 0
+               } then {
+                       x = x + 1
+               } while {
+                       use x < 10 
+               } do {
+                       sum = sum + x
+               } case 1 {
+                       print "impossible"
+               }
+
 ###### output: cond_loop
        Success
         1 2 4 8 16 32 64
@@ -702,6 +715,13 @@ Test functions.  They don't return anything, so we need to get them to print
        do
                n = 4 // xkcd:221
 
+       // exercise the parsing options
+       func t1 (a:number) {
+               print "t1"
+       }
+       func t2 (a:string) {print "string"}
+       func t3() print "t3"
+
 ###### output: functions
        done
        1  done