General Purpose library for Freestanding C++ and POSIX systems
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

26 строки
537 B

5 лет назад
  1. #include "test_scaffold.cpp"
  2. #include "meta_test.cpp"
  3. #include <iostream>
  4. int main()
  5. {
  6. uint failed = 0;
  7. uint runned = 0;
  8. for(auto& test : tests)
  9. {
  10. ++runned;
  11. int value;
  12. try{
  13. value = test->run();
  14. if(value)
  15. {
  16. std::cout << test->name << " failed with "<< value << std::endl;
  17. }
  18. } catch (...) {
  19. std::cout << test->name << " failed with an exception" << std::endl;
  20. value = -1;
  21. }
  22. failed += (value != 0);
  23. }
  24. std::cout << "Runned "<<runned<<" tests with "<<failed<<" failures" << std::endl;
  25. return 0;
  26. }