diff options
author | tsepez <tsepez@chromium.org> | 2016-12-01 08:29:25 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-12-01 08:29:25 -0800 |
commit | 02759102cf998c9e937b3b65b64ed6b4c3b104bc (patch) | |
tree | a84ba0b347fb539be17b35a0b1f84acb63ad54b3 /fpdfsdk/fpdfview_unittest.cpp | |
parent | c62980ec7539fa5ae2065ba5f287aada3a814173 (diff) | |
download | pdfium-02759102cf998c9e937b3b65b64ed6b4c3b104bc.tar.xz |
Protect against unexpected library create/destroy
Probably won't fix bug 669797 on its own, but nice to have.
Remove unimplemented static method.
Review-Url: https://codereview.chromium.org/2543833002
Diffstat (limited to 'fpdfsdk/fpdfview_unittest.cpp')
-rw-r--r-- | fpdfsdk/fpdfview_unittest.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/fpdfsdk/fpdfview_unittest.cpp b/fpdfsdk/fpdfview_unittest.cpp new file mode 100644 index 0000000000..27680b3d4e --- /dev/null +++ b/fpdfsdk/fpdfview_unittest.cpp @@ -0,0 +1,20 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "public/fpdfview.h" + +#include "testing/gtest/include/gtest/gtest.h" +#include "testing/test_support.h" + +TEST(FPDFView, DoubleInit) { + FPDF_InitLibrary(); + FPDF_InitLibrary(); + FPDF_DestroyLibrary(); +} + +TEST(FPDFView, DoubleDestroy) { + FPDF_InitLibrary(); + FPDF_DestroyLibrary(); + FPDF_DestroyLibrary(); +} |