]> 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>
Tue, 19 Oct 2021 07:47:27 +0000 (09:47 +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 ae349562dc50b10bf5e60dbcddb6536364d4727a..c7d982a507f4cceefaf375c1e1270936aa59818a 100644 (file)
@@ -1028,6 +1028,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 \
@@ -1048,6 +1050,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 () {
+}