Use size_t instead of iterators inside Object; addresses #194 (#198)

This commit is contained in:
Dr. Patrick Urbanke (劉自成)
2024-09-21 00:25:18 +02:00
committed by GitHub
parent a5023c4fa4
commit 75c7859ab1
2 changed files with 49 additions and 48 deletions
+17
View File
@@ -0,0 +1,17 @@
#include <iostream>
#include <rfl.hpp>
#include <string>
#include <vector>
#include "write_and_read.hpp"
namespace test_object {
TEST(json, test_object) {
rfl::Object<rfl::Generic> o;
o["hello"] = "world";
EXPECT_EQ(o.get("hello").value().to_string().value(), "world");
EXPECT_EQ(o.at("hello").to_string().value(), "world");
}
} // namespace test_object