From 612070083c292ed3f5c781f8b124695e0f28fbbe Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 8 Oct 2019 17:46:45 +0200 Subject: [PATCH] :art: More and More testing --- examples/complex/invalid_type0.gw | 3 +++ examples/complex/invalid_type1.gw | 1 + tests/sh/opt.sh | 10 +++++++--- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 examples/complex/invalid_type0.gw create mode 100644 examples/complex/invalid_type1.gw diff --git a/examples/complex/invalid_type0.gw b/examples/complex/invalid_type0.gw new file mode 100644 index 00000000..344b6dcb --- /dev/null +++ b/examples/complex/invalid_type0.gw @@ -0,0 +1,3 @@ +class global InvalidGlobalClass { + inkrt i; +} diff --git a/examples/complex/invalid_type1.gw b/examples/complex/invalid_type1.gw new file mode 100644 index 00000000..12ef4531 --- /dev/null +++ b/examples/complex/invalid_type1.gw @@ -0,0 +1 @@ +InvalidGlobalClass c; diff --git a/tests/sh/opt.sh b/tests/sh/opt.sh index 61d44117..5e02f181 100644 --- a/tests/sh/opt.sh +++ b/tests/sh/opt.sh @@ -1,5 +1,5 @@ #!/bin/bash -# [test] #18 +# [test] #19 n=0 [ "$1" ] && n="$1" @@ -75,11 +75,15 @@ run "$n" "just check" "-g check" "file" # set compilation passes n=$((n+1)) -run "$n" "just check" "-g nopass" "file" +run "$n" "no pass" "-g nopass" "file" # option needs argument n=$((n+1)) -run "$n" "just check" "-p" "file" +run "$n" "option needs argument" "-p" "file" + +# invalid global type +n=$((n+1)) +run "$n" "invalid global type" "tests/complex/invalid_type0.gw tests/complex/invalid_type1.gw" "file" # test signal ./gwion -l1 & -- 2.43.0