mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-23 13:20:54 +00:00
configure unity a bit
This commit is contained in:
parent
9a1bda1633
commit
b57e6e1121
65
tests/vendor/ceedling/vendor/unity/src/unity.c
vendored
65
tests/vendor/ceedling/vendor/unity/src/unity.c
vendored
@ -53,38 +53,39 @@ void UnityPrintOk(void);
|
||||
|
||||
void UnityPrint(const char* string)
|
||||
{
|
||||
const char* pch = string;
|
||||
|
||||
if (pch != NULL)
|
||||
{
|
||||
while (*pch)
|
||||
{
|
||||
// printable characters plus CR & LF are printed
|
||||
if ((*pch <= 126) && (*pch >= 32))
|
||||
{
|
||||
UNITY_OUTPUT_CHAR(*pch);
|
||||
}
|
||||
//write escaped carriage returns
|
||||
else if (*pch == 13)
|
||||
{
|
||||
UNITY_OUTPUT_CHAR('\\');
|
||||
UNITY_OUTPUT_CHAR('r');
|
||||
}
|
||||
//write escaped line feeds
|
||||
else if (*pch == 10)
|
||||
{
|
||||
UNITY_OUTPUT_CHAR('\\');
|
||||
UNITY_OUTPUT_CHAR('n');
|
||||
}
|
||||
// unprintable characters are shown as codes
|
||||
else
|
||||
{
|
||||
UNITY_OUTPUT_CHAR('\\');
|
||||
UnityPrintNumberHex((_U_SINT)*pch, 2);
|
||||
}
|
||||
pch++;
|
||||
}
|
||||
}
|
||||
// const char* pch = string;
|
||||
//
|
||||
// if (pch != NULL)
|
||||
// {
|
||||
// while (*pch)
|
||||
// {
|
||||
// // printable characters plus CR & LF are printed
|
||||
// if ((*pch <= 126) && (*pch >= 32))
|
||||
// {
|
||||
// UNITY_OUTPUT_CHAR(*pch);
|
||||
// }
|
||||
// //write escaped carriage returns
|
||||
// else if (*pch == 13)
|
||||
// {
|
||||
// UNITY_OUTPUT_CHAR('\\');
|
||||
// UNITY_OUTPUT_CHAR('r');
|
||||
// }
|
||||
// //write escaped line feeds
|
||||
// else if (*pch == 10)
|
||||
// {
|
||||
// UNITY_OUTPUT_CHAR('\\');
|
||||
// UNITY_OUTPUT_CHAR('n');
|
||||
// }
|
||||
// // unprintable characters are shown as codes
|
||||
// else
|
||||
// {
|
||||
// UNITY_OUTPUT_CHAR('\\');
|
||||
// UnityPrintNumberHex((_U_SINT)*pch, 2);
|
||||
// }
|
||||
// pch++;
|
||||
// }
|
||||
// }
|
||||
printf (string);
|
||||
}
|
||||
|
||||
//-----------------------------------------------
|
||||
|
@ -8,6 +8,8 @@
|
||||
#define UNITY_FRAMEWORK_H
|
||||
|
||||
#define UNITY
|
||||
#define UNITY_EXCLUDE_FLOAT
|
||||
#define UNITY_EXCLUDE_DOUBLE
|
||||
|
||||
#include "unity_internals.h"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user