[vala/0.40] tests: Add "wrongly named constructor" tests
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] tests: Add "wrongly named constructor" tests
- Date: Sun, 10 Nov 2019 17:04:51 +0000 (UTC)
commit 2697042557c7d29094132a874dc6db110ddb51e1
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Oct 15 13:59:19 2019 +0200
tests: Add "wrongly named constructor" tests
tests/Makefile.am | 2 ++
tests/objects/constructor-wrong-name.test | 9 +++++++++
tests/structs/constructor-wrong-name.test | 11 +++++++++++
3 files changed, 22 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1334429c4..e5b03831a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -206,6 +206,7 @@ TESTS = \
structs/struct_only.vala \
structs/struct-base-types.vala \
structs/structs.vala \
+ structs/constructor-wrong-name.test \
structs/gmutex.vala \
structs/gvalue.vala \
structs/gvalue-implicit-comparison.vala \
@@ -270,6 +271,7 @@ TESTS = \
objects/classes.vala \
objects/compact-class-destructor.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 () {
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]