[vala/staging: 3/9] tests: Extend "detailed signal" test to increase coverage



commit abbdfddde0809831f23b3951a8a90007411888dc
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun Mar 10 18:14:09 2019 +0100

    tests: Extend "detailed signal" test to increase coverage

 tests/objects/bug566909.vala | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/tests/objects/bug566909.vala b/tests/objects/bug566909.vala
index 0af250b9d..ae97c4d81 100644
--- a/tests/objects/bug566909.vala
+++ b/tests/objects/bug566909.vala
@@ -6,13 +6,16 @@ class Maman.Foo : Object {
 void main () {
        bool detailed1 = false;
        bool detailed2 = false;
+       bool detailed3 = false;
        string detail1 = "detail1";
        string detail2 = "detail2";
 
        var foo = new Maman.Foo ();
        foo.bar[detail1].connect (() => { detailed1 = true; });
        foo.bar[detail2].connect (() => { detailed2 = true; });
+       foo.bar["detail3"].connect (() => { detailed3 = true; });
        foo.bar[detail1] ();
        foo.bar[detail2] ();
-       assert (detailed1 && detailed2);
+       foo.bar["detail3"] ();
+       assert (detailed1 && detailed2 && detailed3);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]