32 using namespace basis;
36 using namespace nodes;
42 #define LOG(to_print) EMERGENCY_LOG(program_wide_logger().get(), astring(to_print))
57 int test_symbol_tree::execute()
73 astring rando = string_manipulation::make_random_name(1, 10);
76 #ifdef DEBUG_TEST_SYMBOL_TREE
77 LOG(
"about to whack dynamic tree...");
81 #ifdef DEBUG_TEST_SYMBOL_TREE
82 LOG(
"dynamic tree whacked.");
85 #ifdef DEBUG_TEST_SYMBOL_TREE
86 LOG(
"crashed during tree stuffing.");
91 ASSERT_TRUE(
true,
"testing succeeded without cleanup crashes");
98 return final_report();
The application_shell is a base object for console programs.
Provides a dynamically resizable ASCII character string.
A symbol table that supports scope nesting and/or trees of symbol tables.
bool add(symbol_tree *to_add)
adds a child to this symbol_tree.
symbol_tree * branch(int index) const
returns the "index"th branch.
virtual int branches() const
Returns the number of branches currently connected to this tree.
#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 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.
const int MAX_NODES_TESTED
#define ASSERT_EQUAL(a, b, test_name)
#define ASSERT_TRUE(a, test_name)