28using lumiera::error::LUMIERA_ERROR_ASSERTION;
37 using std::placeholders::_1;
38 using std::placeholders::_2;
66 function<
void(
int,
char)>
bindFunc = bind (testFunc,_1,_2);
90 return testFunc(
'a'-
'A', c);
103 f1.getFun<
Sig1>() (-11,
'M');
104 CHECK (_sum_ ==
'M'-11);
107 f2.getFun<
Sig1>() (-22,
'M');
108 CHECK (_sum_ ==
'M'-22);
112 CHECK (_sum_ ==
'x'-33);
116 CHECK (_sum_ ==
'u');
152 FP fun1 = &
f1.getFun<
void(
int,
char)>();
153 FP fun2 = &
f2.getFun<
void(
int,
char)>();
158 CHECK (_sum_ == 10+
'a');
161 CHECK (_sum_ == 10+
'a'+20+
'b');
164 CHECK (_sum_ == 10+
'a'+20+
'b'+30+
'c');
166 CHECK (_sum_ == (
f3.getFun<
int(
void)>()) () );
176 FP fun1 = &
f1.getFun<
void(
int,
char)>();
177 FP fun2 = &
f2.getFun<
void(
int,
char)>();
182 CHECK (_sum_ == 10+
'a');
185 CHECK (_sum_ == 10+
'a'+20+
'b');
188 CHECK (_sum_ == 10+
'a'+20+
'b'+30+
'c');
190 CHECK (_sum_ == (
f3.getFun<
int(
void)>()) () );
dummy functions to support unit testing of function metaprogramming helpers
Lumiera error handling (C++ interface).
Generic holder for functor objects, concealing the concrete function type.
Implementation namespace for support and library code.
Test runner and basic definitions for tests.
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.
#define INSTANCEOF(CLASS, EXPR)
shortcut for subclass test, intended for assertions only.