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.

45 rindas
1.2 KiB

pirms 5 gadiem
pirms 4 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 4 gadiem
pirms 5 gadiem
pirms 5 gadiem
pirms 5 gadiem
  1. #include "gp_config.hpp"
  2. #include "allocator.hpp"
  3. #include "bloomfilter.cpp"
  4. #include "cbor_test.cpp"
  5. #include "gp_test.cpp"
  6. #include "math.cpp"
  7. #include "meta_test.cpp"
  8. #include "pair_test.cpp"
  9. #include "quotient_filter.cpp"
  10. #include "test_scaffold.h"
  11. #include <iostream>
  12. alignas(2048) gp::array<char, 4096> static_mapper::store;
  13. gp::buddy<> static_mapper::impl = gp::buddy<>{store.begin().data, store.size()};
  14. int main()
  15. {
  16. uint failed = 0;
  17. uint runned = 0;
  18. for(auto& test : tests)
  19. {
  20. ++runned;
  21. int value;
  22. try{
  23. value = test->run();
  24. if(value)
  25. {
  26. std::cout << std::dec << test->name << " failed with "<< value << std::endl;
  27. }
  28. } catch (gp::runtime_error err) {
  29. std::cout << test->name << " failed with an exception: " << err.what() << std::endl;
  30. value = -1;
  31. } catch (gp_config::assert_failure err) {
  32. std::cout << test->name << " failed with an assertion failure: " << err.what() << std::endl;
  33. value = -1;
  34. } catch (...) {
  35. std::cout << test->name << " failed with an exception" << std::endl;
  36. value = -1;
  37. }
  38. failed += (value != 0);
  39. }
  40. std::cout << std::dec << "Runned "<<runned<<" tests with "<<failed<<" failures" << std::endl;
  41. return 0;
  42. }