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 committed Apr 13, 2023
1 parent c20746d commit 8184523
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/common/CppUnitXrdHelpers.hh
Original file line number Diff line number Diff line change
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 8184523

Please sign in to comment.