25 #define LOG(to_print) EMERGENCY_LOG(program_wide_logger::get(), to_print)
29 using namespace basis;
56 int test_unique_id::execute()
62 ASSERT_TRUE(ted.raw_id(),
"testing non-zero should not claim was zero");
63 ASSERT_TRUE(!jed,
"testing zero should claim was zero");
64 ASSERT_TRUE(!!ted,
"testing non-zero doubled should not claim was zero");
65 ASSERT_TRUE(!!!jed,
"testing zero doubled should claim was zero");
70 ASSERT_EQUAL(med.raw_id(), ted.raw_id(),
"testing equality 1 should have correct result");
71 ASSERT_EQUAL(fed.raw_id(), jed.
raw_id(),
"testing equality 2 should have correct result");
73 ASSERT_INEQUAL(fed.raw_id(), ted.raw_id(),
"testing equality 4 should have correct result");
75 ASSERT_FALSE(med != ted,
"equality operator 1 should have correct result");
76 ASSERT_FALSE(fed != jed,
"equality operator 2 should have correct result");
77 ASSERT_FALSE(med == jed,
"equality operator 3 should have correct result");
78 ASSERT_FALSE(fed == ted,
"equality operator 4 should have correct result");
80 return final_report();
The application_shell is a base object for console programs.
uniquifier raw_id() const
Returns the held identifier in its native form.
A unique identifier based on integers.
#define DEFINE_CLASS_NAME(objname)
Defines the name of a class by providing a couple standard methods.
#define FUNCDEF(func_in)
FUNCDEF sets the name of a function (and plugs it into the callstack).
Provides macros that implement the 'main' program of an application.
Implements an application lock to ensure only one is running at once.
The guards collection helps in testing preconditions and reporting errors.
A platform independent way to obtain the timestamp of a file.
A logger that sends to the console screen using the standard output device.
An extension to floating point primitives providing approximate equality.
A dynamic container class that holds any kind of object via pointers.
Useful support functions for unit testing, especially within hoople.
HOOPLE_MAIN(test_unique_id,)
#define ASSERT_EQUAL(a, b, test_name)
#define ASSERT_TRUE(a, test_name)
#define ASSERT_FALSE(a, test_name)
#define ASSERT_INEQUAL(a, b, test_name)