4 class DevNull
: public Stream
{
6 DevNull(const char *name
= NULL
) : Stream(name
) {}
12 virtual int _putc(int c
) {
20 MBED_HOSTTEST_TIMEOUT(20);
21 MBED_HOSTTEST_SELECT(dev_null_auto
);
22 MBED_HOSTTEST_DESCRIPTION(stdout redirected to dev null
);
23 MBED_HOSTTEST_START("EXAMPLE_1");
25 printf("MBED: re-routing stdout to /null\r\n");
26 freopen("/null", "w", stdout
);
27 printf("MBED: printf redirected to /null\r\n"); // This shouldn't appear
28 // If failure message can be seen test should fail :)
29 MBED_HOSTTEST_RESULT(false); // This is 'false' on purpose