Commit 61b2b9b1 authored by Maximilien Colange's avatar Maximilien Colange
Browse files

genltl: improve coverage

* tests/core/genltl.test: here
* spot/gen/formulas.cc: typo
parent 321230f8
Pipeline #1838 passed with stage
in 56 minutes and 28 seconds
......@@ -1011,7 +1011,7 @@ namespace spot
int k = ceil(log2(n)) + (n == 1);
if (n <= 0)
bad_number("kr1-exp", n);
bad_number("kr-nlogn", n);
formula fa = formula::ap(a);
formula fb = formula::ap(b);
......
......@@ -87,7 +87,6 @@ diff expected output
genltl --dac=1..5 --eh=1..5 >output2
diff output output2
genltl --tv-f1=1:3 --tv-f2=1:3 --tv-g1=1:3 --tv-g2=1:3 --tv-uu=1:3 \
--format=%F,%L,%f >output
cat >expected <<EOF
......@@ -175,3 +174,33 @@ genltl --ms-example=0..4 --ms-phi-r=0..2 --ms-phi-s=0..2 --ms-phi-h=0..4 \
--gf-equiv=0..5 --gf-implies=0..5 --format=%F=%L,%f |
ltldo -F-/2 'ltl2tgba -G -D' --stats='%<,%s' > out
diff out exp
# Test out-of-range conditions
genltl --dac-patterns=0 2> err && exit 1
test $? = 2
test "`cat err`" = "genltl: no pattern dac-patterns=0, supported range is 1..55"
genltl --eh-patterns=0 2> err && exit 1
test $? = 2
test "`cat err`" = "genltl: no pattern eh-patterns=0, supported range is 1..12"
genltl --hkrss-patterns=0 2> err && exit 1
test $? = 2
test "`cat err`" = \
"genltl: no pattern hkrss-patterns=0, supported range is 1..55"
genltl --kr-n=0 2> err && exit 1
test $? = 2
test "`cat err`" = "genltl: no pattern kr-n=0, supported range is 1.."
genltl --kr-nlogn=0 2> err && exit 1
test $? = 2
test "`cat err`" = "genltl: no pattern kr-nlogn=0, supported range is 1.."
genltl --p-patterns=0 2> err && exit 1
test $? = 2
test "`cat err`" = "genltl: no pattern p-patterns=0, supported range is 1..20"
genltl --sb-patterns=0 2> err && exit 1
test $? = 2
test "`cat err`" = "genltl: no pattern sb-patterns=0, supported range is 1..27"
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment