cpputest for mbed-6

Files at this revision

API Documentation at this revision

Comitter:
jreiss
Date:
Wed Jun 24 14:41:53 2020 +0000
Parent:
2:82161d9e7b36
Commit message:
Change to UnbufferedSerial class.

Changed in this revision

src/Platforms/armcc/UtestPlatform.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/src/Platforms/armcc/UtestPlatform.cpp	Thu Jun 19 08:24:31 2014 +0100
+++ b/src/Platforms/armcc/UtestPlatform.cpp	Wed Jun 24 14:41:53 2020 +0000
@@ -192,7 +192,7 @@
   fflush(stdout);
 }
 
-#include "Serial.h"
+#include "UnbufferedSerial.h"
 using namespace mbed;
 
 int PlatformSpecificPutchar(int c)
@@ -202,18 +202,18 @@
      * Serial object connected to the console. */
 #define NEED_TEST_REPORT_AS_CONSOLE_OUTPUT 1
 #if NEED_TEST_REPORT_AS_CONSOLE_OUTPUT
-    extern Serial console;
+    extern UnbufferedSerial console;
 
     #define NEED_LINE_FEED_IN_ADDITION_TO_NEWLINE 1
     #if NEED_LINE_FEED_IN_ADDITION_TO_NEWLINE
     /* CppUTest emits \n line terminators in its reports; some terminals
      * need the linefeed (\r) in addition. */
     if (c == '\n') {
-        console.putc('\r');
+        console.write("\r", 1);
     }
     #endif /* #if NEED_LINE_FEED_IN_ADDITION_TO_NEWLINE */
 
-    return (console.putc(c));
+    return (console.write(&c, 1));
 #else /* NEED_TEST_REPORT_AS_CONSOLE_OUTPUT */
     return (0);
 #endif /* NEED_TEST_REPORT_AS_CONSOLE_OUTPUT */