refs #325, testing new applyIf method

This commit is contained in:
Klaus Basan
2014-09-21 18:36:55 +02:00
parent 31646b91f6
commit 6795158c7e
2 changed files with 34 additions and 5 deletions

View File

@@ -14,7 +14,7 @@
#include "blackmisc/avionavsystem.h"
#include "blackmisc/aviotransponder.h"
#include "blackmisc/avatcstationlist.h"
#include "blackmisc/indexvariantmap.h"
#include "blackmisc/propertyindexallclasses.h"
#include "blackmisc/predicates.h"
#include "blackmisc/blackmiscfreefunctions.h"
#include <QDebug>
@@ -59,7 +59,7 @@ namespace BlackMiscTest
qDebug() << atcList.toQString();
// put Jane in the tower
CIndexVariantMap newController;
CPropertyIndexVariantMap newController;
newController.addValue(CAtcStation::IndexController, QVariant::fromValue(CUser("112233", "Jane Doe")));
atcList.applyIf(
BlackMisc::Predicates::MemberEqual(&CAtcStation::getCallsign, CCallsign("eddm_twr")),
@@ -68,7 +68,7 @@ namespace BlackMiscTest
qDebug() << atcList.toQString();
// now Jane's time is over
CIndexVariantMap anotherController;
CPropertyIndexVariantMap anotherController;
anotherController.addValue(CAtcStation::IndexController, QVariant::fromValue(CUser("445566", "Fuzzy")));
atcList.applyIf(newController, anotherController);