mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Using nested tie to workaround implementations with a maximum tuple size of 10.
refs #182
This commit is contained in:
@@ -338,7 +338,7 @@ namespace BlackMisc
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
// o.m_metar, o.m_voiceRoom
|
// 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)
|
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAtcStation)
|
||||||
|
|
||||||
#endif // guard
|
#endif // guard
|
||||||
|
|||||||
@@ -168,6 +168,12 @@ namespace BlackMiscTest
|
|||||||
CCallsign call1("EDDS_N_APP");
|
CCallsign call1("EDDS_N_APP");
|
||||||
CCallsign call2("eddsnapp");
|
CCallsign call2("eddsnapp");
|
||||||
QVERIFY2(call1 == call2, "Callsigns shall be equal");
|
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
|
} // namespace
|
||||||
|
|||||||
Reference in New Issue
Block a user