WTTLogAssert function
The WTTLogAssert function checks the specified condition and, if the condition is false, fails the test case unless a trace is logged or you specifically declare the test case to be "skipped".
Syntax
HRESULT WTTLogAssert(
LONG hDevice,
BOOL fCondition,
LPWSTR pwszFile,
UINT uiLine,
LPWSTR pwszUserMsg
);
Parameters
hDevice
[in] A handle to the device tracing topology. You can combine multiple handles by using the bitwise OR operator (for example, hDevice1 OR hDevice2).fCondition
[in] A Boolean value that specifies whether the function should prevent the test case from failing if the bug trace is not logged. If this parameter is true, the function prevents the test case from failing if the bug trace is not logged. If this parameter is false, the function fails the test case unless the bug trace is logged.pwszFile
[in] The name of the source file where the assert happened.uiLine
[in] The line number within the source file where the assert happened.pwszUserMsg
[in] The text message of the assertion.
Return value
WTTLogAssert returns one of the following values:
Return code | Description |
---|---|
S_OK | The operation was successful. |
S_FALSE | The operation was successful but the last device has been detached, which has triggered a rollup. |
HRESULT | The operation failed. You should use the FAILED macro to check HRESULT values. |
Requirements
Header |
Wttlogger.h |
Library |
WTTLog.dll |
See also
Build date: 9/14/2012