MCPcopy Create free account
hub / github.com/cpputest/cpputest / assertBinaryEqual

Method assertBinaryEqual

src/CppUTest/Utest.cpp:498–507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496}
497
498void UtestShell::assertBinaryEqual(const void *expected, const void *actual, size_t length, const char* text, const char *fileName, size_t lineNumber, const TestTerminator& testTerminator)
499{
500 getTestResult()->countCheck();
501 if (length == 0) return;
502 if (actual == NULLPTR && expected == NULLPTR) return;
503 if (actual == NULLPTR || expected == NULLPTR)
504 failWith(BinaryEqualFailure(this, fileName, lineNumber, (const unsigned char *) expected, (const unsigned char *) actual, length, text), testTerminator);
505 if (SimpleString::MemCmp(expected, actual, length) != 0)
506 failWith(BinaryEqualFailure(this, fileName, lineNumber, (const unsigned char *) expected, (const unsigned char *) actual, length, text), testTerminator);
507}
508
509void UtestShell::assertBitsEqual(unsigned long expected, unsigned long actual, unsigned long mask, size_t byteCount, const char* text, const char *fileName, size_t lineNumber, const TestTerminator& testTerminator)
510{

Callers

nothing calls this directly

Calls 2

BinaryEqualFailureClass · 0.85
countCheckMethod · 0.45

Tested by

no test coverage detected