MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / DocumentTest

Class DocumentTest

tests/document_test.cpp:255–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253
254template <typename Document>
255class DocumentTest : public testing::Test {
256 public:
257 DocumentTest() { doc_.Parse(data_.c_str(), data_.size()); }
258 void Parse(Document& doc) { doc.Parse(data_.c_str(), data_.size()); }
259
260 protected:
261 std::string data_ =
262 R"({"id":12125925,"ids":[-2147483648,2147483647],"title":"未来简史","titles":["","world"],"price":345.67,"prices":[-0.1,0.1],"hot":true,"hots":[true,true,true],"author":{"name":"json","age":99,"male":true},"authors":[{"name":null,"age":99,"male":true}, [], [[]]],"weights":[],"extra":{},"other":null})";
263 Document doc_{};
264};
265
266using DynSimpleDom = GenericDocument<DNode<SimpleAllocator>>;
267using DynMempoolDom = GenericDocument<DNode<MemoryPoolAllocator<>>>;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected