From: Rico Tzschichholz Date: Mon, 23 Sep 2019 15:38:44 +0000 (+0200) Subject: tests: Add "qualified member/symbol access" tests to increase coverage X-Git-Tag: 0.44.9~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4fba7f98e3aa53c503d72e8a89c6b91cbf74380;p=thirdparty%2Fvala.git tests: Add "qualified member/symbol access" tests to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 2fad21b56..c4891db2f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -578,6 +578,8 @@ TESTS = \ parser/property-no-virtual-override.test \ parser/property-set-must-have-body.test \ parser/property-set-redefined.test \ + parser/qualified-member-access.vala \ + parser/qualified-symbol-access.vala \ parser/signal-no-class.test \ parser/signal-no-static.test \ parser/statement-outside-root.test \ diff --git a/tests/parser/qualified-member-access.vala b/tests/parser/qualified-member-access.vala new file mode 100644 index 000000000..ffa73487e --- /dev/null +++ b/tests/parser/qualified-member-access.vala @@ -0,0 +1,16 @@ +namespace Bar { + void foo () { + assert_not_reached (); + } + + void bar () { + global::foo (); + } +} + +void foo () { +} + +void main () { + Bar.bar (); +} diff --git a/tests/parser/qualified-symbol-access.vala b/tests/parser/qualified-symbol-access.vala new file mode 100644 index 000000000..d4d83ebdf --- /dev/null +++ b/tests/parser/qualified-symbol-access.vala @@ -0,0 +1,18 @@ +namespace Bar { + class Foo { + public Foo () { + assert_not_reached (); + } + } + + void bar () { + new global::Foo (); + } +} + +class Foo { +} + +void main () { + Bar.bar (); +}