xrootd
Defines
CppUnitXrdHelpers.hh File Reference
#include <XrdCl/XrdClXRootDResponses.hh>
#include <errno.h>
#include <string.h>
Include dependency graph for CppUnitXrdHelpers.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CPPUNIT_ASSERT_XRDST_NOTOK(x, err)
#define CPPUNIT_ASSERT_XRDST(x)
#define CPPUNIT_ASSERT_ERRNO(x)
#define CPPUNIT_ASSERT_PTHREAD(x)

Define Documentation

#define CPPUNIT_ASSERT_ERRNO (   x)
Value:
{                                                    \
  std::string msg = "["; msg += #x; msg += "]: ";    \
  msg += strerror( errno );                          \
  CPPUNIT_ASSERT_MESSAGE( msg, x );                  \
}

Referenced by forkAndRead(), and FileCopyTest::UploadTestFunc().

#define CPPUNIT_ASSERT_PTHREAD (   x)
Value:
{                                                    \
  errno = x;                                         \
  std::string msg = "["; msg += #x; msg += "]: ";    \
  msg += strerror( errno );                          \
  CPPUNIT_ASSERT_MESSAGE( msg, errno == 0 );         \
}

Referenced by ThreadingTest::ReadTestFunc().

#define CPPUNIT_ASSERT_XRDST (   x)
#define CPPUNIT_ASSERT_XRDST_NOTOK (   x,
  err 
)
Value:
{                                                    \
  XrdCl::XRootDStatus st = x;                        \
  std::string msg = "["; msg += #x; msg += "]: ";    \
  msg += st.ToStr();                                 \
  CPPUNIT_ASSERT_MESSAGE( msg, !st.IsOK() && st.code == err ); \
}

Referenced by PostMasterTest::FunctionalTest(), and PostMasterTest::MultiIPConnectionTest().