General Purpose library for Freestanding C++ and POSIX systems
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
966 B

4 years ago
4 years ago
4 years ago
  1. #include "test_scaffold.h"
  2. #include "gp_config.hpp"
  3. #include "meta_test.cpp"
  4. #include "gp_test.cpp"
  5. #include "bloomfilter.cpp"
  6. #include "quotient_filter.cpp"
  7. #include <iostream>
  8. int main()
  9. {
  10. uint failed = 0;
  11. uint runned = 0;
  12. for(auto& test : tests)
  13. {
  14. ++runned;
  15. int value;
  16. //try{
  17. value = test->run();
  18. if(value)
  19. {
  20. std::cout << std::dec << test->name << " failed with "<< value << std::endl;
  21. }
  22. /*} catch (gp::runtime_error err) {
  23. std::cout << test->name << " failed with an exception: " << err.what() << std::endl;
  24. value = -1;
  25. } catch (gp_config::assert_failure err) {
  26. std::cout << test->name << " failed with an assertion failure: " << err.what() << std::endl;
  27. value = -1;
  28. } catch (...) {
  29. std::cout << test->name << " failed with an exception" << std::endl;
  30. value = -1;
  31. }*/
  32. failed += (value != 0);
  33. }
  34. std::cout << std::dec << "Runned "<<runned<<" tests with "<<failed<<" failures" << std::endl;
  35. return 0;
  36. }