unit_tests.hpp
Macros to facilitate unit testing.
This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2015-2019 Michigan State University MIT Software license; see doc/LICENSE.md
- Todo:
Setup proper command line color handling (probably in its own file.)
Add EMP_TEST_BELOW, EMP_TEST_ABOVE, and EMP_TEST_RANGE to ensure that a value is in a certain range.
Consider adding EMP_TEST_ASSERT to ensure that the contained value is true.
Consider adding EMP_TEST_APPROX to compare within a tolerance level.
Note
Status: RESURGENT (Was deprecated; now back to ALPHA)
Functions
-
static UnitTestOutput &GetUnitTestOutput()
-
struct UnitTestOutput
- #include <unit_tests.hpp>
Public Members
-
UnitTestOutput::Mode verbose = UnitTestOutput::Mode::NORMAL
-
size_t num_tests = 0
-
size_t errors = 0
-
bool abort = false
-
UnitTestOutput::Mode verbose = UnitTestOutput::Mode::NORMAL