General Purpose library for Freestanding C++ and POSIX systems
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

26 行
537 B

  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. }