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

Function TEST

tests/host/ipc/ipc_client_test.cpp:39–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37namespace oid::host {
38
39TEST(BufferDecode, MapsFieldsAndStepEqualsStride) {
40 std::vector<std::byte> bytes(12, std::byte{7});
41 BufferRecord r = make_buffer_record("v",
42 "disp",
43 "rgb",
44 false,
45 2,
46 2,
47 3,
48 6,
49 oid::BufferType::UnsignedByte,
50 std::move(bytes));
51 EXPECT_EQ(r.variable_name, "v");
52 EXPECT_EQ(r.display_name, "disp");
53 EXPECT_EQ(r.pixel_layout, "rgb");
54 EXPECT_FALSE(r.transpose);
55 EXPECT_EQ(r.width, 2);
56 EXPECT_EQ(r.height, 2);
57 EXPECT_EQ(r.channels, 3);
58 EXPECT_EQ(r.step, 6); // step == wire stride
59 EXPECT_EQ(r.type, oid::BufferType::UnsignedByte);
60 EXPECT_EQ(r.bytes.size(), 12u);
61}
62
63TEST(BufferDecode, Float64ConvertsToFloatBytes) {
64 const double value = 3.5;

Callers

nothing calls this directly

Calls 14

make_buffer_recordFunction · 0.85
frameFunction · 0.85
feedMethod · 0.80
pollMethod · 0.80
upsertMethod · 0.80
request_plotMethod · 0.80
beginMethod · 0.80
set_restore_buffersMethod · 0.80

Tested by

no test coverage detected