[vala/0.54] tests: Add more "type-arguments" tests to increase coverage



commit 0ab88c788c36c42ad4518e6d14851311d9f32b14
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Fri Oct 15 12:02:21 2021 +0200

    tests: Add more "type-arguments" tests to increase coverage

 tests/Makefile.am                                         |  4 ++++
 tests/semantic/method-return-too-few-type-arguments.test  | 10 ++++++++++
 tests/semantic/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(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index f35f5aeca..7cd0168b7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1082,6 +1082,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 \
@@ -1102,6 +1104,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<G,T> {
+}
+
+Foo<string> 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<G> {
+}
+
+Foo<string,int> 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<G,T> {
+}
+
+void bar (Foo<string> 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<G> {
+}
+
+void bar (Foo<string,int> foo) {
+}
+
+void main () {
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]