mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-23 15:50:49 +01:00
Add assertions on pool emptiness
This commit is contained in:
15
test.cpp
15
test.cpp
@@ -98,10 +98,17 @@ void testCursorMoveLeft() {
|
||||
assert(aChar.nodeRetainCount() == 3);
|
||||
}
|
||||
|
||||
typedef void (test)();
|
||||
void runTest(test t) {
|
||||
assert(TreePool::sharedPool()->numberOfNodes() == 0);
|
||||
t();
|
||||
assert(TreePool::sharedPool()->numberOfNodes() == 0);
|
||||
}
|
||||
|
||||
int main() {
|
||||
testAddition();
|
||||
testPoolEmpties();
|
||||
testCursorCreateAndRetain();
|
||||
testCursorMoveLeft();
|
||||
runTest(testAddition);
|
||||
runTest(testPoolEmpties);
|
||||
runTest(testCursorCreateAndRetain);
|
||||
runTest(testCursorMoveLeft);
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user