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.
 
 

37 rindas
966 B

#include "test_scaffold.h"
#include "gp_config.hpp"
#include "meta_test.cpp"
#include "gp_test.cpp"
#include "bloomfilter.cpp"
#include "quotient_filter.cpp"
#include <iostream>
int main()
{
uint failed = 0;
uint runned = 0;
for(auto& test : tests)
{
++runned;
int value;
//try{
value = test->run();
if(value)
{
std::cout << std::dec << test->name << " failed with "<< value << std::endl;
}
/*} catch (gp::runtime_error err) {
std::cout << test->name << " failed with an exception: " << err.what() << std::endl;
value = -1;
} catch (gp_config::assert_failure err) {
std::cout << test->name << " failed with an assertion failure: " << err.what() << std::endl;
value = -1;
} catch (...) {
std::cout << test->name << " failed with an exception" << std::endl;
value = -1;
}*/
failed += (value != 0);
}
std::cout << std::dec << "Runned "<<runned<<" tests with "<<failed<<" failures" << std::endl;
return 0;
}