26 #include <boost/algorithm/string.hpp> 32 using LERR_(EXCEPTION);
33 using LERR_(ASSERTION);
37 using boost::algorithm::is_lower;
38 using boost::algorithm::is_digit;
56 void doThrow() {
throw Error(
"because I feel like it"); }
57 int dontThrow() {
return 2+2; }
73 checkLocalManipulation();
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() || is_digit());
131 string garM =
randStr(1000000);
132 for_each (garM, is_OK);
148 // and when actually no exception is raised, this is an ASSERTION failure 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);
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...
Simplistic 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.