Go to the documentation of this file.
19 #ifndef __CPPUNIT_XRD_HELPERS_HH__
20 #define __CPPUNIT_XRD_HELPERS_HH__
26 #define CPPUNIT_ASSERT_XRDST_NOTOK( x, err ) \
28 XrdCl::XRootDStatus st = x; \
29 std::string msg = "["; msg += #x; msg += "]: "; \
31 CPPUNIT_ASSERT_MESSAGE( msg, !st.IsOK() && st.code == err ); \
34 #define CPPUNIT_ASSERT_XRDST( x ) \
36 XrdCl::XRootDStatus st = x; \
37 std::string msg = "["; msg += #x; msg += "]: "; \
39 CPPUNIT_ASSERT_MESSAGE( msg, st.IsOK() ); \
42 #define CPPUNIT_ASSERT_ERRNO( x ) \
44 std::string msg = "["; msg += #x; msg += "]: "; \
45 msg += strerror( errno ); \
46 CPPUNIT_ASSERT_MESSAGE( msg, x ); \
49 #define CPPUNIT_ASSERT_PTHREAD( x ) \
52 std::string msg = "["; msg += #x; msg += "]: "; \
53 msg += strerror( errno ); \
54 CPPUNIT_ASSERT_MESSAGE( msg, errno == 0 ); \
57 #endif // __CPPUNIT_XRD_HELPERS_HH__