| 117 | } |
| 118 | |
| 119 | void UnityPrintLen(const char* string, const UNITY_UINT32 length) |
| 120 | { |
| 121 | const char* pch = string; |
| 122 | |
| 123 | if (pch != NULL) |
| 124 | { |
| 125 | while (*pch && (UNITY_UINT32)(pch - string) < length) |
| 126 | { |
| 127 | /* printable characters plus CR & LF are printed */ |
| 128 | if ((*pch <= 126) && (*pch >= 32)) |
| 129 | { |
| 130 | UNITY_OUTPUT_CHAR(*pch); |
| 131 | } |
| 132 | /* write escaped carriage returns */ |
| 133 | else if (*pch == 13) |
| 134 | { |
| 135 | UNITY_OUTPUT_CHAR('\\'); |
| 136 | UNITY_OUTPUT_CHAR('r'); |
| 137 | } |
| 138 | /* write escaped line feeds */ |
| 139 | else if (*pch == 10) |
| 140 | { |
| 141 | UNITY_OUTPUT_CHAR('\\'); |
| 142 | UNITY_OUTPUT_CHAR('n'); |
| 143 | } |
| 144 | /* unprintable characters are shown as codes */ |
| 145 | else |
| 146 | { |
| 147 | UNITY_OUTPUT_CHAR('\\'); |
| 148 | UNITY_OUTPUT_CHAR('x'); |
| 149 | UnityPrintNumberHex((UNITY_UINT)*pch, 2); |
| 150 | } |
| 151 | pch++; |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | /*-----------------------------------------------*/ |
| 157 | void UnityPrintNumberByStyle(const UNITY_INT number, const UNITY_DISPLAY_STYLE_T style) |
no test coverage detected
searching dependent graphs…