1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
|
#include <iostream>
#include <rfl.hpp>
#include <rfl/json.hpp>
#include <string>
#include <vector>
#include "write_and_read.hpp"
// This example had led to a segfault on GCC 12.
// To make sure this won't happen again, we include
// it in our tests.
namespace test_segfault {
struct Data {
std::string prop1;
std::string prop2;
std::string prop3;
std::string prop4;
std::string prop5;
std::string prop6;
};
TEST(json, test_segfault) {
const auto data = Data{};
write_and_read(
data,
R"({"prop1":"","prop2":"","prop3":"","prop4":"","prop5":"","prop6":""})");
}
} // namespace test_segfault
|