]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add more "unsupported creation method" tests to increase coverage
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 27 Feb 2021 09:34:54 +0000 (10:34 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 27 Feb 2021 19:26:43 +0000 (20:26 +0100)
tests/Makefile.am
tests/semantic/creation-method-enum.test [new file with mode: 0644]
tests/semantic/creation-method-errordomain.test [new file with mode: 0644]
tests/semantic/creation-method-interface.test [new file with mode: 0644]
tests/semantic/creation-method-namespace.test [new file with mode: 0644]

index 0e1e83dc7796f446dc046cb81bc710a829a7cf4c..4594b47f84ff269ea8d6f978a57459d5bade9339 100644 (file)
@@ -911,6 +911,10 @@ TESTS = \
        semantic/constant-void.test \
        semantic/construct-without-gobject.test \
        semantic/creation-error-accessibility.test \
+       semantic/creation-method-enum.test \
+       semantic/creation-method-errordomain.test \
+       semantic/creation-method-interface.test \
+       semantic/creation-method-namespace.test \
        semantic/delegate-error-accessibility.test \
        semantic/delegate-return-valist.test \
        semantic/delegate-too-few-type-arguments.test \
diff --git a/tests/semantic/creation-method-enum.test b/tests/semantic/creation-method-enum.test
new file mode 100644 (file)
index 0000000..9911ee2
--- /dev/null
@@ -0,0 +1,10 @@
+Invalid Code
+
+enum Foo {
+       BAR;
+       public Foo () {
+       }
+}
+
+void main () {
+}
diff --git a/tests/semantic/creation-method-errordomain.test b/tests/semantic/creation-method-errordomain.test
new file mode 100644 (file)
index 0000000..c597844
--- /dev/null
@@ -0,0 +1,10 @@
+Invalid Code
+
+errordomain Foo {
+       BAR;
+       public Foo () {
+       }
+}
+
+void main () {
+}
diff --git a/tests/semantic/creation-method-interface.test b/tests/semantic/creation-method-interface.test
new file mode 100644 (file)
index 0000000..5510004
--- /dev/null
@@ -0,0 +1,9 @@
+Invalid Code
+
+interface Foo : Object {
+       public Foo () {
+       }
+}
+
+void main () {
+}
diff --git a/tests/semantic/creation-method-namespace.test b/tests/semantic/creation-method-namespace.test
new file mode 100644 (file)
index 0000000..e873122
--- /dev/null
@@ -0,0 +1,9 @@
+Invalid Code
+
+namespace Foo {
+       public Foo () {
+       }
+}
+
+void main () {
+}