]> 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>
Sun, 7 Jan 2018 19:26:03 +0000 (20:26 +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 effcbed6d401f4b5d74de002022800783a70c9e8..5f41f1cc5dfc59634f7e529f5ae7def5bbb7477a 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 () {
+}