diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-07-31 17:00:10 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2018-08-01 08:02:53 +0200 |
commit | ed1ba8c6cdf8cd0d796b258d22f6977ce2502702 (patch) | |
tree | 02726b116608af765cbc18ed564271941c3e87cf /tests/methods | |
parent | 93cfba91bd50849a74e372cf66975fcaf31dfcba (diff) | |
download | vala-ed1ba8c6cdf8cd0d796b258d22f6977ce2502702.tar.gz |
tests: Add more "method" tests to increase coverage
Diffstat (limited to 'tests/methods')
-rw-r--r-- | tests/methods/same-name.vala | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/methods/same-name.vala b/tests/methods/same-name.vala new file mode 100644 index 000000000..a62a07dd7 --- /dev/null +++ b/tests/methods/same-name.vala @@ -0,0 +1,19 @@ +interface IFoo { + public abstract bool foo (); +} + +class Foo : IFoo { + public bool IFoo.foo () { + return true; + } + + public int foo () { + return 42; + } +} + +void main () { + var foo = new Foo (); + assert (((IFoo) foo).foo ()); + assert (foo.foo () == 42); +} |