General Purpose library for Freestanding C++ and POSIX systems
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 

47 Zeilen
1.2 KiB

#include "gp_config.hpp"
#include "allocator.hpp"
#include "bloomfilter.cpp"
#include "cbor_test.cpp"
#include "channel_test.cpp"
#include "gp_test.cpp"
#include "math.cpp"
#include "meta_test.cpp"
#include "pair_test.cpp"
#include "quotient_filter.cpp"
#include "test_scaffold.h"
#include <iostream>
alignas(2048) gp::array<char, 4096> static_mapper::store;
gp::buddy<> static_mapper::impl = gp::buddy<>{store.begin().data, store.size()};
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;
}