Remove underscores from test names in fpdfsdk/
Tests written with the GoogleTest framework should not use underscores
in test names.
Bug: 42270790
Change-Id: I6329fc07a782d042e0cbcc39609d632a79ed8495
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/123111
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Andy Phan <andyphan@chromium.org>
diff --git a/fpdfsdk/cpdfsdk_annotiterator_embeddertest.cpp b/fpdfsdk/cpdfsdk_annotiterator_embeddertest.cpp
index 1bb785f..e6394f9 100644
--- a/fpdfsdk/cpdfsdk_annotiterator_embeddertest.cpp
+++ b/fpdfsdk/cpdfsdk_annotiterator_embeddertest.cpp
@@ -23,9 +23,9 @@
} // namespace
-class CPDFSDK_AnnotIteratorTest : public EmbedderTest {};
+class CPDFSDKAnnotIteratorTest : public EmbedderTest {};
-TEST_F(CPDFSDK_AnnotIteratorTest, CPDFSDK_AnnotIterator) {
+TEST_F(CPDFSDKAnnotIteratorTest, AnnotIterator) {
ASSERT_TRUE(OpenDocument("annotiter.pdf"));
FPDF_PAGE page0 = LoadPage(0);
FPDF_PAGE page1 = LoadPage(1);
diff --git a/fpdfsdk/cpdfsdk_baannot_embeddertest.cpp b/fpdfsdk/cpdfsdk_baannot_embeddertest.cpp
index d7f32ce..b70ffa9 100644
--- a/fpdfsdk/cpdfsdk_baannot_embeddertest.cpp
+++ b/fpdfsdk/cpdfsdk_baannot_embeddertest.cpp
@@ -13,7 +13,7 @@
#include "fpdfsdk/cpdfsdk_pageview.h"
#include "testing/embedder_test.h"
-class CPDFSDK_BAAnnotTest : public EmbedderTest {
+class CPDFSDKBAAnnotTest : public EmbedderTest {
public:
void SetUp() override {
EmbedderTest::SetUp();
@@ -62,7 +62,7 @@
CPDFSDK_FormFillEnvironment* m_pFormFillEnv = nullptr;
};
-TEST_F(CPDFSDK_BAAnnotTest, TabToLinkOrHighlightAnnot) {
+TEST_F(CPDFSDKBAAnnotTest, TabToLinkOrHighlightAnnot) {
std::vector<CPDF_Annot::Subtype> focusable_annot_types = {
CPDF_Annot::Subtype::WIDGET, CPDF_Annot::Subtype::LINK,
CPDF_Annot::Subtype::HIGHLIGHT};
diff --git a/fpdfsdk/cpdfsdk_helpers_unittest.cpp b/fpdfsdk/cpdfsdk_helpers_unittest.cpp
index 4648272..ba1b4ff 100644
--- a/fpdfsdk/cpdfsdk_helpers_unittest.cpp
+++ b/fpdfsdk/cpdfsdk_helpers_unittest.cpp
@@ -13,7 +13,7 @@
using ::testing::ElementsAre;
using ::testing::IsEmpty;
-TEST(CPDFSDK_HelpersTest, NulTerminateMaybeCopyAndReturnLength) {
+TEST(CPDFSDKHelpersTest, NulTerminateMaybeCopyAndReturnLength) {
{
const ByteString to_be_copied("toBeCopied");
constexpr size_t kExpectedToBeCopiedLen = 10;
@@ -48,7 +48,7 @@
}
}
-TEST(CPDFSDK_HelpersTest, ParsePageRangeString) {
+TEST(CPDFSDKHelpersTest, ParsePageRangeString) {
EXPECT_THAT(ParsePageRangeString("", 1), IsEmpty());
EXPECT_THAT(ParsePageRangeString(" ", 1), IsEmpty());
EXPECT_THAT(ParsePageRangeString("clams", 1), IsEmpty());
diff --git a/fpdfsdk/fpdf_doc_embeddertest.cpp b/fpdfsdk/fpdf_doc_embeddertest.cpp
index 5797c09..28e8584 100644
--- a/fpdfsdk/fpdf_doc_embeddertest.cpp
+++ b/fpdfsdk/fpdf_doc_embeddertest.cpp
@@ -623,7 +623,7 @@
}
// Check circular bookmarks will not cause infinite loop.
-TEST_F(FPDFDocEmbedderTest, FindBookmarks_bug420) {
+TEST_F(FPDFDocEmbedderTest, FindBookmarksBug420) {
// Open a file with circular bookmarks.
ASSERT_TRUE(OpenDocument("bookmarks_circular.pdf"));
diff --git a/fpdfsdk/fpdf_formfill_embeddertest.cpp b/fpdfsdk/fpdf_formfill_embeddertest.cpp
index 2607ff7..97e5cf6 100644
--- a/fpdfsdk/fpdf_formfill_embeddertest.cpp
+++ b/fpdfsdk/fpdf_formfill_embeddertest.cpp
@@ -664,7 +664,7 @@
UnloadPage(page);
}
-TEST_F(FPDFFormFillEmbedderTest, Bug901654) {
+TEST_F(FPDFFormFillEmbedderTest, Bug901654Case1) {
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
@@ -683,7 +683,7 @@
UnloadPage(page);
}
-TEST_F(FPDFFormFillEmbedderTest, Bug901654_2) {
+TEST_F(FPDFFormFillEmbedderTest, Bug901654Case2) {
EmbedderTestTimerHandlingDelegate delegate;
SetDelegate(&delegate);
diff --git a/fpdfsdk/fpdf_view_embeddertest.cpp b/fpdfsdk/fpdf_view_embeddertest.cpp
index 200f307..004cce0 100644
--- a/fpdfsdk/fpdf_view_embeddertest.cpp
+++ b/fpdfsdk/fpdf_view_embeddertest.cpp
@@ -897,42 +897,42 @@
}
// The following tests pass if the document opens without crashing.
-TEST_F(FPDFViewEmbedderTest, Crasher_113) {
+TEST_F(FPDFViewEmbedderTest, Crasher113) {
ASSERT_TRUE(OpenDocument("bug_113.pdf"));
}
-TEST_F(FPDFViewEmbedderTest, Crasher_451830) {
+TEST_F(FPDFViewEmbedderTest, Crasher451830) {
// Document is damaged and can't be opened.
EXPECT_FALSE(OpenDocument("bug_451830.pdf"));
}
-TEST_F(FPDFViewEmbedderTest, Crasher_452455) {
+TEST_F(FPDFViewEmbedderTest, Crasher452455) {
ASSERT_TRUE(OpenDocument("bug_452455.pdf"));
ScopedEmbedderTestPage page = LoadScopedPage(0);
EXPECT_TRUE(page);
}
-TEST_F(FPDFViewEmbedderTest, Crasher_454695) {
+TEST_F(FPDFViewEmbedderTest, Crasher454695) {
// Document is damaged and can't be opened.
EXPECT_FALSE(OpenDocument("bug_454695.pdf"));
}
-TEST_F(FPDFViewEmbedderTest, Crasher_572871) {
+TEST_F(FPDFViewEmbedderTest, Crasher572871) {
ASSERT_TRUE(OpenDocument("bug_572871.pdf"));
}
// It tests that document can still be loaded even the trailer has no 'Size'
// field if other information is right.
-TEST_F(FPDFViewEmbedderTest, Failed_213) {
+TEST_F(FPDFViewEmbedderTest, Failed213) {
ASSERT_TRUE(OpenDocument("bug_213.pdf"));
}
// The following tests pass if the document opens without infinite looping.
-TEST_F(FPDFViewEmbedderTest, Hang_298) {
+TEST_F(FPDFViewEmbedderTest, Hang298) {
EXPECT_FALSE(OpenDocument("bug_298.pdf"));
}
-TEST_F(FPDFViewEmbedderTest, Crasher_773229) {
+TEST_F(FPDFViewEmbedderTest, Crasher773229) {
ASSERT_TRUE(OpenDocument("bug_773229.pdf"));
}
@@ -954,36 +954,36 @@
// The test should pass when circular references to ParseIndirectObject will not
// cause infinite loop.
-TEST_F(FPDFViewEmbedderTest, Hang_343) {
+TEST_F(FPDFViewEmbedderTest, Hang343) {
EXPECT_FALSE(OpenDocument("bug_343.pdf"));
}
// The test should pass when the absence of 'Contents' field in a signature
// dictionary will not cause an infinite loop in CPDF_SyntaxParser::GetObject().
-TEST_F(FPDFViewEmbedderTest, Hang_344) {
+TEST_F(FPDFViewEmbedderTest, Hang344) {
EXPECT_FALSE(OpenDocument("bug_344.pdf"));
}
// The test should pass when there is no infinite recursion in
// CPDF_SyntaxParser::GetString().
-TEST_F(FPDFViewEmbedderTest, Hang_355) {
+TEST_F(FPDFViewEmbedderTest, Hang355) {
EXPECT_FALSE(OpenDocument("bug_355.pdf"));
}
// The test should pass even when the file has circular references to pages.
-TEST_F(FPDFViewEmbedderTest, Hang_360) {
+TEST_F(FPDFViewEmbedderTest, Hang360) {
EXPECT_FALSE(OpenDocument("bug_360.pdf"));
}
// Deliberately damaged version of linearized.pdf with bad data in the shared
// object hint table.
-TEST_F(FPDFViewEmbedderTest, Hang_1055) {
+TEST_F(FPDFViewEmbedderTest, Hang1055) {
ASSERT_TRUE(OpenDocumentLinearized("linearized_bug_1055.pdf"));
int version;
EXPECT_TRUE(FPDF_GetFileVersion(document(), &version));
EXPECT_EQ(16, version);
}
-TEST_F(FPDFViewEmbedderTest, FPDF_RenderPageBitmapWithMatrix) {
+TEST_F(FPDFViewEmbedderTest, FPDFRenderPageBitmapWithMatrix) {
const char* clipped_checksum = []() {
if (CFX_DefaultRenderDevice::UseSkiaRenderer()) {
return "d2929fae285593cd1c1d446750d47d60";
@@ -1199,7 +1199,7 @@
UnloadPage(page);
}
-TEST_F(FPDFViewEmbedderTest, FPDF_GetPageSizeByIndexF) {
+TEST_F(FPDFViewEmbedderTest, FPDFGetPageSizeByIndexF) {
ASSERT_TRUE(OpenDocument("rectangles.pdf"));
FS_SIZEF size;
@@ -1234,7 +1234,7 @@
UnloadPage(page);
}
-TEST_F(FPDFViewEmbedderTest, FPDF_GetPageSizeByIndex) {
+TEST_F(FPDFViewEmbedderTest, FPDFGetPageSizeByIndex) {
ASSERT_TRUE(OpenDocument("rectangles.pdf"));
double width = 0;
@@ -1373,7 +1373,7 @@
int type_ = -1;
};
-TEST_F(FPDFViewEmbedderTest, UnSupportedOperations_NotFound) {
+TEST_F(FPDFViewEmbedderTest, UnSupportedOperationsNotFound) {
RecordUnsupportedErrorDelegate delegate;
SetDelegate(&delegate);
ASSERT_TRUE(OpenDocument("hello_world.pdf"));
@@ -1381,7 +1381,7 @@
SetDelegate(nullptr);
}
-TEST_F(FPDFViewEmbedderTest, UnSupportedOperations_LoadCustomDocument) {
+TEST_F(FPDFViewEmbedderTest, UnSupportedOperationsLoadCustomDocument) {
RecordUnsupportedErrorDelegate delegate;
SetDelegate(&delegate);
ASSERT_TRUE(OpenDocument("unsupported_feature.pdf"));
@@ -1389,7 +1389,7 @@
SetDelegate(nullptr);
}
-TEST_F(FPDFViewEmbedderTest, UnSupportedOperations_LoadDocument) {
+TEST_F(FPDFViewEmbedderTest, UnSupportedOperationsLoadDocument) {
std::string file_path =
PathService::GetTestFilePath("unsupported_feature.pdf");
ASSERT_FALSE(file_path.empty());
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment_embeddertest.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment_embeddertest.cpp
index af3cd59..30e2af3 100644
--- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment_embeddertest.cpp
+++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment_embeddertest.cpp
@@ -5,10 +5,10 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/xfa_js_embedder_test.h"
-class CPDFXFA_DocEnvironmentEmbedderTest : public XFAJSEmbedderTest {};
+class CPDFXFADocEnvironmentEmbedderTest : public XFAJSEmbedderTest {};
// Should not crash.
-TEST_F(CPDFXFA_DocEnvironmentEmbedderTest, Bug1223) {
+TEST_F(CPDFXFADocEnvironmentEmbedderTest, Bug1223) {
ASSERT_TRUE(OpenDocument("simple_xfa.pdf"));
EXPECT_FALSE(Execute("URL=y"));