Commit 0ec4e86f authored by StilesCrisis's avatar StilesCrisis

Unit test

Add unit test for Issue 848 (segfault in ~Document)
parent 26e089b9
...@@ -1281,6 +1281,12 @@ TEST(SchemaValidatingWriter, Simple) { ...@@ -1281,6 +1281,12 @@ TEST(SchemaValidatingWriter, Simple) {
EXPECT_TRUE(validator.GetInvalidDocumentPointer() == SchemaDocument::PointerType("")); EXPECT_TRUE(validator.GetInvalidDocumentPointer() == SchemaDocument::PointerType(""));
} }
TEST(Schema, Issue848) {
rapidjson::Document d;
rapidjson::SchemaDocument s(d);
rapidjson::GenericSchemaValidator<rapidjson::SchemaDocument, rapidjson::Document> v(s);
}
#if RAPIDJSON_HAS_CXX11_RVALUE_REFS #if RAPIDJSON_HAS_CXX11_RVALUE_REFS
static SchemaDocument ReturnSchemaDocument() { static SchemaDocument ReturnSchemaDocument() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment