]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add regression test for genie struct construction
authorJeremy Philippe <jeremy.philippe@gmail.com>
Tue, 3 Sep 2019 01:36:49 +0000 (03:36 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 3 Sep 2019 07:45:20 +0000 (09:45 +0200)
tests/Makefile.am
tests/genie/struct.gs [new file with mode: 0644]

index 093ee5863f760c5c9f910f4b65383df6886eb445..4ec47f0a775d2cf67a704751bd1d9df6ca4b253a 100644 (file)
@@ -829,6 +829,7 @@ GENIE_TESTS = \
        genie/preparser.gs \
        genie/preparser-not.gs \
        genie/preparser-or-expression.gs \
+       genie/struct.gs \
        $(NULL)
 
 check-TESTS: $(TESTS) $(NON_NULL_TESTS)
diff --git a/tests/genie/struct.gs b/tests/genie/struct.gs
new file mode 100644 (file)
index 0000000..dee7cfd
--- /dev/null
@@ -0,0 +1,9 @@
+init
+       var a = Test()
+       assert( a.empty == "" )
+
+struct Test
+       empty:string
+
+       construct()
+               self.empty = ""