the ASSERT will test the argument and report if the argument is false.
In your particular example (the msdn example of CString::Find), the ASSERT will be triggered if the result of
CString::Find
is not what is expected.
in the first instance, the result is and must be 2 ( c is at position 2 (zero based) in the string; if the result is something else, then the ASSERT will be triggered and a warning will be posted to the user.
It should be noted that ASSERTs will only be executed in DEBUG mode, meaning that the code in the argument will not be executed; most of the time it is not a big issue because we test the RESULT of the expression, not the expression itself :
CString s( "abcdef" );
bool result = s.Find( 'c' ) == 2;
ASSERT(result);