Play-/tools/SpuTest/Main.cpp

25 lines
461 B
C++
Raw Permalink Normal View History

2020-12-28 20:54:11 -05:00
#include <functional>
2020-12-30 16:31:00 -05:00
#include "KeyOnOffTest.h"
2020-12-28 20:54:11 -05:00
#include "SimpleIrqTest.h"
typedef std::function<CTest*()> TestFactoryFunction;
// clang-format off
static const TestFactoryFunction s_factories[] =
{
2020-12-30 16:31:00 -05:00
[]() { return new CKeyOnOffTest(); },
2020-12-28 20:54:11 -05:00
[]() { return new CSimpleIrqTest(); },
};
// clang-format on
int main(int argc, const char** argv)
{
for(const auto& factory : s_factories)
{
auto test = factory();
test->Execute();
delete test;
}
return 0;
}