| 10 | using namespace pj_raster; |
| 11 | |
| 12 | TEST(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 | |
| 23 | TEST(RasterIpcProtocol, ShmSizeAndOffsetsAreConsistent) { |
| 24 | const uint32_t w = 640, h = 400, bpp = 4; |
nothing calls this directly
no test coverage detected