summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-07-11 10:43:48 -0700
committerCommit bot <commit-bot@chromium.org>2016-07-11 10:43:48 -0700
commitfd36b8fabac8dbfc79ba1f59a1cbcd0a106a0d2d (patch)
tree46fb6795b0599d142d285476e8836f5ed0194d36
parentbb95c50663a1ba3378c6b079dc21dc7deb8ea53a (diff)
downloadpdfium-fd36b8fabac8dbfc79ba1f59a1cbcd0a106a0d2d.tar.xz
PDFDocTest should TearDown() properly.
Otherwise pdfium_unittests --gtest_shuffle can fail. Review-Url: https://codereview.chromium.org/2135823002
-rw-r--r--fpdfsdk/fpdfdoc_unittest.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfdoc_unittest.cpp b/fpdfsdk/fpdfdoc_unittest.cpp
index eb04de6971..e315fd853e 100644
--- a/fpdfsdk/fpdfdoc_unittest.cpp
+++ b/fpdfsdk/fpdfdoc_unittest.cpp
@@ -68,6 +68,13 @@ class PDFDocTest : public testing::Test {
m_pDoc->SetRoot(m_pRootObj.get());
}
+ void TearDown() override {
+ m_pRootObj.reset();
+ m_pIndirectObjs = nullptr;
+ m_pDoc.reset();
+ CPDF_ModuleMgr::Destroy();
+ }
+
std::vector<DictObjInfo> CreateDictObjs(int num) {
std::vector<DictObjInfo> info;
for (int i = 0; i < num; ++i) {