From fbaa17904f2630093fe149af91047c8729cff749 Mon Sep 17 00:00:00 2001 From: fennecdjay Date: Thu, 15 Aug 2019 14:43:07 +0200 Subject: [PATCH] :white_check_mark: Add some tests --- tests/error/array_ref_exp.gw | 2 ++ tests/error/template_overload.gw | 3 +++ tests/fptr/fptr_global0.gw | 3 +++ 3 files changed, 8 insertions(+) create mode 100644 tests/error/array_ref_exp.gw create mode 100644 tests/error/template_overload.gw create mode 100644 tests/fptr/fptr_global0.gw diff --git a/tests/error/array_ref_exp.gw b/tests/error/array_ref_exp.gw new file mode 100644 index 00000000..cfb9bcb8 --- /dev/null +++ b/tests/error/array_ref_exp.gw @@ -0,0 +1,2 @@ +#! [contains] ref array must not have array expression +int @my_array[2]; diff --git a/tests/error/template_overload.gw b/tests/error/template_overload.gw new file mode 100644 index 00000000..bcb667d0 --- /dev/null +++ b/tests/error/template_overload.gw @@ -0,0 +1,3 @@ +#! [contains] must overload template function with template +fun void test<~A~>(int i){} +fun void test(int i, float f){} diff --git a/tests/fptr/fptr_global0.gw b/tests/fptr/fptr_global0.gw new file mode 100644 index 00000000..2076ed56 --- /dev/null +++ b/tests/fptr/fptr_global0.gw @@ -0,0 +1,3 @@ +class C { +typedef global void global_fptr(int i); +} -- 2.43.0