]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/test/common/test_json_formattable.cc
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / test / common / test_json_formattable.cc
index 90327127cc78746bb953c4b7bb5d9c1e4756ab11..62448e8080b586ba7dbc5b7ed96d35577b652a9a 100644 (file)
@@ -61,6 +61,12 @@ TEST(formatable, str2) {
 
 }
 
+TEST(formatable, str3) {
+  JSONFormattable f;
+  get_jf("{ \"foo\": \"1234bar56\" }", &f);
+  ASSERT_EQ((string)f["foo"], "1234bar56");
+}
+
 TEST(formatable, int) {
   JSONFormattable f;
   get_jf("{ \"foo\": 1 }", &f);
@@ -193,6 +199,12 @@ TEST(formatable, set) {
   ASSERT_EQ((int)f["obj"]["c"], 30);
 }
 
+TEST(formatable, set2) {
+  JSONFormattable f;
+  f.set("foo", "1234bar56");
+  ASSERT_EQ((string)f["foo"], "1234bar56");
+}
+
 TEST(formatable, erase) {
   JSONFormattable f, f2;