]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add invalid "duped constructor/destructor" test to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 13 Jun 2018 15:53:21 +0000 (17:53 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 13 Jun 2018 15:53:21 +0000 (17:53 +0200)
tests/Makefile.am
tests/parser/constructor-class-exists.test [new file with mode: 0644]
tests/parser/constructor-exists.test [new file with mode: 0644]
tests/parser/constructor-static-exists.test [new file with mode: 0644]
tests/parser/destructor-class-exists.test [new file with mode: 0644]
tests/parser/destructor-exists.test [new file with mode: 0644]
tests/parser/destructor-static-exists.test [new file with mode: 0644]

index 0ebea06584f7436449c96cc3c35e7f783d184ff6..c62cc62b3470f34a1bf95f04286b6a3af74aac5b 100644 (file)
@@ -403,15 +403,21 @@ TESTS = \
        parser/assignment.vala \
        parser/attribute-duplicate.test \
        parser/attribute-wrong-number.test \
+       parser/constructor-class-exists.test \
+       parser/constructor-exists.test \
        parser/constructor-no-new.test \
        parser/constructor-no-static-class.test \
+       parser/constructor-static-exists.test \
        parser/continue-statement.vala \
        parser/creation-no-abstract.test \
        parser/creation-no-override.test \
        parser/creation-no-virtual.test \
        parser/delegate-no-new.test \
+       parser/destructor-class-exists.test \
+       parser/destructor-exists.test \
        parser/destructor-no-new.test \
        parser/destructor-no-static-class.test \
+       parser/destructor-static-exists.test \
        parser/destructor-wrong-name.test \
        parser/do-statement.vala \
        parser/expect-endbrace.test \
diff --git a/tests/parser/constructor-class-exists.test b/tests/parser/constructor-class-exists.test
new file mode 100644 (file)
index 0000000..05b83f8
--- /dev/null
@@ -0,0 +1,12 @@
+Invalid Code
+
+public class Test {
+       class construct {
+       }
+
+       class construct {
+       }
+}
+
+void main () {
+}
diff --git a/tests/parser/constructor-exists.test b/tests/parser/constructor-exists.test
new file mode 100644 (file)
index 0000000..1ef0665
--- /dev/null
@@ -0,0 +1,12 @@
+Invalid Code
+
+public class Test {
+       construct {
+       }
+
+       construct {
+       }
+}
+
+void main () {
+}
diff --git a/tests/parser/constructor-static-exists.test b/tests/parser/constructor-static-exists.test
new file mode 100644 (file)
index 0000000..444905c
--- /dev/null
@@ -0,0 +1,12 @@
+Invalid Code
+
+public class Test {
+       static construct {
+       }
+
+       static construct {
+       }
+}
+
+void main () {
+}
diff --git a/tests/parser/destructor-class-exists.test b/tests/parser/destructor-class-exists.test
new file mode 100644 (file)
index 0000000..9e35ecc
--- /dev/null
@@ -0,0 +1,12 @@
+Invalid Code
+
+public class Test {
+       class ~Test () {
+       }
+
+       class ~Test () {
+       }
+}
+
+void main () {
+}
diff --git a/tests/parser/destructor-exists.test b/tests/parser/destructor-exists.test
new file mode 100644 (file)
index 0000000..f1b4662
--- /dev/null
@@ -0,0 +1,12 @@
+Invalid Code
+
+public class Test {
+       ~Test () {
+       }
+
+       ~Test () {
+       }
+}
+
+void main () {
+}
diff --git a/tests/parser/destructor-static-exists.test b/tests/parser/destructor-static-exists.test
new file mode 100644 (file)
index 0000000..4175a9d
--- /dev/null
@@ -0,0 +1,12 @@
+Invalid Code
+
+public class Test {
+       static ~Test () {
+       }
+
+       static ~Test () {
+       }
+}
+
+void main () {
+}