From: Rico Tzschichholz Date: Tue, 15 Oct 2019 11:59:19 +0000 (+0200) Subject: tests: Add "wrongly named constructor" tests X-Git-Tag: 0.44.10~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fccffaf74c08f39be107f79389755749e60c3cc3;p=thirdparty%2Fvala.git tests: Add "wrongly named constructor" tests --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 180c22e97..f7f9b2974 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -225,6 +225,7 @@ TESTS = \ structs/struct-static-field-initializer.test \ structs/struct-static-property-initializer.test \ structs/structs.vala \ + structs/constructor-wrong-name.test \ structs/default-gtype.vala \ structs/gmutex.vala \ structs/gvalue.vala \ @@ -300,6 +301,7 @@ TESTS = \ objects/compact-class-destructor.vala \ objects/compact-class-refcount.vala \ objects/constructor-variadic.test \ + objects/constructor-wrong-name.test \ objects/constructors.vala \ objects/destructors.vala \ objects/duplicating-instance-invalid.test \ diff --git a/tests/objects/constructor-wrong-name.test b/tests/objects/constructor-wrong-name.test new file mode 100644 index 000000000..5bd968de1 --- /dev/null +++ b/tests/objects/constructor-wrong-name.test @@ -0,0 +1,9 @@ +Invalid Code + +class Foo { + public Bar () { + } +} + +void main () { +} diff --git a/tests/structs/constructor-wrong-name.test b/tests/structs/constructor-wrong-name.test new file mode 100644 index 000000000..95aa1c4ad --- /dev/null +++ b/tests/structs/constructor-wrong-name.test @@ -0,0 +1,11 @@ +Invalid Code + +struct Foo { + public int i; + + public Bar () { + } +} + +void main () { +}