Remove underscores from test names with the pattern "BUG_NUMBER" Tests written with the GoogleTest framework should not use underscores in test names. Bug: 42270790 Change-Id: I5acfa175479d4d93b19fa261868cde2d2f66f043 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/121190 Reviewed-by: Tom Sepez <tsepez@google.com> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp b/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp index 8dbad0c..741401c 100644 --- a/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp +++ b/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
@@ -45,7 +45,7 @@ EXPECT_EQ(saved_doc_1.size(), saved_doc_2.size()); } -TEST_F(CPDF_CreatorEmbedderTest, BUG_873) { +TEST_F(CPDF_CreatorEmbedderTest, Bug873) { ASSERT_TRUE(OpenDocument("embedded_attachments.pdf")); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
diff --git a/core/fpdfapi/font/cpdf_cidfont_unittest.cpp b/core/fpdfapi/font/cpdf_cidfont_unittest.cpp index 4bc7426..d8aaeef 100644 --- a/core/fpdfapi/font/cpdf_cidfont_unittest.cpp +++ b/core/fpdfapi/font/cpdf_cidfont_unittest.cpp
@@ -16,7 +16,7 @@ using CPDF_CIDFontTest = TestWithPageModule; -TEST_F(CPDF_CIDFontTest, BUG_920636) { +TEST_F(CPDF_CIDFontTest, Bug920636) { CPDF_TestDocument doc; auto font_dict = pdfium::MakeRetain<CPDF_Dictionary>(); font_dict->SetNewFor<CPDF_Name>("Encoding", "Identity−H");
diff --git a/core/fxcodec/jbig2/jbig2_embeddertest.cpp b/core/fxcodec/jbig2/jbig2_embeddertest.cpp index cb469b9..c017e48 100644 --- a/core/fxcodec/jbig2/jbig2_embeddertest.cpp +++ b/core/fxcodec/jbig2/jbig2_embeddertest.cpp
@@ -10,11 +10,11 @@ #if defined(PDF_USE_SKIA) // TODO(crbug.com/pdfium/11): Fix this test and enable. -#define MAYBE_Bug_631912 DISABLED_Bug_631912 +#define MAYBE_Bug631912 DISABLED_Bug631912 #else -#define MAYBE_Bug_631912 Bug_631912 +#define MAYBE_Bug631912 Bug631912 #endif -TEST_F(JBig2EmbedderTest, MAYBE_Bug_631912) { +TEST_F(JBig2EmbedderTest, MAYBE_Bug631912) { // Test jbig2 image in PDF file can be loaded successfully. // Should not crash. ASSERT_TRUE(OpenDocument("bug_631912.pdf"));
diff --git a/fpdfsdk/fpdf_annot_embeddertest.cpp b/fpdfsdk/fpdf_annot_embeddertest.cpp index 3c91b5f..9dbdb41 100644 --- a/fpdfsdk/fpdf_annot_embeddertest.cpp +++ b/fpdfsdk/fpdf_annot_embeddertest.cpp
@@ -2229,7 +2229,7 @@ UnloadPage(page); } -TEST_F(FPDFAnnotEmbedderTest, BUG_1212) { +TEST_F(FPDFAnnotEmbedderTest, Bug1212) { ASSERT_TRUE(OpenDocument("hello_world.pdf")); FPDF_PAGE page = LoadPage(0); ASSERT_TRUE(page);
diff --git a/fpdfsdk/fpdf_dataavail_embeddertest.cpp b/fpdfsdk/fpdf_dataavail_embeddertest.cpp index 5f71ea2..438e75f 100644 --- a/fpdfsdk/fpdf_dataavail_embeddertest.cpp +++ b/fpdfsdk/fpdf_dataavail_embeddertest.cpp
@@ -410,14 +410,14 @@ FPDFAvail_IsPageAvail(avail(), -1, loader.hints())); } -TEST_F(FPDFDataAvailEmbedderTest, Bug_1324189) { +TEST_F(FPDFDataAvailEmbedderTest, Bug1324189) { // Test passes if it doesn't crash. TestAsyncLoader loader("bug_1324189.pdf"); CreateAvail(loader.file_avail(), loader.file_access()); ASSERT_EQ(PDF_DATA_NOTAVAIL, FPDFAvail_IsDocAvail(avail(), loader.hints())); } -TEST_F(FPDFDataAvailEmbedderTest, Bug_1324503) { +TEST_F(FPDFDataAvailEmbedderTest, Bug1324503) { // Test passes if it doesn't crash. TestAsyncLoader loader("bug_1324503.pdf"); CreateAvail(loader.file_avail(), loader.file_access());
diff --git a/fpdfsdk/fpdf_edit_embeddertest.cpp b/fpdfsdk/fpdf_edit_embeddertest.cpp index e7ff1b9..f9b99d7 100644 --- a/fpdfsdk/fpdf_edit_embeddertest.cpp +++ b/fpdfsdk/fpdf_edit_embeddertest.cpp
@@ -719,7 +719,7 @@ UnloadPage(page); } -TEST_F(FPDFEditEmbedderTest, BUG_1399) { +TEST_F(FPDFEditEmbedderTest, Bug1399) { // Load document with a clipped rectangle. ASSERT_TRUE(OpenDocument("bug_1399.pdf")); FPDF_PAGE page = LoadPage(0); @@ -758,7 +758,7 @@ UnloadPage(page); } -TEST_F(FPDFEditEmbedderTest, BUG_1549) { +TEST_F(FPDFEditEmbedderTest, Bug1549) { static const char kOriginalChecksum[] = "126366fb95e6caf8ea196780075b22b2"; static const char kRemovedChecksum[] = "6ec2f27531927882624b37bc7d8e12f4"; @@ -939,7 +939,7 @@ CloseSavedDocument(); } -TEST_F(FPDFEditEmbedderTest, BUG_1574) { +TEST_F(FPDFEditEmbedderTest, Bug1574) { // Load document with some text within a clipping path. ASSERT_TRUE(OpenDocument("bug_1574.pdf")); FPDF_PAGE page = LoadPage(0);
diff --git a/fpdfsdk/fpdf_ppo_embeddertest.cpp b/fpdfsdk/fpdf_ppo_embeddertest.cpp index 4364e3d..6a77d5a 100644 --- a/fpdfsdk/fpdf_ppo_embeddertest.cpp +++ b/fpdfsdk/fpdf_ppo_embeddertest.cpp
@@ -352,14 +352,14 @@ EXPECT_FALSE(FPDF_NewFormObjectFromXObject(nullptr)); } -TEST_F(FPDFPPOEmbedderTest, BUG_925981) { +TEST_F(FPDFPPOEmbedderTest, Bug925981) { ASSERT_TRUE(OpenDocument("bug_925981.pdf")); ScopedFPDFDocument output_doc_2up( FPDF_ImportNPagesToOne(document(), 612, 792, 2, 1)); EXPECT_EQ(1, FPDF_GetPageCount(output_doc_2up.get())); } -TEST_F(FPDFPPOEmbedderTest, BUG_1229106) { +TEST_F(FPDFPPOEmbedderTest, Bug1229106) { static constexpr int kPageCount = 4; static constexpr int kTwoUpPageCount = 2; static const char kRectsChecksum[] = "140d629b3c96a07ced2e3e408ea85a1d"; @@ -567,7 +567,7 @@ UnloadPage(page); } -TEST_F(FPDFPPOEmbedderTest, BUG_664284) { +TEST_F(FPDFPPOEmbedderTest, Bug664284) { ASSERT_TRUE(OpenDocument("bug_664284.pdf")); FPDF_PAGE page = LoadPage(0); @@ -583,7 +583,7 @@ UnloadPage(page); } -TEST_F(FPDFPPOEmbedderTest, BUG_750568) { +TEST_F(FPDFPPOEmbedderTest, Bug750568) { ASSERT_TRUE(OpenDocument("bug_750568.pdf")); ASSERT_EQ(4, FPDF_GetPageCount(document()));
diff --git a/fpdfsdk/fpdf_save_embeddertest.cpp b/fpdfsdk/fpdf_save_embeddertest.cpp index 4f33c2a..5215100 100644 --- a/fpdfsdk/fpdf_save_embeddertest.cpp +++ b/fpdfsdk/fpdf_save_embeddertest.cpp
@@ -209,14 +209,14 @@ } #endif // PDF_ENABLE_XFA -TEST_F(FPDFSaveEmbedderTest, BUG_342) { +TEST_F(FPDFSaveEmbedderTest, Bug342) { ASSERT_TRUE(OpenDocument("hello_world.pdf")); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); EXPECT_THAT(GetString(), HasSubstr("0000000000 65535 f\r\n")); EXPECT_THAT(GetString(), Not(HasSubstr("0000000000 65536 f\r\n"))); } -TEST_F(FPDFSaveEmbedderTest, BUG_905142) { +TEST_F(FPDFSaveEmbedderTest, Bug905142) { ASSERT_TRUE(OpenDocument("bug_905142.pdf")); EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0)); EXPECT_THAT(GetString(), HasSubstr("/Length 0"));
diff --git a/fpdfsdk/fpdf_sysfontinfo_embeddertest.cpp b/fpdfsdk/fpdf_sysfontinfo_embeddertest.cpp index dcdbb26..9751bfb 100644 --- a/fpdfsdk/fpdf_sysfontinfo_embeddertest.cpp +++ b/fpdfsdk/fpdf_sysfontinfo_embeddertest.cpp
@@ -123,7 +123,7 @@ } // namespace -TEST_F(FPDFUnavailableSysFontInfoEmbedderTest, Bug_972518) { +TEST_F(FPDFUnavailableSysFontInfoEmbedderTest, Bug972518) { ASSERT_TRUE(OpenDocument("bug_972518.pdf")); ASSERT_EQ(1, FPDF_GetPageCount(document()));
diff --git a/fpdfsdk/fpdf_text_embeddertest.cpp b/fpdfsdk/fpdf_text_embeddertest.cpp index 1a0282a..fc3f59b 100644 --- a/fpdfsdk/fpdf_text_embeddertest.cpp +++ b/fpdfsdk/fpdf_text_embeddertest.cpp
@@ -1164,7 +1164,7 @@ UnloadPage(page); } -TEST_F(FPDFTextEmbedderTest, Bug_921) { +TEST_F(FPDFTextEmbedderTest, Bug921) { ASSERT_TRUE(OpenDocument("bug_921.pdf")); FPDF_PAGE page = LoadPage(0); ASSERT_TRUE(page); @@ -1241,7 +1241,7 @@ UnloadPage(page); } -TEST_F(FPDFTextEmbedderTest, bug_782596) { +TEST_F(FPDFTextEmbedderTest, Bug782596) { // If there is a regression in this test, it will only fail under ASAN ASSERT_TRUE(OpenDocument("bug_782596.pdf")); FPDF_PAGE page = LoadPage(0); @@ -1287,7 +1287,7 @@ // Testing that hyphen makers (0x0002) are replacing hard hyphens when // the word contains non-ASCII characters. -TEST_F(FPDFTextEmbedderTest, bug_1029) { +TEST_F(FPDFTextEmbedderTest, Bug1029) { ASSERT_TRUE(OpenDocument("bug_1029.pdf")); FPDF_PAGE page = LoadPage(0); ASSERT_TRUE(page); @@ -1501,7 +1501,7 @@ } } -TEST_F(FPDFTextEmbedderTest, Bug_1139) { +TEST_F(FPDFTextEmbedderTest, Bug1139) { ASSERT_TRUE(OpenDocument("bug_1139.pdf")); FPDF_PAGE page = LoadPage(0); ASSERT_TRUE(page); @@ -1524,7 +1524,7 @@ UnloadPage(page); } -TEST_F(FPDFTextEmbedderTest, Bug_642) { +TEST_F(FPDFTextEmbedderTest, Bug642) { ASSERT_TRUE(OpenDocument("bug_642.pdf")); FPDF_PAGE page = LoadPage(0); ASSERT_TRUE(page);
diff --git a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment_embeddertest.cpp b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment_embeddertest.cpp index 09c3d1e..af3cd59 100644 --- a/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment_embeddertest.cpp +++ b/fpdfsdk/fpdfxfa/cpdfxfa_docenvironment_embeddertest.cpp
@@ -8,7 +8,7 @@ class CPDFXFA_DocEnvironmentEmbedderTest : public XFAJSEmbedderTest {}; // Should not crash. -TEST_F(CPDFXFA_DocEnvironmentEmbedderTest, BUG_1223) { +TEST_F(CPDFXFA_DocEnvironmentEmbedderTest, Bug1223) { ASSERT_TRUE(OpenDocument("simple_xfa.pdf")); EXPECT_FALSE(Execute("URL=y"));
diff --git a/fxjs/xfa/cfxjse_app_embeddertest.cpp b/fxjs/xfa/cfxjse_app_embeddertest.cpp index 0e6fa45..f6f90ab 100644 --- a/fxjs/xfa/cfxjse_app_embeddertest.cpp +++ b/fxjs/xfa/cfxjse_app_embeddertest.cpp
@@ -8,7 +8,7 @@ class CFXJSE_AppEmbedderTest : public XFAJSEmbedderTest {}; // Should not crash. -TEST_F(CFXJSE_AppEmbedderTest, BUG_1252) { +TEST_F(CFXJSE_AppEmbedderTest, Bug1252) { ASSERT_TRUE(OpenDocument("simple_xfa.pdf")); EXPECT_FALSE(Execute("app.activeDocs()"));
diff --git a/fxjs/xfa/cfxjse_formcalc_context_embeddertest.cpp b/fxjs/xfa/cfxjse_formcalc_context_embeddertest.cpp index b0d7762..9bc5b92 100644 --- a/fxjs/xfa/cfxjse_formcalc_context_embeddertest.cpp +++ b/fxjs/xfa/cfxjse_formcalc_context_embeddertest.cpp
@@ -756,7 +756,7 @@ } // This is testing for an OOB read, so will likely only fail under ASAN. -TEST_F(CFXJSE_FormCalcContextEmbedderTest, bug_854623) { +TEST_F(CFXJSE_FormCalcContextEmbedderTest, Bug854623) { ASSERT_TRUE(OpenDocument("simple_xfa.pdf")); const uint8_t test_string[] = { @@ -1176,7 +1176,7 @@ } // Should not crash. -TEST_F(CFXJSE_FormCalcContextEmbedderTest, BUG_1223) { +TEST_F(CFXJSE_FormCalcContextEmbedderTest, Bug1223) { ASSERT_TRUE(OpenDocument("simple_xfa.pdf")); EXPECT_TRUE(Execute("!.somExpression=0")); }
diff --git a/fxjs/xfa/cjx_hostpseudomodel_embeddertest.cpp b/fxjs/xfa/cjx_hostpseudomodel_embeddertest.cpp index 86e0902..66e2df1 100644 --- a/fxjs/xfa/cjx_hostpseudomodel_embeddertest.cpp +++ b/fxjs/xfa/cjx_hostpseudomodel_embeddertest.cpp
@@ -8,7 +8,7 @@ class CJX_HostPseudoModelEmbedderTest : public XFAJSEmbedderTest {}; // Should not crash. -TEST_F(CJX_HostPseudoModelEmbedderTest, BUG_1256) { +TEST_F(CJX_HostPseudoModelEmbedderTest, Bug1256) { ASSERT_TRUE(OpenDocument("simple_xfa.pdf")); EXPECT_TRUE(Execute("$host.openList(1)"));
diff --git a/fxjs/xfa/cjx_list_embeddertest.cpp b/fxjs/xfa/cjx_list_embeddertest.cpp index 17d2de4..801a011 100644 --- a/fxjs/xfa/cjx_list_embeddertest.cpp +++ b/fxjs/xfa/cjx_list_embeddertest.cpp
@@ -8,7 +8,7 @@ class CJX_ListEmbedderTest : public XFAJSEmbedderTest {}; // Should not crash. -TEST_F(CJX_ListEmbedderTest, BUG_1263) { +TEST_F(CJX_ListEmbedderTest, Bug1263) { ASSERT_TRUE(OpenDocument("simple_xfa.pdf")); EXPECT_FALSE(Execute("nodes.insert($form,$)"));
diff --git a/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp b/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp index 6b880b3..feb24de 100644 --- a/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp +++ b/xfa/fxfa/layout/cxfa_layoutitem_embeddertest.cpp
@@ -7,7 +7,7 @@ class CXFALayoutItemEmbedderTest : public XFAJSEmbedderTest {}; -TEST_F(CXFALayoutItemEmbedderTest, Bug_1265) { +TEST_F(CXFALayoutItemEmbedderTest, Bug1265) { ASSERT_TRUE(OpenDocument("bug_1265.pdf")); FPDF_PAGE page0 = LoadPage(0); FPDF_PAGE page1 = LoadPage(1); @@ -16,7 +16,7 @@ UnloadPage(page0); } -TEST_F(CXFALayoutItemEmbedderTest, Bug_1301) { +TEST_F(CXFALayoutItemEmbedderTest, Bug1301) { ASSERT_TRUE(OpenDocument("bug_1301.pdf")); FPDF_PAGE page0 = LoadPage(0); FPDF_PAGE page1 = LoadPage(1); @@ -28,7 +28,7 @@ UnloadPage(page1); } -TEST_F(CXFALayoutItemEmbedderTest, Bug_306123) { +TEST_F(CXFALayoutItemEmbedderTest, Bug306123) { ASSERT_TRUE(OpenDocument("bug_306123.pdf")); FPDF_PAGE page0 = LoadPage(0); FPDF_PAGE page1 = LoadPage(1);
diff --git a/xfa/fxfa/parser/cxfa_document_builder_embeddertest.cpp b/xfa/fxfa/parser/cxfa_document_builder_embeddertest.cpp index da023b2..dea2d73 100644 --- a/xfa/fxfa/parser/cxfa_document_builder_embeddertest.cpp +++ b/xfa/fxfa/parser/cxfa_document_builder_embeddertest.cpp
@@ -7,14 +7,14 @@ class CXFASimpleParserEmbedderTest : public EmbedderTest {}; -TEST_F(CXFASimpleParserEmbedderTest, Bug_216) { +TEST_F(CXFASimpleParserEmbedderTest, Bug216) { ASSERT_TRUE(OpenDocument("bug_216.pdf")); FPDF_PAGE page = LoadPage(0); EXPECT_TRUE(page); UnloadPage(page); } -TEST_F(CXFASimpleParserEmbedderTest, Bug_709793) { +TEST_F(CXFASimpleParserEmbedderTest, Bug709793) { ASSERT_TRUE(OpenDocument("bug_709793.pdf")); FPDF_PAGE page = LoadPage(0); EXPECT_TRUE(page);