ext/rj_schema/rapidjson/test/unittest/documenttest.cpp in rj_schema-1.0.0 vs ext/rj_schema/rapidjson/test/unittest/documenttest.cpp in rj_schema-1.0.1
- old
+ new
@@ -323,9 +323,11 @@
// reset value
Value().Swap(d1);
EXPECT_TRUE(d1.IsNull());
// reset document, including allocator
+ // so clear o before so that it doesnt contain dangling elements
+ o.Clear();
Document().Swap(d2);
EXPECT_TRUE(d2.IsNull());
EXPECT_NE(&d2.GetAllocator(), &a);
// testing std::swap compatibility