35 #include <boost/algorithm/string.hpp> 41 using LERR_(EXCEPTION);
42 using LERR_(ASSERTION);
46 using boost::algorithm::is_lower;
47 using boost::algorithm::is_digit;
65 void doThrow() {
throw Error(
"because I feel like it"); }
66 int dontThrow() {
return 2+2; }
82 checkLocalManipulation();
90 std::cout <<
"Displaying types and sizes....\n";
101 CHECK (1 ==
sizeof (rmpf1));
102 CHECK (2 ==
sizeof (rmpf2));
103 CHECK (3 ==
sizeof (rmpf3));
105 cout << showSizeof<char>(
"just a char") << endl;
109 cout << showSizeof<Wrmpf3>() << endl;
111 string{
"Universe"}) << endl;
120 Wrmpf1
const& cr = r;
121 Wrmpf1
const* cp = &r;
135 CHECK (0 == garN.size());
137 typedef function<bool(string::value_type)> ChPredicate;
138 ChPredicate is_OK (is_lower() || is_digit());
140 string garM =
randStr(1000000);
141 for_each (garM, is_OK);
157 // and when actually no exception is raised, this is an ASSERTION failure 169 int equilibrium = 42;
174 CHECK (49 == equilibrium);
176 CHECK (42 == equilibrium);
185 CHECK (55 == equilibrium);
187 throw "RRRrrevenge!!!!!!!!!!!!!!!!1!!11!!";
190 CHECK (42 == equilibrium);
191 CHECK (
Time(555,5) == day_of_reckoning);
196 .cleanUp ([&]{ equilibrium /= 2; });
198 CHECK (42 == equilibrium);
199 CHECK (
Time(110,11) == day_of_reckoning);
201 CHECK (
Time(110,11) == day_of_reckoning);
202 CHECK (21 == equilibrium);
static const Time ANYTIME
border condition marker value. ANYTIME <= any time value
a mutable time value, behaving like a plain number, allowing copy and re-accessing ...
#define TRANSIENTLY(_OO_)
Macro to simplify capturing assignments.
void checkLocalManipulation()
#define VERIFY_ERROR(ERROR_ID, ERRONEOUS_STATEMENT)
Macro to verify that a statement indeed raises an exception.
string showSizeof(size_t siz, string name)
for printing sizeof().
Implementation namespace for support and library code.
string randStr(size_t len)
create garbage string of given length
Lumiera's internal time value datatype.
verifies the proper working of helper functions frequently used within the Lumiera testsuite...
Simple test class runner.
void for_each(CON const &elements, FUN function, P1 &&bind1, ARGS &&...args)
Accept binding for arbitrary function arguments.
A collection of frequently used helper functions to support unit testing.
Lumiera error handling (C++ interface).
a family of time value like entities and their relationships.
Perform operations "for each element" of a collection.
Interface and Base definition for all Lumiera Exceptions.