Some fixes / tweaks / Doxygen:

* helper method to detect disconnected state
* clear ATC info if disconnected or not available
* unit test for "finders"
* added Doxygen file
* formatting frequency in text message tabs
This commit is contained in:
Klaus Basan
2014-06-25 18:59:21 +02:00
parent 378712592e
commit abd2d6d86d
11 changed files with 89 additions and 26 deletions

View File

@@ -4,8 +4,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "testcontainers.h"
#include "blackmisc/blackmiscfreefunctions.h"
#include "blackmisc/collection.h"
#include "blackmisc/sequence.h"
#include "blackmisc/avcallsignlist.h"
#include <QList>
#include <QVector>
#include <QSet>
@@ -13,6 +15,7 @@
#include <set>
using namespace BlackMisc;
using namespace BlackMisc::Aviation;
namespace BlackMiscTest
{
@@ -109,4 +112,16 @@ namespace BlackMiscTest
QVERIFY2(c1 == c3, "Split collections");
}
} //namespace BlackMiscTest
void CTestContainers::findTests()
{
BlackMisc::registerMetadata();
CCallsignList callsigns;
CSequence<CCallsign> found = callsigns.findBy(&CCallsign::asString, "Foo");
QVERIFY2(found.isEmpty(), "Empty found");
callsigns.push_back(CCallsign("EDDM_TWR"));
callsigns.push_back(CCallsign("KLAX_TWR"));
found = callsigns.findBy(&CCallsign::asString, "KLAXTWR");
QVERIFY2(found.size() == 1, "found");
}
} //namespace BlackMiscTest