| 253 | |
| 254 | template <typename Document> |
| 255 | class 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 | |
| 266 | using DynSimpleDom = GenericDocument<DNode<SimpleAllocator>>; |
| 267 | using DynMempoolDom = GenericDocument<DNode<MemoryPoolAllocator<>>>; |
nothing calls this directly
no outgoing calls
no test coverage detected