mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-11-29 22:36:19 +08:00
Made sure we can serialize and deserialize empty structs
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include "test_empty_object.hpp"
|
||||
|
||||
#include <iostream>
|
||||
#include <rfl.hpp>
|
||||
#include <rfl/json.hpp>
|
||||
#include <source_location>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "write_and_read.hpp"
|
||||
|
||||
namespace test_empty_object {
|
||||
|
||||
struct Empty {};
|
||||
|
||||
void test() {
|
||||
std::cout << std::source_location::current().function_name() << std::endl;
|
||||
|
||||
const auto empty = Empty{};
|
||||
|
||||
write_and_read(empty, R"({})");
|
||||
}
|
||||
} // namespace test_empty_object
|
||||
Reference in New Issue
Block a user