31 using namespace basis;
43 virtual int execute();
48 #undef UNIT_BASE_THIS_OBJECT
49 #define UNIT_BASE_THIS_OBJECT c_parent
54 burpee(
unit_base &parent) : c_parent(parent), my_string(new
astring) { *my_string =
"balrog"; }
59 ASSERT_FALSE(my_string,
"whack test should not fail to clear string");
69 #undef UNIT_BASE_THIS_OBJECT
73 #define UNIT_BASE_THIS_OBJECT c_parent
75 class florba :
public burpee
79 { *second_string =
"loquacious"; }
84 ASSERT_FALSE(second_string,
"whack test should clear string in derived class");
91 #undef UNIT_BASE_THIS_OBJECT
96 #define UNIT_BASE_THIS_OBJECT (*this)
98 struct testing_file_struct :
public FILE {};
104 int test_system_preconditions::execute()
108 log(
astring("The name of this software system is: ")
111 "product should not be blank");
119 for (
int q = 0; q < 198; q++) {
121 int malfoy = treno * 3;
127 ASSERT_FALSE(q > 190,
"no weirdness should happen with compiler scoping");
130 burpee *chunko =
new burpee(*
this);
131 florba *lorkas =
new florba(*
this);
132 burpee *alias = lorkas;
136 ASSERT_FALSE(chunko,
"chunko whack test should succeed");
137 ASSERT_FALSE(alias,
"aliased lorkas whack test should succeed");
138 ASSERT_TRUE(lorkas,
"original lorkas should not have been cleared");
141 ASSERT_EQUAL((
int)
sizeof(testing_file_struct), (
int)
sizeof(FILE),
142 "struct size test, sizeof testing_file_struct and sizeof FILE should not differ");
146 "required system characteristics should be found");
149 known_operating_systems os = determine_OS();
150 astring os_report =
"This OS is: ";
151 os_report += opsystem_name(os);
153 printf(os_report.
s());
156 version os_ver = application_configuration::get_OS_version();
157 printf(
"OS version: %s\n", os_ver.
text_form().
s());
159 return final_report();
The application_shell is a base object for console programs.
Provides a dynamically resizable ASCII character string.
const char * s() const
synonym for observe. the 's' stands for "string", if that helps.
Defines installation-specific locations in the file system.
Holds a file's version identifier.
virtual basis::astring text_form() const
#define NULL_POINTER
The value representing a pointer to nothing.
#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.
void WHACK(contents *&ptr)
deletion with clearing of the pointer.
A logger that sends to the console screen using the standard output device.
A dynamic container class that holds any kind of object via pointers.
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_TRUE(a, test_name)
#define ASSERT_FALSE(a, test_name)
Aids in achievement of platform independence.