-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #350 from rianquinn/unittest_cxx_io
Libcxx Unit Test Cleanup
- Loading branch information
Showing
12 changed files
with
752 additions
and
531 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
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
41 changes: 41 additions & 0 deletions
41
bfvmm/include/exit_handler/exit_handler_intel_x64_unittests.h
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// | ||
// Bareflank Hypervisor | ||
// | ||
// Copyright (C) 2015 Assured Information Security, Inc. | ||
// Author: Rian Quinn <[email protected]> | ||
// Author: Brendan Kerrigan <[email protected]> | ||
// | ||
// This library 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 2.1 of the License, or (at your option) any later version. | ||
// | ||
// This library 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 | ||
// Lesser General Public License for more details. | ||
// | ||
// You should have received a copy of the GNU Lesser General Public | ||
// License along with this library; if not, write to the Free Software | ||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | ||
|
||
#ifndef EXIT_HANDLER_INTEL_X64_UNITTESTS_H | ||
#define EXIT_HANDLER_INTEL_X64_UNITTESTS_H | ||
|
||
#include <gsl/gsl> | ||
|
||
#include <debug.h> | ||
#include <exit_handler/exit_handler_intel_x64.h> | ||
|
||
inline void | ||
expect_true_with_args(bool cond, const char *func, int line) | ||
{ if (!cond) throw std::runtime_error("unittest failed ["_s + std::to_string(line) + "]: "_s + func); } | ||
|
||
inline void | ||
expect_false_with_args(bool cond, const char *func, int line) | ||
{ if (cond) throw std::runtime_error("unittest failed ["_s + std::to_string(line) + "]: "_s + func); } | ||
|
||
#define expect_true(a) expect_true_with_args(a, __FUNC__, __LINE__); | ||
#define expect_false(a) expect_false_with_args(a, __FUNC__, __LINE__); | ||
|
||
#endif |
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
Oops, something went wrong.