From: Rico Tzschichholz Date: Sat, 27 Feb 2021 09:34:54 +0000 (+0100) Subject: tests: Add more "unsupported creation method" tests to increase coverage X-Git-Tag: 0.51.3~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=108aa90976571b0979124c4a63d0ea733ab235cf;p=thirdparty%2Fvala.git tests: Add more "unsupported creation method" tests to increase coverage --- 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 () { +}