From: Rico Tzschichholz Date: Fri, 7 Dec 2018 08:22:20 +0000 (+0100) Subject: tests: Add "emit order" tests X-Git-Tag: 0.43.2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b7ae27fc42f114c65e444fe052c3ecdcfadbccf;p=thirdparty%2Fvala.git tests: Add "emit order" tests --- 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 () { +}