General Purpose library for Freestanding C++ and POSIX systems
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

27 rindas
560 B

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