// Test this class by running all of its assertion tests void HelpCommand::test() { UtlMemCheck* pUtlMemCheck = 0; pUtlMemCheck = new UtlMemCheck(); // checkpoint for memory leak check testCreators(); testManipulators(); testAccessors(); testInquiry(); assert(pUtlMemCheck->delta() == 0); // check for memory leak delete pUtlMemCheck; }
int main() { // ================= test constructors and mutators TBST tree1; for(int i=0; i < 7; i++) { tree1.insert(str(i)); } assert(tree1.remove("0")); TBST tree2(tree1); TBST tree3 = tree2; int oldHeight = tree1.getHeight(); tree1.selfBalance(); assert(oldHeight < tree1.getHeight()); // ================= test accessors testAccessors(tree1, tree2); // ================= test traversors testTraversors(tree1, tree2, tree3); }
/** * TODO: Documentation * <p> */ void testSuite() { try { setUp(); testConstruction(); tearDown(); setUp(); testAccessors(); tearDown(); setUp(); testXdr(); tearDown(); } catch (ontologydto::Exception ex) { std::cout << ex.getMessage() << std::endl; } catch (...) { std::cout << "Unknown" << std::endl; } }