mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-12-03 00:26:19 +08:00
@@ -0,0 +1,19 @@
|
||||
#include <iostream>
|
||||
#include <rfl.hpp>
|
||||
#include <rfl/json.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#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
|
||||
Reference in New Issue
Block a user