mirror of
https://github.com/Tencent/rapidjson.git
synced 2025-10-28 11:31:57 +01:00
Unit test
Add unit test for Issue 848 (segfault in ~Document)
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user