]> git.gir.st - tmk_keyboard.git/blob - tool/mbed/mbed-sdk/libraries/tests/utest/testrunner/testrunner.cpp
Squashed 'tmk_core/' changes from 7967731..b9e0ea0
[tmk_keyboard.git] / tool / mbed / mbed-sdk / libraries / tests / utest / testrunner / testrunner.cpp
1 #include "CommandLineTestRunner.h"
2 #include <stdio.h>
3 #include "mbed.h"
4 #include "testrunner.h"
5 #include "test_env.h"
6
7 /**
8 Object 'mbed_cpputest_console' is used to show prints on console.
9 It is declared in \cpputest\src\Platforms\armcc\UtestPlatform.cpp
10 */
11 Serial mbed_cpputest_console(STDIO_UART_TX, STDIO_UART_RX);
12
13 int main(int ac, char** av) {
14 MBED_HOSTTEST_TIMEOUT(20);
15 MBED_HOSTTEST_SELECT(default_auto);
16 MBED_HOSTTEST_DESCRIPTION(Unit test);
17 MBED_HOSTTEST_START("UT");
18
19 unsigned failureCount = 0;
20 {
21 // Some compilers may not pass ac, av so we need to supply them ourselves
22 int ac = 2;
23 char* av[] = {__FILE__, "-v"};
24 failureCount = CommandLineTestRunner::RunAllTests(ac, av);
25 }
26
27 MBED_HOSTTEST_RESULT(failureCount == 0);
28 return failureCount;
29 }
Imprint / Impressum