mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-11-26 21:06:18 +08:00
18 lines
327 B
C++
18 lines
327 B
C++
#include <rfl.hpp>
|
|
#include <rfl/json.hpp>
|
|
#include <string>
|
|
|
|
#include "write_and_read.hpp"
|
|
|
|
namespace test_binary {
|
|
|
|
struct TestStruct {
|
|
rfl::Binary<uint8_t> binary;
|
|
};
|
|
|
|
TEST(json, test_binary) {
|
|
const auto test = TestStruct{.binary = 30};
|
|
write_and_read(test, R"({"binary":"00011110"})");
|
|
}
|
|
} // namespace test_binary
|