General Purpose library for Freestanding C++ and POSIX systems
Vous ne pouvez pas sélectionner plus de 25 sujets
Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
|
#include "test_scaffold.h"
|
|
#include "meta_test.cpp"
|
|
#include "shared_fd.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 << test->name << " failed with "<< value << std::endl;
|
|
}
|
|
} catch (...) {
|
|
std::cout << test->name << " failed with an exception" << std::endl;
|
|
value = -1;
|
|
}
|
|
failed += (value != 0);
|
|
}
|
|
std::cout << "Runned "<<runned<<" tests with "<<failed<<" failures" << std::endl;
|
|
return 0;
|
|
}
|