]> ocean-lang.org Git - ocean/blobdiff - csrc/oceani-tests.mdc
parsergen: avoid creating extra line in code blocks.
[ocean] / csrc / oceani-tests.mdc
index 4dceab407eee8c163f4a3e69fedca3b8ccf3afe6..1d7282da7f95babcfc8a342f48ff1748c19da9b4 100644 (file)
@@ -97,7 +97,7 @@ arguments separated from the name by commas.  For each test, there is a section
                ## valgrind test code
                @[ -n "$$SKIP_COVERAGE_CHECK" ] || awk '/NOTEST/ { next } /^ *[1-9]/ {ran+=1} /^ *###/ {skip+=1} \
                    END {printf "coverage: %6.2f%%\n", ran * 100 / (ran + skip); \
-                        if (ran < (ran + skip) *0.968) exit(1) }' \
+                        if (ran < (ran + skip) *0.973) exit(1) }' \
                        coverage/oceani.mdc.gcov
 
        coverage_oceani: oceani.c
@@ -999,7 +999,17 @@ Test for type errors with functions
        func test5(a:number):string
                print a
 
+       struct foo
+               a: number
+               b:string = "hello"
+
+       func test6(a:number):foo
+               b:foo
+               b.a = a
+               use b
+
 ###### output: func_err_args
+       .tmp.code:34:5: error: function cannot return value of type foo
        .tmp.code:28:14: error: expected string, found none
        .tmp.code:25:8: error: expected string, found number
        .tmp.code:15:14: error: insufficient arguments to function.