99a50508a7
Not all tests will require the NavDataCache, so it is no longer set up with the dummy globals data structure.
25 lines
569 B
C++
25 lines
569 B
C++
#include "NavDataCache.hxx"
|
|
|
|
#include <Navaids/NavDataCache.hxx>
|
|
|
|
|
|
namespace FGTestApi {
|
|
|
|
namespace setUp {
|
|
|
|
void initNavDataCache()
|
|
{
|
|
flightgear::NavDataCache* cache = flightgear::NavDataCache::createInstance();
|
|
if (cache->isRebuildRequired()) {
|
|
std::cerr << "Navcache rebuild for testing" << std::flush;
|
|
|
|
while (cache->rebuild() != flightgear::NavDataCache::REBUILD_DONE) {
|
|
SGTimeStamp::sleepForMSec(1000);
|
|
std::cerr << "." << std::flush;
|
|
}
|
|
}
|
|
}
|
|
|
|
} // End of namespace setUp.
|
|
|
|
} // End of namespace FGTestApi.
|