-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9066151
commit 0291cee
Showing
2 changed files
with
25 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,33 @@ | ||
/** Contains some of the macros found in CppUnitXrdHelpers.hh, | ||
* converted into GTest equivalent. | ||
* | ||
* Created by Angelo Galavotti in 2023. | ||
*/ | ||
//------------------------------------------------------------------------------ | ||
// Copyright (c) 2023 by European Organization for Nuclear Research (CERN) | ||
// Author: Angelo Galavotti <angelo.galavotti@cern.ch> | ||
//------------------------------------------------------------------------------ | ||
// XRootD is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU Lesser General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
// | ||
// XRootD is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public License | ||
// along with XRootD. If not, see <http://www.gnu.org/licenses/>. | ||
//------------------------------------------------------------------------------ | ||
|
||
#include <gtest/gtest.h> | ||
#include <XrdCl/XrdClXRootDResponses.hh> | ||
#include <cerrno> | ||
#include <cstring> | ||
|
||
/** @brief Equivalent of CPPUNIT_ASSERT_XRDST | ||
* | ||
* Shows the code that we are asserting and its value | ||
* in the final evaluation. | ||
* | ||
* Shows the code that we are asserting and its value | ||
* in the final evaluation. | ||
*/ | ||
#define GTEST_ASSERT_XRDST( x ) \ | ||
{ \ | ||
XrdCl::XRootDStatus _st = x; \ | ||
#define GTEST_ASSERT_XRDST( x ) \ | ||
{ \ | ||
XrdCl::XRootDStatus _st = x; \ | ||
EXPECT_TRUE(_st.IsOK()) << "[" << #x << "]: " << _st.ToStr() << std::endl; \ | ||
} |