diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-12-07 09:22:20 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-12-07 16:35:26 +0100 |
commit | 5b7ae27fc42f114c65e444fe052c3ecdcfadbccf (patch) | |
tree | 58dcf458bd0e1d70524356989a226100f44c8444 | |
parent | 7adb3a45bb8d663c0cfca55af26b7e6f7292b14a (diff) | |
download | vala-5b7ae27fc42f114c65e444fe052c3ecdcfadbccf.tar.gz |
tests: Add "emit order" tests
-rw-r--r-- | tests/Makefile.am | 4 | ||||
-rw-r--r-- | tests/ordering/delegate-class.vala | 11 | ||||
-rw-r--r-- | tests/ordering/delegate-enum.vala | 9 | ||||
-rw-r--r-- | tests/ordering/delegate-interface.vala | 9 | ||||
-rw-r--r-- | tests/ordering/delegate-struct.vala | 9 |
5 files changed, 42 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index 6f276d659..a4b93c1c5 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -521,6 +521,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 () { +} |