Added more features to the automated field name retrieval

This commit is contained in:
Patrick Urbanke
2023-11-27 19:51:30 +01:00
parent 5e6682df5d
commit ac244c082d
67 changed files with 6538 additions and 6136 deletions
+10 -8
View File
@@ -7,14 +7,16 @@
#include "write_and_read.hpp"
void test_string_map() {
std::cout << "test_string_map" << std::endl;
namespace test_string_map {
void test() {
std::cout << "test_string_map" << std::endl;
std::map<std::string, std::unique_ptr<std::string>> homer;
homer.insert(
std::make_pair("firstName", std::make_unique<std::string>("Homer")));
homer.insert(
std::make_pair("lastName", std::make_unique<std::string>("Simpson")));
std::map<std::string, std::unique_ptr<std::string>> homer;
homer.insert(
std::make_pair("firstName", std::make_unique<std::string>("Homer")));
homer.insert(
std::make_pair("lastName", std::make_unique<std::string>("Simpson")));
write_and_read(homer, R"({"firstName":"Homer","lastName":"Simpson"})");
write_and_read(homer, R"({"firstName":"Homer","lastName":"Simpson"})");
}
} // namespace test_string_map