]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add more "type-arguments" tests to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 15 Oct 2021 10:02:21 +0000 (12:02 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 15 Oct 2021 10:22:54 +0000 (12:22 +0200)
tests/Makefile.am
tests/semantic/method-return-too-few-type-arguments.test [new file with mode: 0644]
tests/semantic/method-return-too-many-type-arguments.test [new file with mode: 0644]
tests/semantic/parameter-too-few-type-arguments.test [new file with mode: 0644]
tests/semantic/parameter-too-many-type-arguments.test [new file with mode: 0644]

index f35f5aeca5fe9be617423904433fb111f7e3694d..7cd0168b7b3c6f65b09ab378c6b0d6b546cf136d 100644 (file)
@@ -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 (file)
index 0000000..ccd0c0b
--- /dev/null
@@ -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 (file)
index 0000000..87ec26c
--- /dev/null
@@ -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 (file)
index 0000000..270e6a4
--- /dev/null
@@ -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 (file)
index 0000000..d4db621
--- /dev/null
@@ -0,0 +1,10 @@
+Invalid Code
+
+class Foo<G> {
+}
+
+void bar (Foo<string,int> foo) {
+}
+
+void main () {
+}