WIP: start implementing the generic UI base
This commit is contained in:
parent
a9a6aabcbc
commit
59c2d2b482
2 changed files with 18 additions and 5 deletions
|
|
@ -130,8 +130,8 @@ namespace test {
|
|||
MockElm mock("dummy");
|
||||
|
||||
CHECK (mock.verify("ctor"));
|
||||
CHECK (mock.verifyEvent("ctor"));
|
||||
CHECK (mock.verify("ctor").arg("dummy"));
|
||||
CHECK (mock.verifyEvent("create","dummy"));
|
||||
CHECK (mock.verify("ctor").arg("dummy").on(&mock));
|
||||
|
||||
CHECK ("dummy" == mock.getID().getSym());
|
||||
CHECK (EntryID<MockElm>("dummy") == mock.getID());
|
||||
|
|
@ -148,7 +148,6 @@ namespace test {
|
|||
CHECK (mock.ensureNot("reset").before("ctor"));
|
||||
CHECK (mock.ensureNot("ctor").after("reset"));
|
||||
|
||||
CHECK (mock.verify("reset").before("reset"));
|
||||
CHECK (mock.verify("reset").beforeEvent("reset"));
|
||||
CHECK (mock.verifyCall("reset").beforeEvent("reset"));
|
||||
CHECK (!mock.verifyCall("reset").afterEvent("reset"));
|
||||
|
|
|
|||
|
|
@ -84,13 +84,18 @@ namespace test{
|
|||
class MockElm
|
||||
: public gui::model::Tangible
|
||||
{
|
||||
using _Par = gui::model::Tangible;
|
||||
|
||||
EventLog log_{this};
|
||||
|
||||
|
||||
/* ==== Tangible interface ==== */
|
||||
|
||||
virtual void doReset() override
|
||||
{
|
||||
UNIMPLEMENTED ("mock doReset");
|
||||
log_.call(this, "reset");
|
||||
// _Par::doReset();
|
||||
log_.event("reset");
|
||||
}
|
||||
|
||||
virtual void doExpand() override
|
||||
|
|
@ -134,7 +139,10 @@ namespace test{
|
|||
explicit
|
||||
MockElm(ID identity, ctrl::BusTerm& nexus =Nexus::testUI())
|
||||
: gui::model::Tangible(identity, nexus)
|
||||
{ }
|
||||
{
|
||||
log_.call(this, "ctor", identity, nexus);
|
||||
log_.create(getID().getSym());
|
||||
}
|
||||
|
||||
|
||||
/* ==== special operations API ==== */
|
||||
|
|
@ -184,6 +192,12 @@ namespace test{
|
|||
return getLog().verifyEvent(match);
|
||||
}
|
||||
|
||||
EventMatch
|
||||
verifyEvent (string classifier, string match) const
|
||||
{
|
||||
return getLog().verifyEvent (classifier,match);
|
||||
}
|
||||
|
||||
EventMatch
|
||||
verifyCall (string match) const
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue