[vala/0.42] tests: Add some minimal test cases to catch insufficient headers
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.42] tests: Add some minimal test cases to catch insufficient headers
- Date: Mon, 26 Nov 2018 09:15:04 +0000 (UTC)
commit 56aafa4f464ef55a27f0ad85cb971948adb247c0
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Wed Nov 21 17:00:19 2018 +0100
tests: Add some minimal test cases to catch insufficient headers
tests/Makefile.am | 6 ++++++
tests/delegates/delegate_only.vala | 4 ++++
tests/enums/enum-no-gtype.vala | 8 ++++++++
tests/errors/errordomain.vala | 6 ++++++
tests/errors/method-throws.vala | 5 +++++
tests/objects/compact-class.vala | 7 +++++++
tests/structs/struct-no-gtype.vala | 7 +++++++
7 files changed, 43 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 262e5fa93..6b0261be6 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
index 000000000..7484e21de
--- /dev/null
+++ b/tests/delegates/delegate_only.vala
@@ -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
index 000000000..e0c9c2a10
--- /dev/null
+++ b/tests/enums/enum-no-gtype.vala
@@ -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
index 000000000..4de388089
--- /dev/null
+++ b/tests/errors/errordomain.vala
@@ -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
index 000000000..a1a384b58
--- /dev/null
+++ b/tests/errors/method-throws.vala
@@ -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
index 000000000..8c64bb82d
--- /dev/null
+++ b/tests/objects/compact-class.vala
@@ -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
index 000000000..c918776f4
--- /dev/null
+++ b/tests/structs/struct-no-gtype.vala
@@ -0,0 +1,7 @@
+[CCode (has_type_id = false)]
+struct Foo {
+ public void* p;
+}
+
+void main () {
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]