Skip to main content
Known Participant
December 27, 2007
Question

What is the main difference berween ASSERT() and ASSERT_FAIL() #macros

  • December 27, 2007
  • 1 reply
  • 294 views
What is the main difference berween ASSERT() and ASSERT_FAIL() #macros

I suppose that in ASSERT we can't pass any message but in ASSERT_FAIL we can pass our own custom message along with the ASSERT Dialog.

Also there is no condition check in case of ASSERT_FAIL but in case of ASSERT we can check some condition.

Thanks,
Rizwan
This topic has been closed for replies.

1 reply

Inspiring
January 23, 2008
ASSERT takes a boolean expression and displays a dialog with the expression if it evaluates to false.

ASSERT_MSG takes a boolean expression and a string, displaying the string if the expression is false.

ASSERT_FAIL takes a string and always displays it.

Jon