| 29 | namespace arrow::internal { |
| 30 | |
| 31 | TEST(JsonWriter, SimpleObject) { |
| 32 | JsonWriter writer; |
| 33 | |
| 34 | writer.StartObject(); |
| 35 | writer.Key("a"); |
| 36 | writer.Int(42); |
| 37 | writer.Key("b"); |
| 38 | writer.String("hello"); |
| 39 | writer.EndObject(); |
| 40 | |
| 41 | ASSERT_OK_AND_ASSIGN(std::string_view json, writer.GetString()); |
| 42 | |
| 43 | EXPECT_EQ(json, R"({"a":42,"b":"hello"})"); |
| 44 | } |
| 45 | |
| 46 | TEST(JsonWriter, Array) { |
| 47 | JsonWriter writer; |
nothing calls this directly
no test coverage detected