13#define DEBUG_EARTH_TIME
42#define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), s)
44#define BASE_LOG(s) STAMPED_EMERGENCY_LOG(program_wide_logger::get(), s)
67void test_earth_time::run_test_01()
77 ASSERT_EQUAL(checker_1, compare_1,
"normalize should not fail test 1");
82 ASSERT_EQUAL(checker_2, compare_2,
"normalize should not fail test 2");
87 ASSERT_EQUAL(checker_3, compare_3,
"normalize should not fail test 3");
92 ASSERT_EQUAL(checker_4, compare_4,
"normalize should not fail test 4");
97 ASSERT_EQUAL(checker_5, compare_5,
"normalize should not fail test 5");
100void test_earth_time::run_test_02()
110 ASSERT_EQUAL(checker_1, compare_1,
"normalize should not fail test 1");
115 ASSERT_EQUAL(checker_2, compare_2,
"normalize should not fail test 2");
124void test_earth_time::run_test_03()
140int test_earth_time::execute()
150 return final_report();
The application_shell is a base object for console programs.
virtual int execute()=0
< retrieves the command line from the /proc hierarchy on linux.
Provides a dynamically resizable ASCII character string.
static void alert_message(const char *info, const char *title="Alert Message")
shows the message in "info", with an optional "title" on the message.
A specific point in time as represented by a 24 hour clock.
static time_number normalize(clock_time &to_fix)
@ MERIDIAN
default: uses 12 hour with AM/PM and no seconds.
@ MILITARY
use military 24 hour time.
@ MILLISECONDS
milliseconds are fourth field (after secs).
@ SECONDS
include the number of seconds as a third field.
An object that represents a particular day in a year.
@ LONG_MONTH
uses full month name.
@ INCLUDE_DAY
adds the name of the day.
An object that represents a particular point in time.
static time_number normalize(time_locus &to_fix)
Same as text_form() above, but stores into "to_stuff".
@ LONG_YEAR
default: full four digit year (problems in 9999).
basis::astring text_form_long(int t=clock_time::MERIDIAN, int d=day_in_year::SHORT_MONTH, int y=LONG_YEAR) const
#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.
#define HOOPLE_MAIN(obj_name, obj_args)
options that should work for most unix and linux apps.
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.
time_locus greenwich_now()
returns Greenwich Mean Time (their now).
time_locus now()
returns our current locus in the time continuum.
Useful support functions for unit testing, especially within hoople.
#define ASSERT_EQUAL(a, b, test_name)