From: NeilBrown Date: Wed, 8 May 2019 07:22:53 +0000 (+1000) Subject: oceani-tests: assorted more tests. X-Git-Tag: JamisonCreek-3~19 X-Git-Url: https://ocean-lang.org/code/?p=ocean;a=commitdiff_plain;h=89377f910b5d607fdcdb2d7152ca3a58668a3de0 oceani-tests: assorted more tests. Assorted tests chosen after examining lines of code that were not being run. This pushes the coverage over 90% !!! Also a bugfix - test suites are good !!! Signed-off-by: NeilBrown --- diff --git a/csrc/oceani-tests.mdc b/csrc/oceani-tests.mdc index bd40b2d..f5f097a 100644 --- a/csrc/oceani-tests.mdc +++ b/csrc/oceani-tests.mdc @@ -68,7 +68,7 @@ arguments separated from the name by commas. For each test, there is a section @mv *.gcov coverage ; [ -f .gcov ] && mv .gcov coverage @ awk '/^ *[1-9]/ {ran+=1} /^ *###/ {skip+=1} \ END {printf "coverage: %6.2f%%\n", ran * 100 / (ran + skip); \ - if (ran < (ran + skip) *0.85) exit(1) }' \ + if (ran < (ran + skip) *0.90) exit(1) }' \ coverage/oceani.mdc.gcov @rm -f .tmp* @@ -87,18 +87,25 @@ calculations on them. ###### test: valvar program: - a := 23; b:=12 + a := 23; b:=12 ; b1 := -b print a, b, a+b, a-b, a*b, a/b, a%b print ab, a>=b, aline >= 0) { fprintf(f, "%d:%d: ", loc->line, loc->column); return 1;