diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-04-10 10:40:55 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-04-10 10:40:55 -0700 |
commit | 441932f7f17435a4385a4ca0a384b9e763ddb3bc (patch) | |
tree | 2f867df737ad18ec1674717643c5d1f22ed8ecf4 /core | |
parent | 07a8f9cba51fd4ef012f7773945a72a29f816ba4 (diff) | |
download | pdfium-441932f7f17435a4385a4ca0a384b9e763ddb3bc.tar.xz |
Merge to XFA: Don't call FPDF_InitLibrary() in individual unit_tests.
Original Review URL: https://codereview.chromium.org/1071343002
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1079623002
Diffstat (limited to 'core')
-rw-r--r-- | core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp (renamed from core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_unittest.cpp) | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_unittest.cpp b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp index 18196a19a0..2769f3c14f 100644 --- a/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_unittest.cpp +++ b/core/src/fpdfapi/fpdf_parser/fpdf_parser_decode_embeddertest.cpp @@ -7,10 +7,14 @@ #include "../../../../fpdfsdk/include/fpdfview.h" #include "../../../../testing/fx_string_testhelpers.h" -#include "../../../include/fxcrt/fx_basic.h" #include "../../../include/fpdfapi/fpdf_parser.h" +#include "../../../include/fxcrt/fx_basic.h" +#include "../../../testing/embedder_test.h" #include "testing/gtest/include/gtest/gtest.h" +class FPDFParserDecodeEmbeddertest : public EmbedderTest { +}; + // NOTE: python's zlib.compress() and zlib.decompress() may be useful for // external validation of the FlateEncode/FlateDecode test cases. @@ -18,7 +22,7 @@ { (const unsigned char*)input_literal, sizeof(input_literal) - 1, \ (const unsigned char*)expected_literal, sizeof(expected_literal) - 1 } -TEST(ParserDecode, FlateEncode) { +TEST_F(FPDFParserDecodeEmbeddertest, FlateEncode) { struct FlateEncodeCase { const unsigned char* input; unsigned int input_size; @@ -42,7 +46,6 @@ TEST(ParserDecode, FlateEncode) { ), }; - FPDF_InitLibrary(); for (size_t i = 0; i < FX_ArraySize(flate_encode_cases); ++i) { FlateEncodeCase* ptr = &flate_encode_cases[i]; unsigned char* result; @@ -52,10 +55,9 @@ TEST(ParserDecode, FlateEncode) { std::string((const char*)result, result_size)) << " for case " << i; } - FPDF_DestroyLibrary(); } -TEST(ParserDecode, FlateDecode) { +TEST_F(FPDFParserDecodeEmbeddertest, FlateDecode) { struct FlateDecodeCase { const unsigned char* input; unsigned int input_size; @@ -81,7 +83,6 @@ TEST(ParserDecode, FlateDecode) { ), }; - FPDF_InitLibrary(); for (size_t i = 0; i < FX_ArraySize(flate_decode_cases); ++i) { FlateDecodeCase* ptr = &flate_decode_cases[i]; unsigned char* result; @@ -91,7 +92,6 @@ TEST(ParserDecode, FlateDecode) { std::string((const char*)result, result_size)) << " for case " << i; } - FPDF_DestroyLibrary(); } |