Skip to content

Commit

Permalink
[Tests] Change name of macro local variable to avoid clashes
Browse files Browse the repository at this point in the history
The name st is used extensively throughout the code, so
using the same name here can cause shadowing problems or
hide typos like the one fixed in the previous commit.
  • Loading branch information
amadio authored and abh3 committed Apr 17, 2023
1 parent 590a9fd commit a594125
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/common/CppUnitXrdHelpers.hh
Expand Up @@ -25,18 +25,18 @@

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

#define CPPUNIT_ASSERT_XRDST( x ) \
{ \
XrdCl::XRootDStatus st = x; \
XrdCl::XRootDStatus _st = x; \
std::string msg = "["; msg += #x; msg += "]: "; \
msg += st.ToStr(); \
CPPUNIT_ASSERT_MESSAGE( msg, st.IsOK() ); \
msg += _st.ToStr(); \
CPPUNIT_ASSERT_MESSAGE( msg, _st.IsOK() ); \
}

#define CPPUNIT_ASSERT_ERRNO( x ) \
Expand Down

0 comments on commit a594125

Please sign in to comment.