]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add invalid "base" tests to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Sun, 7 Jan 2018 18:00:12 +0000 (19:00 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Wed, 10 Jan 2018 19:46:00 +0000 (20:46 +0100)
tests/Makefile.am
tests/chainup/base-class-invalid.test [new file with mode: 0644]
tests/chainup/base-enum-invalid.test [new file with mode: 0644]
tests/chainup/base-invalid.test [new file with mode: 0644]
tests/chainup/base-struct-invalid.test [new file with mode: 0644]

index 1855ff445a735a7106fb1422d2716485d0914cb4..585bae56d1adc95b078cc214fa35b538c922b326 100644 (file)
@@ -49,6 +49,10 @@ TESTS = \
        basic-types/bug777697.test \
        basic-types/bug787152.vala \
        basic-types/bug788775.vala \
+       chainup/base-class-invalid.test \
+       chainup/base-enum-invalid.test \
+       chainup/base-invalid.test \
+       chainup/base-struct-invalid.test \
        chainup/class-base.vala \
        chainup/class-base-foo.vala \
        chainup/class-object.vala \
diff --git a/tests/chainup/base-class-invalid.test b/tests/chainup/base-class-invalid.test
new file mode 100644 (file)
index 0000000..0e3efe1
--- /dev/null
@@ -0,0 +1,10 @@
+Invalid Code
+
+class Foo {
+       public Foo () {
+               base ();
+       }
+}
+
+void main () {
+}
diff --git a/tests/chainup/base-enum-invalid.test b/tests/chainup/base-enum-invalid.test
new file mode 100644 (file)
index 0000000..29f9836
--- /dev/null
@@ -0,0 +1,11 @@
+Invalid Code
+
+enum Foo {
+       BAR;
+       public void bar () {
+               base ();
+       }
+}
+
+void main () {
+}
diff --git a/tests/chainup/base-invalid.test b/tests/chainup/base-invalid.test
new file mode 100644 (file)
index 0000000..ea4ac35
--- /dev/null
@@ -0,0 +1,5 @@
+Invalid Code
+
+void main () {
+       base ();
+}
diff --git a/tests/chainup/base-struct-invalid.test b/tests/chainup/base-struct-invalid.test
new file mode 100644 (file)
index 0000000..5b2fb26
--- /dev/null
@@ -0,0 +1,10 @@
+Invalid Code
+
+struct Foo {
+       public Foo () {
+               base ();
+       }
+}
+
+void main () {
+}