projects
/
feisty_meow.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
a bunch of cleaning to get wayward unit tests passing on windows. not there yet.
[feisty_meow.git]
/
nucleus
/
library
/
tests_nodes
/
test_symbol_tree.cpp
diff --git
a/nucleus/library/tests_nodes/test_symbol_tree.cpp
b/nucleus/library/tests_nodes/test_symbol_tree.cpp
index ef9917c45d44e34cc1d0feb5e0cf4964a348c9c8..8d4b2a151cc29e7dc28980fe8d36463de0a2d258 100644
(file)
--- a/
nucleus/library/tests_nodes/test_symbol_tree.cpp
+++ b/
nucleus/library/tests_nodes/test_symbol_tree.cpp
@@
-46,22
+46,26
@@
using namespace unit_test;
#define DEBUG_SYMBOL_TREE
#define DEBUG_SYMBOL_TREE
-class test_symbol_tree : public virtual unit_base, virtual public application_shell
+// how many nodes we add to the tree.
+const int MAX_NODES_TESTED = 40000;
+
+class test_symbol_tree : public unit_base, public application_shell
{
public:
{
public:
- test_symbol_tree() {}
+ test_symbol_tree()
: unit_base()
{}
DEFINE_CLASS_NAME("test_symbol_tree");
int execute();
};
int test_symbol_tree::execute()
{
DEFINE_CLASS_NAME("test_symbol_tree");
int execute();
};
int test_symbol_tree::execute()
{
+ FUNCDEF("execute");
LOG("please check memory usage and record it, then hit a key to start testing.");
try {
symbol_tree t("blork");
symbol_tree *curr = &t;
LOG("please check memory usage and record it, then hit a key to start testing.");
try {
symbol_tree t("blork");
symbol_tree *curr = &t;
- for (int i = 0; i <
40000
; i++) {
+ for (int i = 0; i <
MAX_NODES_TESTED
; i++) {
// if the current node has any branches, we'll jump on one as the next
// place.
if (curr->branches()) {
// if the current node has any branches, we'll jump on one as the next
// place.
if (curr->branches()) {
@@
-78,6
+82,13
@@
int test_symbol_tree::execute()
return 1;
}
return 1;
}
+LOG("got out of the loop");
+
+//one assertion to tickle final report.
+ bool farp = true;
+ ASSERT_TRUE(farp, "tickling reporting for assertions");
+//hmmm: above shouldn't be needed at all.
+
LOG("check memory usage after the run. then hit a key to end "
"the program.");
LOG("check memory usage after the run. then hit a key to end "
"the program.");