mirror of
https://codeberg.org/DawnMagnet/reflect-cpp
synced 2026-11-27 21:36:19 +08:00
21 lines
390 B
C++
21 lines
390 B
C++
#include <rfl.hpp>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
namespace test_meta_fields {
|
|
|
|
struct Person {
|
|
std::string first_name;
|
|
std::string last_name = "Simpson";
|
|
std::string town = "Springfield";
|
|
unsigned int age;
|
|
std::vector<Person> children;
|
|
};
|
|
|
|
TEST(json, test_meta_fields) {
|
|
const auto fields = rfl::fields<Person>();
|
|
|
|
EXPECT_EQ(fields.size(), 5);
|
|
}
|
|
} // namespace test_meta_fields
|