#include "pc/BinaryBuffer.h" #include "pc/astuple.h" #include "test/u.hpp" inline namespace { struct Point { int x, y, z; OGPC_DECLARE_ASTUPLE(x, y, z); }; AddTestCase _(10, "BinaryBuffer", [](TestCase& t) { t.expectEq([] { BinaryBuffer bb; int x, y = 10; bb << y; bb >> x; return x; }, 10); t.expectEq>([] { BinaryBuffer bb; Point x{1, 2, 4}; std::tuple y; bb << x; bb >> y; return y; }, {1, 2, 4}); }); }