From: Rico Tzschichholz Date: Sun, 7 Jan 2018 12:13:54 +0000 (+0100) Subject: tests: Add "contains" method test to increase coverage X-Git-Tag: 0.39.4~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=724a8f90fa9704f3617a8ebc3adf758e9c004919;p=thirdparty%2Fvala.git tests: Add "contains" method test to increase coverage --- diff --git a/tests/Makefile.am b/tests/Makefile.am index 26424edcf..64fd643fe 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -64,6 +64,7 @@ TESTS = \ namespaces.vala \ methods/lambda.vala \ methods/closures.vala \ + methods/contains.vala \ methods/prepostconditions.vala \ methods/symbolresolution.vala \ methods/bug595538.vala \ diff --git a/tests/methods/contains.vala b/tests/methods/contains.vala new file mode 100644 index 000000000..1f143d4c0 --- /dev/null +++ b/tests/methods/contains.vala @@ -0,0 +1,10 @@ +class Foo { + public bool contains (int item) { + return item == 42; + } +} + +void main () { + var foo = new Foo (); + assert (42 in foo); +}