| 32 | using namespace oid::host; |
| 33 | |
| 34 | static BufferRecord |
| 35 | rec(std::string_view name, std::byte fill, std::size_t n = 4) { |
| 36 | BufferRecord r; |
| 37 | r.variable_name = name; |
| 38 | r.display_name = name; |
| 39 | r.pixel_layout = "rgba"; |
| 40 | r.width = 2; |
| 41 | r.height = 2; |
| 42 | r.channels = 1; |
| 43 | r.step = 2; |
| 44 | r.type = oid::BufferType::UnsignedByte; |
| 45 | r.bytes.assign(n, fill); |
| 46 | return r; |
| 47 | } |
| 48 | |
| 49 | TEST(IpcBufferModel, UpsertAddsThenReplacesByName) { |
| 50 | IpcBufferModel m; |