From e4a57e27d2875da090a2c0bedb1964071b2bae0a Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 11 Feb 2016 22:13:36 +0100 Subject: [PATCH] complete the sending of state mark notifications ...everything working out of the box thus far, which is remarkable, since I didn't write a single line of implementation code beyond what's available as basic bus functionality. So this one just fell into place --- tests/gui/abstract-tangible-test.cpp | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/tests/gui/abstract-tangible-test.cpp b/tests/gui/abstract-tangible-test.cpp index 826ff00bd..957957862 100644 --- a/tests/gui/abstract-tangible-test.cpp +++ b/tests/gui/abstract-tangible-test.cpp @@ -213,6 +213,7 @@ namespace test { void verify_mockManipulation () { + MARK_TEST_FUN MockElm mock("dummy"); CHECK (mock.verify("ctor")); @@ -418,6 +419,28 @@ namespace test { CHECK (nexusLog.verifyCall("note").arg(targetID, GenNode{"expand", true}) .before("handling state-mark")); + + trigger_collapse(); // emit other signal + CHECK (not mock.isExpanded()); + CHECK (mock.isTouched()); + + CHECK (nexusLog.verifyCall("note").arg(targetID, GenNode{"expand", true}) + .before("handling state-mark") + .beforeCall("note").arg(targetID, GenNode{"expand", false}) + .before("handling state-mark")); + + trigger_collapse(); + CHECK (not mock.isExpanded()); + CHECK (mock.verifyEvent("create", "target") + .beforeEvent("expanded") + .beforeEvent("collapsed")); + CHECK (nexusLog.verifyCall("note").arg(targetID, GenNode{"expand", true}) + .before("handling state-mark") + .beforeCall("note").arg(targetID, GenNode{"expand", false}) + .before("handling state-mark") + .beforeCall("note").arg(targetID, GenNode{"expand", false}) + .before("handling state-mark")); + ////////////////////////////////////////////////////////////TODO: WIP cout << "____Event-Log_________________\n" << util::join(mock.getLog(), "\n") @@ -427,8 +450,6 @@ namespace test { << util::join(nexusLog, "\n") << "\n───╼━━━━━━━━━╾────────────────"<