[vala/0.42] tests: Add "emit order" tests
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.42] tests: Add "emit order" tests
- Date: Tue, 18 Dec 2018 09:32:07 +0000 (UTC)
commit 7ca4d198a6ca1d23104f430638d5053c3af59c01
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Dec 7 09:22:20 2018 +0100
tests: Add "emit order" tests
tests/Makefile.am | 4 ++++
tests/ordering/delegate-class.vala | 11 +++++++++++
tests/ordering/delegate-enum.vala | 9 +++++++++
tests/ordering/delegate-interface.vala | 9 +++++++++
tests/ordering/delegate-struct.vala | 9 +++++++++
5 files changed, 42 insertions(+)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9782996bd..689ce3537 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -511,6 +511,10 @@ TESTS = \
resolver/class-base-cycle.test \
resolver/interface-prerequisite-cycle.test \
resolver/struct-base-cycle.test \
+ ordering/delegate-class.vala \
+ ordering/delegate-enum.vala \
+ ordering/delegate-interface.vala \
+ ordering/delegate-struct.vala \
semantic/array-stacked.test \
semantic/array-incompatible-initializer.test \
semantic/array-incompatible-initializer2.test \
diff --git a/tests/ordering/delegate-class.vala b/tests/ordering/delegate-class.vala
new file mode 100644
index 000000000..d72327f61
--- /dev/null
+++ b/tests/ordering/delegate-class.vala
@@ -0,0 +1,11 @@
+[CCode (has_target = false)]
+delegate Foo Func (Foo p);
+
+class Foo {
+ public Func foo (Func p) {
+ return p;
+ }
+}
+
+void main () {
+}
diff --git a/tests/ordering/delegate-enum.vala b/tests/ordering/delegate-enum.vala
new file mode 100644
index 000000000..54c2d8f89
--- /dev/null
+++ b/tests/ordering/delegate-enum.vala
@@ -0,0 +1,9 @@
+[CCode (has_target = false)]
+delegate Foo Func (Foo p);
+
+enum Foo {
+ BAR;
+}
+
+void main () {
+}
diff --git a/tests/ordering/delegate-interface.vala b/tests/ordering/delegate-interface.vala
new file mode 100644
index 000000000..f8befa2c7
--- /dev/null
+++ b/tests/ordering/delegate-interface.vala
@@ -0,0 +1,9 @@
+[CCode (has_target = false)]
+delegate Foo Func (Foo p);
+
+interface Foo {
+ public abstract Func foo (Func p);
+}
+
+void main () {
+}
diff --git a/tests/ordering/delegate-struct.vala b/tests/ordering/delegate-struct.vala
new file mode 100644
index 000000000..3898423fc
--- /dev/null
+++ b/tests/ordering/delegate-struct.vala
@@ -0,0 +1,9 @@
+[CCode (has_target = false)]
+delegate Foo Func (Foo p);
+
+struct Foo {
+ public int i;
+}
+
+void main () {
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]