mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-11-28 05:46:18 +08:00
18 lines
296 B
C++
18 lines
296 B
C++
#include <rfl.hpp>
|
|
#include <rfl/json.hpp>
|
|
#include <string>
|
|
|
|
#include "write_and_read.hpp"
|
|
|
|
namespace test_hex {
|
|
|
|
struct TestStruct {
|
|
rfl::Hex<int> hex;
|
|
};
|
|
|
|
TEST(json, test_hex) {
|
|
const auto test = TestStruct{.hex = 30};
|
|
write_and_read(test, R"({"hex":"1e"})");
|
|
}
|
|
} // namespace test_hex
|