WIN_ASSERT_NOT_EQUAL
WIN_ASSERT_NOT_EQUAL allows typesafe inequality comparisons of values. WIN_ASSERT_NOT_EQUAL works analogously to WIN_ASSERT_EQUAL.
void WIN_ASSERT_NOT_EQUAL( __in T Expected, __in U Actual, ... );
T and U may either be the same type or compatible types. That is, an appropriate operator!= must have been implemented that allows objects of type T and U to be checked for inequality.
[in] Expected: The expected value.
[in] Actual: The actual value that is to be checked.
[in] ...: Optional: Message to be included in a failure report. This parameter allows printf-style formatters to be used, with the corresponding parameters being specified as subsequent arguments. The routine is overloaded and allows Message to be either a unicode or an ANSI string.
Please refer to the remarks section of CFIXCC_ASSERT_EQUALS for a discussion on how comparisons are conducted.
int Foo = 2; ... WIN_ASSERT_NOT_EQUAL( 0, Foo ); WIN_ASSERT_NOT_EQUAL( 0, Foo, "Foo should never be %s, "zero" );
Table 7.43.
User Mode | Kernel Mode | |
---|---|---|
Available since | 1.3 | N/A |
Header | Declared in winunit.h | N/A |
Library | Link to cfix.lib | N/A |
DLL | cfix.dll | N/A |
IRQL | N/A | N/A |
Requires cl version 14.00 (VisualStudio 2005) or better.