MCPcopy Index your code
hub / github.com/ThrowTheSwitch/Unity / UnityPrintMask

Function UnityPrintMask

src/unity.c:299–323  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

297
298/*-----------------------------------------------*/
299void UnityPrintMask(const UNITY_UINT mask, const UNITY_UINT number)
300{
301 UNITY_UINT current_bit = (UNITY_UINT)1 << (UNITY_INT_WIDTH - 1);
302 UNITY_INT32 i;
303
304 for (i = 0; i < UNITY_INT_WIDTH; i++)
305 {
306 if (current_bit & mask)
307 {
308 if (current_bit & number)
309 {
310 UNITY_OUTPUT_CHAR('1');
311 }
312 else
313 {
314 UNITY_OUTPUT_CHAR('0');
315 }
316 }
317 else
318 {
319 UNITY_OUTPUT_CHAR('X');
320 }
321 current_bit = current_bit >> 1;
322 }
323}
324
325/*-----------------------------------------------*/
326#ifndef UNITY_EXCLUDE_FLOAT_PRINT

Callers 2

UnityAssertBitsFunction · 0.85
unity.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected