7#include <kernel/util/memory_pool.hpp>
8#include <kernel/runtime.hpp>
15int main(
int argc,
char** argv)
20 std::cout <<
"CTEST_FULL_OUTPUT\n";
22 int result(EXIT_SUCCESS);
26 bool all_filter(
false);
27 std::list<String> labels;
28 for(
int i(1) ; i < argc ; ++i)
30 if (0 == strcmp(argv[i],
"and"))
37 if (strlen(argv[i]) > 1 && argv[i][0] ==
'-' && argv[i][1] ==
'-')
40 labels.push_back(argv[i]);
47 if (all_filter ==
false)
49 if((find(labels.begin(), labels.end(), (*i)->get_preferred_backend_name()) == labels.end()) &&
50 (find(labels.begin(), labels.end(), (*i)->get_datatype_name()) == labels.end()) &&
51 (find(labels.begin(), labels.end(), (*i)->get_index_name()) == labels.end()) )
62 for (
auto li(labels.begin()) ; li != labels.end() ; ++li)
64 if(*li != (*i)->get_preferred_backend_name() &&
65 *li != (*i)->get_datatype_name() &&
66 *li != (*i)->get_index_name())
80 size_t tests_passed(0u);
81 size_t tests_failed(0u);
82 unsigned long iterator_index(1);
88 std::cout <<
"(" << iterator_index <<
"/" << list_size <<
") " << (*i)->id()
89 <<
" [Preferred Backend: " << (*i)->get_preferred_backend_name() <<
"]"
90 <<
" [Precision: "<< (*i)->get_datatype_name() <<
"]"
91 <<
" [Indexing: "<< (*i)->get_index_name() <<
"]"
95 std::cout <<
"PASSED\n";
100 std::cout <<
"FAILED: " << (*i)->id() <<
"\n" <<
stringify(e.
what()) <<
"\n";
101 result = EXIT_FAILURE;
129 if(result == EXIT_SUCCESS)
131 std::cout <<
"All " << list_size <<
" tests PASSED!\n";
135 std::cout << tests_passed <<
" of " << list_size <<
" tests PASSED, "
136 << tests_failed <<
" tests FAILED!\n";
static void set_preferred_backend(PreferredBackend preferred_backend)
set new preferred backend
Runtime scope guard class.
exception thrown by the check method in UnitTest
virtual const char * what() const noexcept override
description
static TestList * instance()
Returns the instance.
std::list< UnitTest * >::iterator Iterator
TestList forward iterator.
Iterator erase(Iterator i)
removes iterator target from the TestList
String stringify(const T_ &item)
Converts an item into a String.