From fd36b8fabac8dbfc79ba1f59a1cbcd0a106a0d2d Mon Sep 17 00:00:00 2001 From: thestig Date: Mon, 11 Jul 2016 10:43:48 -0700 Subject: PDFDocTest should TearDown() properly. Otherwise pdfium_unittests --gtest_shuffle can fail. Review-Url: https://codereview.chromium.org/2135823002 --- fpdfsdk/fpdfdoc_unittest.cpp | 7 +++++++ 1 file changed, 7 insertions(+) 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 CreateDictObjs(int num) { std::vector info; for (int i = 0; i < num; ++i) { -- cgit v1.2.3