Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Sequence_Unit_Tests / test_macros.h
bloba51c08bb429e4d9d54952947aa4827584df248b5
1 #include "ace/Log_Msg.h"
3 #define FAIL_RETURN_IF(CONDITION) \
4 if (CONDITION) \
5 { \
6 ACE_ERROR ((LM_ERROR, ACE_TEXT ("\tFailed at %N:%l\n"))); \
7 return 1; \
10 #define FAIL_RETURN_IF_NOT(CONDITION, X) \
11 if (!(CONDITION)) \
12 { \
13 ACE_ERROR ((LM_ERROR, ACE_TEXT ("\tFailed at %N:%l\n"))); \
14 return 1; \
16 #define CHECK_EQUAL(X, Y) \
17 if ((X) != (Y)) \
18 { \
19 ACE_ERROR ((LM_ERROR, ACE_TEXT ("\tFailed at %N:%l\n"))); \
20 return 1; \
22 #define CHECK(X) \
23 if (!(X)) \
24 { \
25 ACE_ERROR ((LM_ERROR, ACE_TEXT ("\tFailed at %N:%l\n"))); \
26 return 1; \
29 #define CHECK_THROW(X, Y) \
30 try { \
31 X; \
32 } \
33 catch (Y const &) \
34 { \
35 } \
36 catch (...) \
37 { \
38 return 1; \
39 } \