MCPcopy Create free account
hub / github.com/MEONMedical/Log4Qt / testBinaryClassLogger

Method testBinaryClassLogger

tests/binaryloggertest/binaryloggertest.cpp:309–320  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

307}
308
309void BinaryLoggerTest::testBinaryClassLogger()
310{
311 auto clogger = logger();
312
313 clogger->debug(QByteArray("Hello world!"));
314
315 char expected[] = {0x0c, 0x00, 0x00, 0x00, 0x48, 0x65, 0x6c, 0x6c,
316 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21
317 };
318
319 QCOMPARE(flushLogger(clogger), QByteArray(expected, elementsInArray(expected)));
320}
321
322void BinaryLoggerTest::testBinaryLayout()
323{

Callers

nothing calls this directly

Calls 3

elementsInArrayFunction · 0.85
QByteArrayClass · 0.70
debugMethod · 0.45

Tested by

no test coverage detected