General Purpose library for Freestanding C++ and POSIX systems
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

38 行
1018 B

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