18 using namespace basis;
24 #undef UNIT_BASE_THIS_OBJECT
25 #define UNIT_BASE_THIS_OBJECT testing
26 #undef static_class_name
27 #define static_class_name() astring("system_checkup")
31 FUNCDEF(
"check_system_characteristics")
34 int byte_size =
sizeof(
abyte);
35 ASSERT_EQUAL(byte_size, 1,
"byte size should be 1 byte");
36 int int16_size =
sizeof(
int16);
38 "uint16 size should be 2 bytes");
39 int uint_size =
sizeof(
un_int);
41 ASSERT_FALSE( (uint_size !=
sizeof(
int)) || (uint_size != 4),
42 "un_int size should be 2 bytes");
47 #undef UNIT_BASE_THIS_OBJECT
48 #define UNIT_BASE_THIS_OBJECT (*this)
49 #undef static_class_name
#define FUNCDEF(func_in)
FUNCDEF sets the name of a function (and plugs it into the callstack).
The guards collection helps in testing preconditions and reporting errors.
unsigned char abyte
A fairly important unit which is seldom defined...
unsigned int un_int
Abbreviated name for unsigned integers.
A logger that sends to the console screen using the standard output device.
bool check_system_characteristics(unit_base &testing)
Useful support functions for unit testing, especially within hoople.
#define ASSERT_EQUAL(a, b, test_name)
#define ASSERT_FALSE(a, test_name)