Fixed CPPUTEST test runner for other compilers. Now we will force to pass main(argc, argv) ourselves to CPPUTEST test suite - as should be done in embedded project

pull/475/head
Przemek Wirkus 2014-08-20 11:45:31 +01:00
parent 01b0ed20f7
commit 13c3a64e3f
2 changed files with 5 additions and 1 deletions

View File

@ -9,4 +9,5 @@ TEST(FirstTestGroup, FirstTest)
/* These checks are here to make sure assertions outside test runs don't crash */
CHECK(true);
LONGS_EQUAL(1, 1);
}
STRCMP_EQUAL("Mbed SDK!", "Mbed SDK!");
}

View File

@ -14,6 +14,9 @@ int main(int ac, char** av)
{
unsigned failureCount = 0;
{
// Some compilers may not pass ac, av so we need to supply them ourselves
int ac = 2;
char* av[] = {__FILE__, "-v"};
failureCount = CommandLineTestRunner::RunAllTests(ac, av);
}