equal
deleted
inserted
replaced
117 << ": expected " << (expected) \ |
117 << ": expected " << (expected) \ |
118 << ", got " << (got) << std::endl; \ |
118 << ", got " << (got) << std::endl; \ |
119 result = false; \ |
119 result = false; \ |
120 } |
120 } |
121 /** |
121 /** |
|
122 * Convenience macro to check that a value returned by a test is what |
|
123 * is expected. Note: this macro assumes a 'bool result = true' |
|
124 * declaration exists in the test function body, and that the function |
|
125 * returns that value. |
|
126 * |
|
127 * \param got value obtained from the test |
|
128 * \param expected value that the test is expected to return |
|
129 */ |
|
130 #define NS_TEST_ASSERT_UNEQUAL(got, expected) \ |
|
131 if ((got) == (expected)) \ |
|
132 { \ |
|
133 Failure () << __FILE__ << ":" <<__LINE__ \ |
|
134 << ": did not want " << (expected) \ |
|
135 << ", got " << (got) << std::endl; \ |
|
136 result = false; \ |
|
137 } |
|
138 /** |
122 * Convenience macro to check an assertion is held during an unit |
139 * Convenience macro to check an assertion is held during an unit |
123 * test. Note: this macro assumes a 'bool result = true' declaration |
140 * test. Note: this macro assumes a 'bool result = true' declaration |
124 * exists in the test function body, and that the function returns |
141 * exists in the test function body, and that the function returns |
125 * that value. |
142 * that value. |
126 * |
143 * |