[vala/staging] tests: Add more "unsupported creation method" tests to increase coverage



commit 108aa90976571b0979124c4a63d0ea733ab235cf
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sat Feb 27 10:34:54 2021 +0100

    tests: Add more "unsupported creation method" tests to increase coverage

 tests/Makefile.am                               |  4 ++++
 tests/semantic/creation-method-enum.test        | 10 ++++++++++
 tests/semantic/creation-method-errordomain.test | 10 ++++++++++
 tests/semantic/creation-method-interface.test   |  9 +++++++++
 tests/semantic/creation-method-namespace.test   |  9 +++++++++
 5 files changed, 42 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5454911e6..2ea1cb3fb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -928,6 +928,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
index 000000000..9911ee255
--- /dev/null
+++ b/tests/semantic/creation-method-enum.test
@@ -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
index 000000000..c597844cb
--- /dev/null
+++ b/tests/semantic/creation-method-errordomain.test
@@ -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
index 000000000..5510004cc
--- /dev/null
+++ b/tests/semantic/creation-method-interface.test
@@ -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
index 000000000..e87312249
--- /dev/null
+++ b/tests/semantic/creation-method-namespace.test
@@ -0,0 +1,9 @@
+Invalid Code
+
+namespace Foo {
+       public Foo () {
+       }
+}
+
+void main () {
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]