1 # ifndef CPPAD_UTILITY_TEST_BOOLOFVOID_HPP
2 # define CPPAD_UTILITY_TEST_BOOLOFVOID_HPP
110 { std::cout <<
"Begin test group " <<
group_ << std::endl; }
113 { std::cout <<
"End test group " <<
group_ << std::endl; }
118 "test_boolofvoid: name does not have less characters than width"
120 std::cout.width(
width_ );
121 std::cout.setf( std::ios_base::left );
126 { std::cout <<
"OK" << std::endl;
130 { std::cout <<
"Error" << std::endl;
144 std::cout.width(
width_ );
145 std::cout.setf( std::ios_base::left );
146 std::cout <<
"memory_leak";
149 { std::cout <<
"OK" << std::endl;
153 { std::cout <<
"Error" << std::endl;
157 std::cout <<
"All " <<
n_ok_ <<
" tests passed." << std::endl;
159 std::cout <<
n_error_ <<
" tests failed." << std::endl;
#define CPPAD_ASSERT_KNOWN(exp, msg)
Check that exp is true, if not print msg and terminate execution.
One class object is used to run a group of tests.
~test_boolofvoid(void)
destructor
const std::string group_
name for the group of test this object will run
bool summary(bool memory_ok)
summary
Define the CppAD error checking macros (all of which begin with CPPAD_ASSERT_)
size_t n_error(void) const
nuber of tests that failed
size_t n_error_
number of tests that have failed
bool operator()(bool test(void), const std::string &name)
run one test
size_t n_ok(void) const
nuber of tests that passed
size_t n_ok_
number of tests that have passed
test_boolofvoid(const std::string &group, size_t width)
ctor
const size_t width_
number of characters used to display the name for each indiviual test (must be larger than the number...