configure unity a bit

This commit is contained in:
hathach 2013-01-27 16:26:25 +07:00
parent 9a1bda1633
commit b57e6e1121
2 changed files with 35 additions and 32 deletions

View File

@ -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);
}
//-----------------------------------------------

View File

@ -8,6 +8,8 @@
#define UNITY_FRAMEWORK_H
#define UNITY
#define UNITY_EXCLUDE_FLOAT
#define UNITY_EXCLUDE_DOUBLE
#include "unity_internals.h"