test.cc 685 B

12345678910111213141516171819202122232425262728
  1. #include "source1.h"
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6. Triehard * test = new Triehard();
  7. cout << "success! Created test" << endl;
  8. int x[3] = {0,0,0};
  9. int y[5] = {1,0,0,1,0};
  10. int z[6] = {0,0,0,0,0,1};
  11. test->insert(x, 3);
  12. cout << "success! inserted x" << endl;
  13. test->insert(y, 5);
  14. cout << "success! inserted y" << endl;
  15. test->insert(z,6);
  16. cout << "success! inserted z" << endl;
  17. //test->print();
  18. test->myPrintIsBetterThanYoursLogan();
  19. cout << "Print Done!" << endl;
  20. test->cut(x, 3);
  21. cout << "success! cut tree" << endl;
  22. test->print();
  23. //test->myPrintIsBetterThanYoursLogan();
  24. delete test;
  25. cout << "success! Completed test" << endl;
  26. //while(1);
  27. }