Using nested tie to workaround implementations with a maximum tuple size of 10.

refs #182
This commit is contained in:
Mathew Sutcliffe
2014-03-23 21:11:19 +00:00
parent e1e024e62e
commit c847237505
2 changed files with 7 additions and 1 deletions

View File

@@ -338,7 +338,7 @@ namespace BlackMisc
} // namespace
// o.m_metar, o.m_voiceRoom
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAtcStation, (o.m_callsign, o.m_controller, o.m_frequency, o.m_position, o.m_range, o.m_isOnline, o.m_distanceToPlane, o.m_atis, o.m_bookedFromUtc, o.m_bookedUntilUtc))
BLACK_DECLARE_TUPLE_CONVERSION(BlackMisc::Aviation::CAtcStation, (o.m_callsign, o.m_controller, o.m_frequency, o.m_position, o.m_range, o.m_isOnline, o.m_distanceToPlane, o.m_atis, o.m_bookedFromUtc, tie(o.m_bookedUntilUtc, o.m_metar, o.m_voiceRoom)))
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAtcStation)
#endif // guard

View File

@@ -168,6 +168,12 @@ namespace BlackMiscTest
CCallsign call1("EDDS_N_APP");
CCallsign call2("eddsnapp");
QVERIFY2(call1 == call2, "Callsigns shall be equal");
CAtcStation atc1(c1, user1, f1, situation1.getPosition(), CLength(), false, QDateTime(), QDateTime(), CInformationMessage(CInformationMessage::ATIS, "foo"));
CAtcStation atc2(c1, user1, f1, situation1.getPosition(), CLength(), false, QDateTime(), QDateTime(), CInformationMessage(CInformationMessage::ATIS, "foo"));
CAtcStation atc3(c1, user1, f1, situation1.getPosition(), CLength(), false, QDateTime(), QDateTime(), CInformationMessage(CInformationMessage::ATIS, "bar"));
QVERIFY2(atc1 == atc2, "ATC stations shall be equal");
QVERIFY2(atc1 != atc3, "ATC stations shall not be equal");
}
} // namespace