| 274 | } |
| 275 | |
| 276 | void BinaryLoggerTest::testBinaryLogStream() |
| 277 | { |
| 278 | char expected[] = {0x1d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, |
| 279 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x40, |
| 280 | 0x0d, 0x00, 0x00, 0x00, 0x48, 0x65, 0x6c, 0x6c, |
| 281 | 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6c, 0x64, 0x21, |
| 282 | 0x00 |
| 283 | }; |
| 284 | { |
| 285 | Log4Qt::BinaryLogStream bls{Log4Qt::Logger::logger(binLogger), Log4Qt::Level::INFO_INT}; |
| 286 | bls << QByteArray(expected + 4, 4); |
| 287 | bls << QByteArray(expected + 8, 8) |
| 288 | << QByteArray(expected + 16, 4) |
| 289 | << QByteArray(expected + 20, 13); |
| 290 | } |
| 291 | |
| 292 | auto blogger = Log4Qt::Logger::logger(binLogger); |
| 293 | QCOMPARE(flushLogger(blogger), QByteArray(expected, elementsInArray(expected))); |
| 294 | } |
| 295 | |
| 296 | void BinaryLoggerTest::testBinaryLogger() |
| 297 | { |
nothing calls this directly
no test coverage detected