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

Function UnityAssertBits

src/unity.c:691–709  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

689
690/*-----------------------------------------------*/
691void UnityAssertBits(const UNITY_INT mask,
692 const UNITY_INT expected,
693 const UNITY_INT actual,
694 const char* msg,
695 const UNITY_LINE_TYPE lineNumber)
696{
697 RETURN_IF_FAIL_OR_IGNORE;
698
699 if ((mask & expected) != (mask & actual))
700 {
701 UnityTestResultsFailBegin(lineNumber);
702 UnityPrint(UnityStrExpected);
703 UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)expected);
704 UnityPrint(UnityStrWas);
705 UnityPrintMask((UNITY_UINT)mask, (UNITY_UINT)actual);
706 UnityAddMsgIfSpecified(msg);
707 UNITY_FAIL_AND_BAIL;
708 }
709}
710
711/*-----------------------------------------------*/
712void UnityAssertEqualNumber(const UNITY_INT expected,

Callers

nothing calls this directly

Calls 4

UnityPrintFunction · 0.85
UnityPrintMaskFunction · 0.85
UnityAddMsgIfSpecifiedFunction · 0.85

Tested by

no test coverage detected