From af625afafc7f250025eb8c21108fd509bc4fbc90 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Tue, 8 Oct 2019 12:37:54 +0200 Subject: [PATCH] :art: scan1 coverage --- tests/error/dot_single.gw | 2 ++ tests/error/nonnull_class_extend.gw | 4 ++++ tests/error/not_global.gw | 6 ++++++ tests/internal_op/dtor_arg.gw | 4 ++++ tests/internal_op/dtor_not_void.gw | 4 ++++ tests/{error => internal_op}/dtor_outside_class.gw | 0 tests/internal_op/internal_not_int.gw | 2 ++ tests/match/internal_multi.gw | 2 ++ tests/match/match_where.gw | 4 ++++ 9 files changed, 28 insertions(+) create mode 100644 tests/error/dot_single.gw create mode 100644 tests/error/nonnull_class_extend.gw create mode 100644 tests/error/not_global.gw create mode 100644 tests/internal_op/dtor_arg.gw create mode 100644 tests/internal_op/dtor_not_void.gw rename tests/{error => internal_op}/dtor_outside_class.gw (100%) create mode 100644 tests/internal_op/internal_not_int.gw create mode 100644 tests/match/internal_multi.gw create mode 100644 tests/match/match_where.gw diff --git a/tests/error/dot_single.gw b/tests/error/dot_single.gw new file mode 100644 index 00000000..209b8e8f --- /dev/null +++ b/tests/error/dot_single.gw @@ -0,0 +1,2 @@ +#! [contains] can't use multiple expression +(me, 1).id(); diff --git a/tests/error/nonnull_class_extend.gw b/tests/error/nonnull_class_extend.gw new file mode 100644 index 00000000..ebc08724 --- /dev/null +++ b/tests/error/nonnull_class_extend.gw @@ -0,0 +1,4 @@ +#! [contains] can't use nonnull type in class extend +class C extends Object! { + +} diff --git a/tests/error/not_global.gw b/tests/error/not_global.gw new file mode 100644 index 00000000..e5ac6bbd --- /dev/null +++ b/tests/error/not_global.gw @@ -0,0 +1,6 @@ +#! [contains] is not global +class C { + +} + +global C c; diff --git a/tests/internal_op/dtor_arg.gw b/tests/internal_op/dtor_arg.gw new file mode 100644 index 00000000..2f2d7811 --- /dev/null +++ b/tests/internal_op/dtor_arg.gw @@ -0,0 +1,4 @@ +#! [contains] must not have args +class C { + operator @dtor void(int i) {} +} diff --git a/tests/internal_op/dtor_not_void.gw b/tests/internal_op/dtor_not_void.gw new file mode 100644 index 00000000..71cac937 --- /dev/null +++ b/tests/internal_op/dtor_not_void.gw @@ -0,0 +1,4 @@ +#! [contains] must return +class C { + operator @dtor int() {} +} diff --git a/tests/error/dtor_outside_class.gw b/tests/internal_op/dtor_outside_class.gw similarity index 100% rename from tests/error/dtor_outside_class.gw rename to tests/internal_op/dtor_outside_class.gw diff --git a/tests/internal_op/internal_not_int.gw b/tests/internal_op/internal_not_int.gw new file mode 100644 index 00000000..57bb4223 --- /dev/null +++ b/tests/internal_op/internal_not_int.gw @@ -0,0 +1,2 @@ +#! [contains] must return +operator @access Object (int i) {} diff --git a/tests/match/internal_multi.gw b/tests/match/internal_multi.gw new file mode 100644 index 00000000..cabafc9c --- /dev/null +++ b/tests/match/internal_multi.gw @@ -0,0 +1,2 @@ +#! [contains] must have one +operator @access int(Vec3 v, int i) {} diff --git a/tests/match/match_where.gw b/tests/match/match_where.gw new file mode 100644 index 00000000..19803bb8 --- /dev/null +++ b/tests/match/match_where.gw @@ -0,0 +1,4 @@ +int i; +match (i) { + case _ : <<< "success" >>>; +} where int a; -- 2.43.0