25 LOGGER( testlog,
"test_param_value" )
31 LINFO( testlog,
"Bool Value Tests" );
32 LINFO( testlog,
"================" );
36 LINFO( testlog,
"Bool value via string: " << bool_val );
38 LINFO( testlog,
"Int Value Tests" );
39 LINFO( testlog,
"===============" );
42 int val_out = int_val.
as_int();
44 LINFO( testlog,
"Int value via int: " << val_out );
45 LINFO( testlog,
"Int value via string: " << int_val );
47 LINFO( testlog,
"String Value Tests" );
48 LINFO( testlog,
"==================" );
51 LINFO( testlog,
"String value: " << string_val );
53 string_val.
set(
"10" );
54 LINFO( testlog,
"String containing a number via as_int: " << string_val.
as_int() );
56 string_val.
set(
"true" );
57 LINFO( testlog,
"String containing a bool via as_bool: " << string_val.
as_bool() );
59 LINFO( testlog,
"Strict Equality Tests" );
60 LINFO( testlog,
"=====================" );
64 LINFO( testlog, bool_val <<
"(bool) == " << bool_val_2 <<
"(bool) ?: " << bool_val.
strict_is_equal_to(bool_val_2) );
66 LINFO( testlog, bool_val <<
"(bool) == " << bool_val_2 <<
"(bool) ?: " << bool_val.
strict_is_equal_to(bool_val_2) );
70 LINFO( testlog, string_val <<
"(string) == " << string_val_2 <<
"(string) ?: " << string_val.
strict_is_equal_to(string_val_2) );
71 string_val_2 =
"world";
72 LINFO( testlog, string_val <<
"(string) == " << string_val_2 <<
"(string) ?: " << string_val.strict_is_equal_to(string_val_2) );
77 LINFO( testlog, uint_val <<
"(uint) == " << int_val <<
"(int) ?: " << uint_val.strict_is_equal_to(int_val) );
79 LINFO( testlog, bool_val <<
"(bool) == " << string_val <<
"(string) ?: " << bool_val.
strict_is_equal_to(string_val) );
83 LINFO( testlog, double_val <<
"(double) == " << double_val_2 <<
"(double) ?: " << double_val.
strict_is_equal_to(double_val_2) );
85 LINFO( testlog, double_val <<
"(double) == " << double_val_2 <<
"(double) ?: " << double_val.strict_is_equal_to(double_val_2) );
86 LINFO( testlog, double_val <<
"(double) == " << int_val <<
"(int) ?: " << double_val.strict_is_equal_to(int_val) );
89 LINFO( testlog,
"Loose Equality Tests" );
90 LINFO( testlog,
"====================" );
94 LINFO( testlog, bool_val <<
"(bool) == " << bool_val_2 <<
"(bool) ?: " << bool_val.
loose_is_equal_to(bool_val_2) );
96 LINFO( testlog, bool_val <<
"(bool) == " << bool_val_2 <<
"(bool) ?: " << bool_val.
loose_is_equal_to(bool_val_2) );
99 string_val_2 =
"hello";
100 LINFO( testlog, string_val <<
"(string) == " << string_val_2 <<
"(string) ?: " << string_val.loose_is_equal_to(string_val_2) );
101 string_val_2 =
"world";
102 LINFO( testlog, string_val <<
"(string) == " << string_val_2 <<
"(string) ?: " << string_val.loose_is_equal_to(string_val_2) );
105 LINFO( testlog, bool_val <<
"(bool) == " << int_val <<
"(int) ?: " << bool_val.
loose_is_equal_to(int_val) );
107 LINFO( testlog, uint_val <<
"(uint) == " << int_val <<
"(int) ?: " << uint_val.loose_is_equal_to(int_val) );
109 LINFO( testlog, bool_val <<
"(bool) == " << string_val <<
"(string) ?: " << bool_val.
loose_is_equal_to(string_val) );
113 LINFO( testlog, double_val <<
"(double) == " << double_val_2 <<
"(double) ?: " << double_val.loose_is_equal_to(double_val_2) );
115 LINFO( testlog, double_val <<
"(double) == " << double_val_2 <<
"(double) ?: " << double_val.loose_is_equal_to(double_val_2) );
116 LINFO( testlog, double_val <<
"(double) == " << int_val <<
"(int) ?: " << double_val.loose_is_equal_to(int_val) );
bool strict_is_equal_to(const param_value &rhs) const
Contains the logger class and macros, based on Kasper's KLogger class.
void set(XValType a_value)
bool loose_is_equal_to(const param_value &rhs) const