MCPcopy Index your code
hub / github.com/DaveGamble/cJSON / UnityPrintMask

Function UnityPrintMask

tests/unity/src/unity.c:233–257  ·  view source on GitHub ↗

-----------------------------------------------*/

Source from the content-addressed store, hash-verified

231
232/*-----------------------------------------------*/
233void UnityPrintMask(const UNITY_UINT mask, const UNITY_UINT number)
234{
235 UNITY_UINT current_bit = (UNITY_UINT)1 << (UNITY_INT_WIDTH - 1);
236 UNITY_INT32 i;
237
238 for (i = 0; i < UNITY_INT_WIDTH; i++)
239 {
240 if (current_bit & mask)
241 {
242 if (current_bit & number)
243 {
244 UNITY_OUTPUT_CHAR('1');
245 }
246 else
247 {
248 UNITY_OUTPUT_CHAR('0');
249 }
250 }
251 else
252 {
253 UNITY_OUTPUT_CHAR('X');
254 }
255 current_bit = current_bit >> 1;
256 }
257}
258
259/*-----------------------------------------------*/
260#ifndef UNITY_EXCLUDE_FLOAT_PRINT

Callers 1

UnityAssertBitsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…