mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-25 23:38:06 +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)
|
void UnityPrint(const char* string)
|
||||||
{
|
{
|
||||||
const char* pch = string;
|
// const char* pch = string;
|
||||||
|
//
|
||||||
if (pch != NULL)
|
// if (pch != NULL)
|
||||||
{
|
// {
|
||||||
while (*pch)
|
// while (*pch)
|
||||||
{
|
// {
|
||||||
// printable characters plus CR & LF are printed
|
// // printable characters plus CR & LF are printed
|
||||||
if ((*pch <= 126) && (*pch >= 32))
|
// if ((*pch <= 126) && (*pch >= 32))
|
||||||
{
|
// {
|
||||||
UNITY_OUTPUT_CHAR(*pch);
|
// UNITY_OUTPUT_CHAR(*pch);
|
||||||
}
|
// }
|
||||||
//write escaped carriage returns
|
// //write escaped carriage returns
|
||||||
else if (*pch == 13)
|
// else if (*pch == 13)
|
||||||
{
|
// {
|
||||||
UNITY_OUTPUT_CHAR('\\');
|
// UNITY_OUTPUT_CHAR('\\');
|
||||||
UNITY_OUTPUT_CHAR('r');
|
// UNITY_OUTPUT_CHAR('r');
|
||||||
}
|
// }
|
||||||
//write escaped line feeds
|
// //write escaped line feeds
|
||||||
else if (*pch == 10)
|
// else if (*pch == 10)
|
||||||
{
|
// {
|
||||||
UNITY_OUTPUT_CHAR('\\');
|
// UNITY_OUTPUT_CHAR('\\');
|
||||||
UNITY_OUTPUT_CHAR('n');
|
// UNITY_OUTPUT_CHAR('n');
|
||||||
}
|
// }
|
||||||
// unprintable characters are shown as codes
|
// // unprintable characters are shown as codes
|
||||||
else
|
// else
|
||||||
{
|
// {
|
||||||
UNITY_OUTPUT_CHAR('\\');
|
// UNITY_OUTPUT_CHAR('\\');
|
||||||
UnityPrintNumberHex((_U_SINT)*pch, 2);
|
// UnityPrintNumberHex((_U_SINT)*pch, 2);
|
||||||
}
|
// }
|
||||||
pch++;
|
// pch++;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
printf (string);
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
@ -8,6 +8,8 @@
|
|||||||
#define UNITY_FRAMEWORK_H
|
#define UNITY_FRAMEWORK_H
|
||||||
|
|
||||||
#define UNITY
|
#define UNITY
|
||||||
|
#define UNITY_EXCLUDE_FLOAT
|
||||||
|
#define UNITY_EXCLUDE_DOUBLE
|
||||||
|
|
||||||
#include "unity_internals.h"
|
#include "unity_internals.h"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user