mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-11-27 05:16:18 +08:00
21 lines
381 B
C++
21 lines
381 B
C++
#include <rfl.hpp>
|
|
#include <string>
|
|
|
|
#include "write_and_read.hpp"
|
|
|
|
namespace test_readme_example2 {
|
|
|
|
struct Person {
|
|
std::string first_name;
|
|
std::string last_name;
|
|
int age;
|
|
};
|
|
|
|
TEST(generic, test_readme_example2) {
|
|
const auto homer =
|
|
Person{.first_name = "Homer", .last_name = "Simpson", .age = 45};
|
|
|
|
write_and_read(homer);
|
|
}
|
|
} // namespace test_readme_example2
|