Go to the documentation of this file.
40 #ifndef GNSSTK_TEST_FACTORYCOUNTER_HPP
41 #define GNSSTK_TEST_FACTORYCOUNTER_HPP
49 #define FCASSERTE(TYPE,COUNTER,EXP,GOT,LINE) \
52 std::ostringstream ostr; \
53 ostr << std::boolalpha << "Expected " << COUNTER << "=" << EXP \
54 << ", but got " << COUNTER << "=" << GOT; \
55 testFramework.assert_equals<TYPE>(EXP, GOT, LINE, ostr.str()); \
57 catch (gnsstk::Exception &exc) \
59 std::cerr << exc << std::endl; \
60 testFramework.assert(false, \
61 "Exception evaluating " #EXP " or " #GOT, \
66 testFramework.assert(false, \
67 "Exception evaluating " #EXP " or " #GOT, \
73 template <
class Alm,
class Eph,
class TimeOffs,
class Health,
class Iono,
110 for (
const auto& i : navOut)
112 if (
dynamic_cast<Alm*
>(i.get()) !=
nullptr)
116 else if (
dynamic_cast<Eph*
>(i.get()) !=
nullptr)
120 else if (
dynamic_cast<TimeOffs*
>(i.get()) !=
nullptr)
124 else if (
dynamic_cast<Health*
>(i.get()) !=
nullptr)
128 else if (
dynamic_cast<Iono*
>(i.get()) !=
nullptr)
132 else if (
dynamic_cast<GrpDelay*
>(i.get()) !=
nullptr)
151 unsigned ionoExp = 0,
153 unsigned otherExp = 0)
157 FCASSERTE(
unsigned,
"summed total", totalExp,
158 almExp+ephExp+toExp+heaExp+ionoExp+iscExp+otherExp, lineNo);
160 totalExp = ((
almInc ? almExp : 0) + (
ephInc ? ephExp : 0) +
163 FCASSERTE(
size_t,
"total", totalExp, navOut.size(), lineNo);
187 #endif // GNSSTK_TEST_FACTORYCOUNTER_HPP
std::set< NavMessageType > NavMessageTypeSet
Set of message types, used by NavLibrary and NavDataFactory.
unsigned almCount
Counts of messages, set by countResults.
@ ISC
Inter-signal corrections.
void setInc(const gnsstk::NavMessageTypeSet &nmts)
@ Health
SV health status information message.
std::list< NavDataPtr > NavDataPtrList
void validateResults(gnsstk::NavDataPtrList &navOut, unsigned lineNo, size_t totalExp=0, unsigned almExp=0, unsigned ephExp=0, unsigned toExp=0, unsigned heaExp=0, unsigned ionoExp=0, unsigned iscExp=0, unsigned otherExp=0)
void countResults(const gnsstk::NavDataPtrList &navOut)
gnsstk::TestUtil & testFramework
TestUtil object to use when assertions are integrated.
@ Iono
Ionospheric correction data.
@ TimeOffset
Message containing information about time system offsets.
@ Ephemeris
Precision orbits for the transmitting SV.
#define FCASSERTE(TYPE, COUNTER, EXP, GOT, LINE)
FactoryCounter(gnsstk::TestUtil &tf)
@ Almanac
Low-precision orbits for other than the transmitting SV.
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39