]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
tests: Add some minimal test cases to catch insufficient headers
authorRico Tzschichholz <ricotz@ubuntu.com>
Wed, 21 Nov 2018 16:00:19 +0000 (17:00 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 26 Nov 2018 08:59:49 +0000 (09:59 +0100)
tests/Makefile.am
tests/delegates/delegate_only.vala [new file with mode: 0644]
tests/enums/enum-no-gtype.vala [new file with mode: 0644]
tests/errors/errordomain.vala [new file with mode: 0644]
tests/errors/method-throws.vala [new file with mode: 0644]
tests/objects/compact-class.vala [new file with mode: 0644]
tests/structs/struct-no-gtype.vala [new file with mode: 0644]

index 262e5fa934357e7a05d9bc128b5b1105d81e50ea..6b0261be658bbc6dcf0eff0fefc0b22940233672 100644 (file)
@@ -178,6 +178,7 @@ TESTS = \
        control-semantic/printf-too-many.test \
        control-semantic/variadic-argument-invalid.test \
        enums/enum_only.vala \
+       enums/enum-no-gtype.vala \
        enums/enums.vala \
        enums/flags.vala \
        enums/bug666035.vala \
@@ -185,6 +186,7 @@ TESTS = \
        enums/bug763831.vala \
        enums/bug780050.vala \
        structs/struct_only.vala \
+       structs/struct-no-gtype.vala \
        structs/structs.vala \
        structs/gvalue.vala \
        structs/bug530605.vala \
@@ -221,6 +223,7 @@ TESTS = \
        structs/bug777194.vala \
        delegates/casting.vala \
        delegates/compatible.vala \
+       delegates/delegate_only.vala \
        delegates/delegates.vala \
        delegates/delegates-error.test \
        delegates/fields.vala \
@@ -244,6 +247,7 @@ TESTS = \
        delegates/bug792077.vala \
        objects/chainup.vala \
        objects/classes.vala \
+       objects/compact-class.vala \
        objects/compact-class-destructor.vala \
        objects/constructor-variadic.test \
        objects/constructors.vala \
@@ -341,6 +345,8 @@ TESTS = \
        objects/bug795521.vala \
        errors/catch-error-code.vala \
        errors/errors.vala \
+       errors/errordomain.vala \
+       errors/method-throws.vala \
        errors/bug567181.vala \
        errors/bug579101.vala \
        errors/bug596228.vala \
diff --git a/tests/delegates/delegate_only.vala b/tests/delegates/delegate_only.vala
new file mode 100644 (file)
index 0000000..7484e21
--- /dev/null
@@ -0,0 +1,4 @@
+delegate void FooFunc ();
+
+void main () {
+}
diff --git a/tests/enums/enum-no-gtype.vala b/tests/enums/enum-no-gtype.vala
new file mode 100644 (file)
index 0000000..e0c9c2a
--- /dev/null
@@ -0,0 +1,8 @@
+[CCode (has_type_id = false)]
+public enum Foo {
+       BAR,
+       BAZ
+}
+
+void main () {
+}
diff --git a/tests/errors/errordomain.vala b/tests/errors/errordomain.vala
new file mode 100644 (file)
index 0000000..4de3880
--- /dev/null
@@ -0,0 +1,6 @@
+errordomain Foo {
+       BAD;
+}
+
+void main () {
+}
diff --git a/tests/errors/method-throws.vala b/tests/errors/method-throws.vala
new file mode 100644 (file)
index 0000000..a1a384b
--- /dev/null
@@ -0,0 +1,5 @@
+void foo () throws Error {
+}
+
+void main () {
+}
diff --git a/tests/objects/compact-class.vala b/tests/objects/compact-class.vala
new file mode 100644 (file)
index 0000000..8c64bb8
--- /dev/null
@@ -0,0 +1,7 @@
+[Compact]
+class Foo {
+       public void* p;
+}
+
+void main () {
+}
diff --git a/tests/structs/struct-no-gtype.vala b/tests/structs/struct-no-gtype.vala
new file mode 100644 (file)
index 0000000..c918776
--- /dev/null
@@ -0,0 +1,7 @@
+[CCode (has_type_id = false)]
+struct Foo {
+       public void* p;
+}
+
+void main () {
+}