General Purpose library for Freestanding C++ and POSIX systems
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

30 rader
661 B

  1. #include "test_scaffold.h"
  2. #include "meta_test.cpp"
  3. #include "shared_fd.cpp"
  4. #include "rc6_generic.cpp"
  5. #include "gp_test.cpp"
  6. #include "bloomfilter.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 (...) {
  23. std::cout << test->name << " failed with an exception" << std::endl;
  24. value = -1;
  25. }
  26. failed += (value != 0);
  27. }
  28. std::cout << std::dec << "Runned "<<runned<<" tests with "<<failed<<" failures" << std::endl;
  29. return 0;
  30. }