26#include <boost/algorithm/string.hpp>
32using LERR_(EXCEPTION);
33using LERR_(ASSERTION);
37using boost::algorithm::is_lower;
38using boost::algorithm::is_digit;
81 std::cout <<
"Displaying types and sizes....\n";
92 CHECK (1 ==
sizeof (rmpf1));
93 CHECK (2 ==
sizeof (rmpf2));
94 CHECK (3 ==
sizeof (rmpf3));
96 cout << showSizeof<char>(
"just a char") << endl;
100 cout << showSizeof<Wrmpf3>() << endl;
102 string{
"Universe"}) << endl;
111 Wrmpf1
const& cr = r;
112 Wrmpf1
const* cp = &r;
126 CHECK (0 == garN.size());
128 typedef function<bool(string::value_type)> ChPredicate;
129 ChPredicate is_OK (is_lower() or is_digit());
131 string garM =
randStr(1000000);
132 for_each (garM, is_OK);
160 int equilibrium = 42;
165 CHECK (49 == equilibrium);
167 CHECK (42 == equilibrium);
176 CHECK (55 == equilibrium);
178 throw "RRRrrevenge!!!!!!!!!!!!!!!!1!!11!!";
181 CHECK (42 == equilibrium);
182 CHECK (
Time(555,5) == day_of_reckoning);
187 .cleanUp ([&]{ equilibrium /= 2; });
189 CHECK (42 == equilibrium);
190 CHECK (
Time(110,11) == day_of_reckoning);
192 CHECK (
Time(110,11) == day_of_reckoning);
193 CHECK (21 == equilibrium);
verifies the proper working of helper functions frequently used within the Lumiera testsuite.
void checkLocalManipulation()
a mutable time value, behaving like a plain number, allowing copy and re-accessing
Lumiera's internal time value datatype.
static const Time ANYTIME
border condition marker value. ANYTIME <= any time value
Interface and Base definition for all Lumiera Exceptions.
Lumiera error handling (C++ interface).
string showSizeof(size_t siz, string name)
for printing sizeof().
string randStr(size_t len)
create garbage string of given length
Implementation namespace for support and library code.
Test runner and basic definitions for tests.
disable_if< can_IterForEach< Container >, FUN > for_each(Container const &coll, FUN doIt)
operate on all elements of a STL container.
Simplistic test class runner.
#define LAUNCHER(_TEST_CLASS_, _GROUPS_)
A collection of frequently used helper functions to support unit testing.
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
a family of time value like entities and their relationships.
#define TRANSIENTLY(_OO_)
Macro to simplify capturing assignments.
Perform operations "for each element" of a collection.