MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / TEST

Function TEST

pj_app/tests/raster_ipc_protocol_test.cpp:12–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10using namespace pj_raster;
11
12TEST(RasterIpcProtocol, MessageRoundTripsEveryType) {
13 for (MsgType t : {MsgType::kNone, MsgType::kFrameReady, MsgType::kKeyDown, MsgType::kKeyUp, MsgType::kBye}) {
14 const Message in{t, 0xDEADBEEFu};
15 uint8_t bytes[kMessageBytes];
16 encodeMessage(in, bytes);
17 const Message out = decodeMessage(bytes);
18 EXPECT_EQ(static_cast<int>(out.type), static_cast<int>(t));
19 EXPECT_EQ(out.arg, 0xDEADBEEFu);
20 }
21}
22
23TEST(RasterIpcProtocol, ShmSizeAndOffsetsAreConsistent) {
24 const uint32_t w = 640, h = 400, bpp = 4;

Callers

nothing calls this directly

Calls 4

encodeMessageFunction · 0.85
decodeMessageFunction · 0.85
shmTotalSizeFunction · 0.85
bufferOffsetFunction · 0.85

Tested by

no test coverage detected