Added support for rfl::Binary, rfl::Hex and rfl::Oct; #164 (#170)

This commit is contained in:
Dr. Patrick Urbanke (劉自成)
2024-08-02 21:44:50 +02:00
committed by GitHub
parent b6651a4062
commit c36f8c6af6
10 changed files with 481 additions and 0 deletions
+19
View File
@@ -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