Autodetection: Added support for Unit Tests (CppUTest test runner)

pull/900/head
Przemek Wirkus 2015-01-30 10:32:53 +00:00
parent 035714e409
commit 2a07aea5ab
1 changed files with 7 additions and 3 deletions

View File

@ -10,8 +10,12 @@ It is declared in \cpputest\src\Platforms\armcc\UtestPlatform.cpp
*/
Serial mbed_cpputest_console(STDIO_UART_TX, STDIO_UART_RX);
int main(int ac, char** av)
{
int main(int ac, char** av) {
TEST_TIMEOUT(20);
TEST_HOSTTEST(default_auto);
TEST_DESCRIPTION(Unit test);
TEST_START("UT");
unsigned failureCount = 0;
{
// Some compilers may not pass ac, av so we need to supply them ourselves
@ -20,6 +24,6 @@ int main(int ac, char** av)
failureCount = CommandLineTestRunner::RunAllTests(ac, av);
}
notify_completion(failureCount == 0);
TEST_RESULT(failureCount == 0);
return failureCount;
}