Go to the documentation of this file.
46 s << static_cast<int>(v);
51 s << static_cast<int>(v);
56 s << static_cast<int>(v);
66 #define STRMASSERT(EXP, FD, VAL) \
68 std::ostringstream oss; \
70 std::string formatted = oss.str(); \
71 TUCSM("operator<<"); \
72 TUASSERTE(std::string, EXP, formatted); \
73 std::istringstream iss(formatted); \
74 gnsstk::FormattedDouble fdin(FD.totalLen, FD.exponentChar); \
76 TUCSM("operator>>"); \
77 TUASSERTFE(VAL, fdin.val); \
78 gnsstk::FormattedDouble fdin2(FD); \
80 TUCSM("operator=(string)"); \
81 TUASSERTFE(VAL, fdin2.val); \
97 TUDEF(
"FormattedDouble",
"");
106 TUCSM(
"FormattedDouble(double,...)");
131 TUCSM(
"FormattedDouble(unsigned,char)");
150 TUDEF(
"FormattedDouble",
"operator<<");
192 STRMASSERT(
"+0.1234E+0001", t10, +0.1234E+0001);
203 STRMASSERT(
"-0.1234E+0001", t20, -0.1234E+0001);
212 TUDEF(
"FormattedDouble",
"operator=(double)");
218 double foo = t1 * 123.0;
219 TUCSM(
"operator double()");
224 TUCSM(
"operator=(double)");
255 TUDEF(
"FormattedDouble",
"");
263 TUCSM(
"operator/(double)");
276 TUCSM(
"operator*(double)");
295 unsigned errorTotal = 0;
301 std::cout <<
"Total Failures for " << __FILE__ <<
": " << errorTotal
@ Left
Formatted output will be left-aligned.
#define TUASSERTE(TYPE, EXP, GOT)
@ NegPos
Prefix output with a minus sign (neg) or plus sign (pos)
@ Right
Formatted output will be right-aligned.
FFLead
Leading character for floatFormat(), after any whitespace or sign.
@ NegOnly
Prefix output with a minus sign (neg) or nothing (pos)
@ Zero
Start with zero, e.g. 0.12345.
@ NegSpace
Prefix output with a minus sign (neg) or space (pos)
@ Decimal
Start with decimal, e.g. .12345.
@ NonZero
Start with the first non-zero digit, e.g. 1.2345.
#define TUDEF(CLASS, METHOD)
std::ostream & operator<<(std::ostream &s, gnsstk::StringUtils::FFLead v)
FFSign
How to handle sign in floatFormat()
#define TUASSERTFE(EXP, GOT)
FFAlign
Alignment of data for floatFormat()
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39