From 77b9b2c1b59661394d67f73b65488d458b96baff Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Fri, 15 Oct 2021 12:02:21 +0200 Subject: [PATCH] tests: Add more "type-arguments" tests to increase coverage --- tests/Makefile.am | 4 ++++ .../semantic/method-return-too-few-type-arguments.test | 10 ++++++++++ .../method-return-too-many-type-arguments.test | 10 ++++++++++ tests/semantic/parameter-too-few-type-arguments.test | 10 ++++++++++ tests/semantic/parameter-too-many-type-arguments.test | 10 ++++++++++ 5 files changed, 44 insertions(+) create mode 100644 tests/semantic/method-return-too-few-type-arguments.test create mode 100644 tests/semantic/method-return-too-many-type-arguments.test create mode 100644 tests/semantic/parameter-too-few-type-arguments.test create mode 100644 tests/semantic/parameter-too-many-type-arguments.test diff --git a/tests/Makefile.am b/tests/Makefile.am index 52a3661f6..29251e034 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1067,6 +1067,8 @@ TESTS = \ semantic/method-private-virtual.test \ semantic/method-protected.test \ semantic/method-return-accessibility.test \ + semantic/method-return-too-few-type-arguments.test \ + semantic/method-return-too-many-type-arguments.test \ semantic/method-return-valist.test \ semantic/method-too-few-type-arguments.test \ semantic/method-too-many-type-arguments.test \ @@ -1087,6 +1089,8 @@ TESTS = \ semantic/parameter-out-default.test \ semantic/parameter-params.test \ semantic/parameter-ref-default.test \ + semantic/parameter-too-few-type-arguments.test \ + semantic/parameter-too-many-type-arguments.test \ semantic/parameter-void.test \ semantic/params-array-multiple.test \ semantic/params-array-objectcreation-multiple.test \ diff --git a/tests/semantic/method-return-too-few-type-arguments.test b/tests/semantic/method-return-too-few-type-arguments.test new file mode 100644 index 000000000..ccd0c0b6d --- /dev/null +++ b/tests/semantic/method-return-too-few-type-arguments.test @@ -0,0 +1,10 @@ +Invalid Code + +class Foo { +} + +Foo bar () { +} + +void main () { +} diff --git a/tests/semantic/method-return-too-many-type-arguments.test b/tests/semantic/method-return-too-many-type-arguments.test new file mode 100644 index 000000000..87ec26c84 --- /dev/null +++ b/tests/semantic/method-return-too-many-type-arguments.test @@ -0,0 +1,10 @@ +Invalid Code + +class Foo { +} + +Foo bar () { +} + +void main () { +} diff --git a/tests/semantic/parameter-too-few-type-arguments.test b/tests/semantic/parameter-too-few-type-arguments.test new file mode 100644 index 000000000..270e6a47b --- /dev/null +++ b/tests/semantic/parameter-too-few-type-arguments.test @@ -0,0 +1,10 @@ +Invalid Code + +class Foo { +} + +void bar (Foo foo) { +} + +void main () { +} diff --git a/tests/semantic/parameter-too-many-type-arguments.test b/tests/semantic/parameter-too-many-type-arguments.test new file mode 100644 index 000000000..d4db6219b --- /dev/null +++ b/tests/semantic/parameter-too-many-type-arguments.test @@ -0,0 +1,10 @@ +Invalid Code + +class Foo { +} + +void bar (Foo foo) { +} + +void main () { +} -- 2.47.2