[core] Remove underscores from test names in //core
Tests written with the GoogleTest framework should
not use underscores in test names.
Bug: chromium:42270790
Change-Id: Iac0b78da0cf3d9d53f1e89ab88445292c4ae3914
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/125150
Auto-Submit: Ho Cheung <hocheung@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@google.com>
diff --git a/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp b/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
index 41b5959..23edf31 100644
--- a/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
+++ b/core/fpdfapi/edit/cpdf_creator_embeddertest.cpp
@@ -16,9 +16,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/utils/file_util.h"
-class CPDF_CreatorEmbedderTest : public EmbedderTest {};
+class CPDFCreatorEmbedderTest : public EmbedderTest {};
-TEST_F(CPDF_CreatorEmbedderTest, SavedDocsAreEqualAfterParse) {
+TEST_F(CPDFCreatorEmbedderTest, SavedDocsAreEqualAfterParse) {
ASSERT_TRUE(OpenDocument("annotation_stamp_with_ap.pdf"));
// Save without additional data reading.
EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
@@ -44,7 +44,7 @@
EXPECT_EQ(saved_doc_1.size(), saved_doc_2.size());
}
-TEST_F(CPDF_CreatorEmbedderTest, Bug873) {
+TEST_F(CPDFCreatorEmbedderTest, Bug873) {
ASSERT_TRUE(OpenDocument("embedded_attachments.pdf"));
EXPECT_TRUE(FPDF_SaveAsCopy(document(), this, 0));
@@ -62,7 +62,7 @@
EXPECT_THAT(data_after_second_id, testing::StartsWith(">]>>\r\n"));
}
-TEST_F(CPDF_CreatorEmbedderTest, SaveLinearizedInfo) {
+TEST_F(CPDFCreatorEmbedderTest, SaveLinearizedInfo) {
FileAccessForTesting file_acc("linearized.pdf");
FakeFileAccess fake_acc(&file_acc);
diff --git a/core/fpdfapi/font/cpdf_cidfont_unittest.cpp b/core/fpdfapi/font/cpdf_cidfont_unittest.cpp
index d8aaeef..f19f9c9 100644
--- a/core/fpdfapi/font/cpdf_cidfont_unittest.cpp
+++ b/core/fpdfapi/font/cpdf_cidfont_unittest.cpp
@@ -14,9 +14,9 @@
#include "core/fpdfapi/parser/cpdf_test_document.h"
#include "testing/gtest/include/gtest/gtest.h"
-using CPDF_CIDFontTest = TestWithPageModule;
+using CPDFCIDFontTest = TestWithPageModule;
-TEST_F(CPDF_CIDFontTest, Bug920636) {
+TEST_F(CPDFCIDFontTest, Bug920636) {
CPDF_TestDocument doc;
auto font_dict = pdfium::MakeRetain<CPDF_Dictionary>();
font_dict->SetNewFor<CPDF_Name>("Encoding", "Identity−H");
diff --git a/core/fpdfapi/font/cpdf_cmapparser.h b/core/fpdfapi/font/cpdf_cmapparser.h
index db328b7..8cefabf 100644
--- a/core/fpdfapi/font/cpdf_cmapparser.h
+++ b/core/fpdfapi/font/cpdf_cmapparser.h
@@ -26,8 +26,8 @@
static CIDSet CharsetFromOrdering(ByteStringView ordering);
private:
- friend class cpdf_cmapparser_GetCode_Test;
- friend class cpdf_cmapparser_GetCodeRange_Test;
+ friend class CPDFCMapParserTest_GetCode_Test;
+ friend class CPDFCMapParserTest_GetCodeRange_Test;
enum Status {
kStart,
diff --git a/core/fpdfapi/font/cpdf_cmapparser_unittest.cpp b/core/fpdfapi/font/cpdf_cmapparser_unittest.cpp
index 082c368..f1dc837 100644
--- a/core/fpdfapi/font/cpdf_cmapparser_unittest.cpp
+++ b/core/fpdfapi/font/cpdf_cmapparser_unittest.cpp
@@ -19,7 +19,7 @@
} // namespace
-TEST(cpdf_cmapparser, GetCode) {
+TEST(CPDFCMapParserTest, GetCode) {
EXPECT_EQ(0u, CPDF_CMapParser::GetCode(""));
EXPECT_EQ(0u, CPDF_CMapParser::GetCode("<"));
EXPECT_EQ(194u, CPDF_CMapParser::GetCode("<c2"));
@@ -37,7 +37,7 @@
EXPECT_EQ(0u, CPDF_CMapParser::GetCode("<100000000"));
}
-TEST(cpdf_cmapparser, GetCodeRange) {
+TEST(CPDFCMapParserTest, GetCodeRange) {
std::optional<CPDF_CMap::CodeRange> range;
// Must start with a <
diff --git a/core/fpdfapi/font/cpdf_tounicodemap.h b/core/fpdfapi/font/cpdf_tounicodemap.h
index d464ca4..c5feca3 100644
--- a/core/fpdfapi/font/cpdf_tounicodemap.h
+++ b/core/fpdfapi/font/cpdf_tounicodemap.h
@@ -31,8 +31,8 @@
size_t GetUnicodeCountByCharcodeForTesting(uint32_t charcode) const;
private:
- friend class cpdf_tounicodemap_StringToCode_Test;
- friend class cpdf_tounicodemap_StringToWideString_Test;
+ friend class CPDFToUnicodeMapTest_StringToCode_Test;
+ friend class CPDFToUnicodeMapTest_StringToWideString_Test;
static std::optional<uint32_t> StringToCode(ByteStringView input);
static WideString StringToWideString(ByteStringView str);
diff --git a/core/fpdfapi/font/cpdf_tounicodemap_unittest.cpp b/core/fpdfapi/font/cpdf_tounicodemap_unittest.cpp
index 6d032dc..098621d 100644
--- a/core/fpdfapi/font/cpdf_tounicodemap_unittest.cpp
+++ b/core/fpdfapi/font/cpdf_tounicodemap_unittest.cpp
@@ -10,7 +10,7 @@
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
-TEST(cpdf_tounicodemap, StringToCode) {
+TEST(CPDFToUnicodeMapTest, StringToCode) {
EXPECT_THAT(CPDF_ToUnicodeMap::StringToCode("<0001>"), testing::Optional(1u));
EXPECT_THAT(CPDF_ToUnicodeMap::StringToCode("<c2>"), testing::Optional(194u));
EXPECT_THAT(CPDF_ToUnicodeMap::StringToCode("<A2>"), testing::Optional(162u));
@@ -42,7 +42,7 @@
EXPECT_FALSE(CPDF_ToUnicodeMap::StringToCode("<00NN>").has_value());
}
-TEST(cpdf_tounicodemap, StringToWideString) {
+TEST(CPDFToUnicodeMapTest, StringToWideString) {
EXPECT_EQ(L"", CPDF_ToUnicodeMap::StringToWideString(""));
EXPECT_EQ(L"", CPDF_ToUnicodeMap::StringToWideString("1234"));
EXPECT_EQ(L"", CPDF_ToUnicodeMap::StringToWideString("<c2"));
@@ -59,7 +59,7 @@
EXPECT_EQ(res, CPDF_ToUnicodeMap::StringToWideString("<c2abFaAb12>"));
}
-TEST(cpdf_tounicodemap, HandleBeginBFRangeAvoidIntegerOverflow) {
+TEST(CPDFToUnicodeMapTest, HandleBeginBFRangeAvoidIntegerOverflow) {
// Make sure there won't be infinite loops due to integer overflows in
// HandleBeginBFRange().
{
@@ -85,7 +85,7 @@
}
}
-TEST(cpdf_tounicodemap, InsertIntoMultimap) {
+TEST(CPDFToUnicodeMapTest, InsertIntoMultimap) {
{
// Both the CIDs and the unicodes are different.
static constexpr uint8_t kInput1[] =
diff --git a/core/fpdfapi/page/cpdf_colorspace.h b/core/fpdfapi/page/cpdf_colorspace.h
index 3c2e7ad..b63e0f1 100644
--- a/core/fpdfapi/page/cpdf_colorspace.h
+++ b/core/fpdfapi/page/cpdf_colorspace.h
@@ -147,8 +147,8 @@
bool HasSameArray(const CPDF_Object* pObj) const { return m_pArray == pObj; }
private:
- friend class CPDF_CalGray_TranslateImageLine_Test;
- friend class CPDF_CalRGB_TranslateImageLine_Test;
+ friend class CPDFCalGrayTest_TranslateImageLine_Test;
+ friend class CPDFCalRGBTest_TranslateImageLine_Test;
static RetainPtr<CPDF_ColorSpace> AllocateColorSpace(
ByteStringView bsFamilyName);
diff --git a/core/fpdfapi/page/cpdf_colorspace_unittest.cpp b/core/fpdfapi/page/cpdf_colorspace_unittest.cpp
index a768d59..1a1beba 100644
--- a/core/fpdfapi/page/cpdf_colorspace_unittest.cpp
+++ b/core/fpdfapi/page/cpdf_colorspace_unittest.cpp
@@ -14,7 +14,7 @@
using ::testing::ElementsAre;
-TEST(CPDF_CalGray, TranslateImageLine) {
+TEST(CPDFCalGrayTest, TranslateImageLine) {
RetainPtr<CPDF_ColorSpace> pCal = CPDF_ColorSpace::AllocateColorSpace("CalG");
ASSERT_TRUE(pCal);
@@ -26,7 +26,7 @@
EXPECT_THAT(dst, ElementsAre(255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0));
}
-TEST(CPDF_CalRGB, TranslateImageLine) {
+TEST(CPDFCalRGBTest, TranslateImageLine) {
RetainPtr<CPDF_ColorSpace> pCal = CPDF_ColorSpace::AllocateColorSpace("CalR");
ASSERT_TRUE(pCal);
diff --git a/core/fpdfapi/page/cpdf_devicecs_unittest.cpp b/core/fpdfapi/page/cpdf_devicecs_unittest.cpp
index a50d19a..a70ebe3 100644
--- a/core/fpdfapi/page/cpdf_devicecs_unittest.cpp
+++ b/core/fpdfapi/page/cpdf_devicecs_unittest.cpp
@@ -9,7 +9,7 @@
#include "core/fxcrt/retain_ptr.h"
#include "testing/gtest/include/gtest/gtest.h"
-TEST(CPDF_DeviceCSTest, GetRGBFromGray) {
+TEST(CPDFDeviceCSTest, GetRGBFromGray) {
auto device_gray =
pdfium::MakeRetain<CPDF_DeviceCS>(CPDF_ColorSpace::Family::kDeviceGray);
@@ -59,7 +59,7 @@
EXPECT_FLOAT_EQ(1.0f, maybe_rgb.value().blue);
}
-TEST(CPDF_DeviceCSTest, GetRGBFromRGB) {
+TEST(CPDFDeviceCSTest, GetRGBFromRGB) {
auto device_rgb =
pdfium::MakeRetain<CPDF_DeviceCS>(CPDF_ColorSpace::Family::kDeviceRGB);
@@ -90,7 +90,7 @@
EXPECT_FLOAT_EQ(0.78f, maybe_rgb.value().blue);
}
-TEST(CPDF_DeviceCSTest, GetRGBFromCMYK) {
+TEST(CPDFDeviceCSTest, GetRGBFromCMYK) {
auto device_cmyk =
pdfium::MakeRetain<CPDF_DeviceCS>(CPDF_ColorSpace::Family::kDeviceCMYK);
diff --git a/core/fpdfapi/page/cpdf_psengine_unittest.cpp b/core/fpdfapi/page/cpdf_psengine_unittest.cpp
index 79b33b3..31c0c7e 100644
--- a/core/fpdfapi/page/cpdf_psengine_unittest.cpp
+++ b/core/fpdfapi/page/cpdf_psengine_unittest.cpp
@@ -41,7 +41,7 @@
} // namespace
-TEST(CPDF_PSProc, AddOperator) {
+TEST(CPDFPSProcTest, AddOperator) {
static const struct {
const char* name;
PDF_PSOP op;
@@ -96,7 +96,7 @@
}
}
-TEST(CPDF_PSEngine, Basic) {
+TEST(CPDFPSEngineTest, Basic) {
CPDF_PSEngine engine;
EXPECT_FLOAT_EQ(300.0f, DoOperator2(&engine, 100, 200, PSOP_ADD));
@@ -109,7 +109,7 @@
EXPECT_FLOAT_EQ(5.0f, DoOperator1(&engine, -5, PSOP_ABS));
}
-TEST(CPDF_PSEngine, DivByZero) {
+TEST(CPDFPSEngineTest, DivByZero) {
CPDF_PSEngine engine;
// Integer divide by zero is defined as resulting in 0.
@@ -120,7 +120,7 @@
EXPECT_FLOAT_EQ(0.0f, DoOperator2(&engine, 100, 0.0, PSOP_DIV));
}
-TEST(CPDF_PSEngine, Ceiling) {
+TEST(CPDFPSEngineTest, Ceiling) {
CPDF_PSEngine engine;
// Smallest positive float value.
@@ -142,7 +142,7 @@
EXPECT_FLOAT_EQ(-5.0f, DoOperator1(&engine, -5.5f, PSOP_CEILING));
}
-TEST(CPDF_PSEngine, Floor) {
+TEST(CPDFPSEngineTest, Floor) {
CPDF_PSEngine engine;
// Smallest positive float value.
@@ -167,7 +167,7 @@
EXPECT_FLOAT_EQ(-6.0f, DoOperator1(&engine, -5.5f, PSOP_FLOOR));
}
-TEST(CPDF_PSEngine, Round) {
+TEST(CPDFPSEngineTest, Round) {
CPDF_PSEngine engine;
EXPECT_FLOAT_EQ(6.0f, DoOperator1(&engine, 5.9f, PSOP_ROUND));
@@ -192,7 +192,7 @@
EXPECT_FLOAT_EQ(-5.0f, DoOperator1(&engine, -5.5f, PSOP_ROUND));
}
-TEST(CPDF_PSEngine, Truncate) {
+TEST(CPDFPSEngineTest, Truncate) {
CPDF_PSEngine engine;
EXPECT_FLOAT_EQ(0.0f, DoOperator1(&engine, -0.9f, PSOP_TRUNCATE));
@@ -217,7 +217,7 @@
DoOperator1(&engine, max_int * -1.5f, PSOP_TRUNCATE));
}
-TEST(CPDF_PSEngine, Comparisons) {
+TEST(CPDFPSEngineTest, Comparisons) {
CPDF_PSEngine engine;
EXPECT_FLOAT_EQ(1.0f, DoOperator2(&engine, 0.0f, 0.0f, PSOP_EQ));
@@ -251,7 +251,7 @@
EXPECT_FLOAT_EQ(1.0f, DoOperator2(&engine, -1.0f, 0.0f, PSOP_LE));
}
-TEST(CPDF_PSEngine, Logic) {
+TEST(CPDFPSEngineTest, Logic) {
CPDF_PSEngine engine;
EXPECT_FLOAT_EQ(1.0f, DoOperator0(&engine, PSOP_TRUE));
@@ -276,7 +276,7 @@
EXPECT_FLOAT_EQ(0.0f, DoOperator1(&engine, 1.0f, PSOP_NOT));
}
-TEST(CPDF_PSEngine, MathFunctions) {
+TEST(CPDFPSEngineTest, MathFunctions) {
CPDF_PSEngine engine;
EXPECT_FLOAT_EQ(1.4142135f, DoOperator1(&engine, 2.0f, PSOP_SQRT));
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp b/core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp
index 8198daf..cb25710 100644
--- a/core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp
+++ b/core/fpdfapi/page/cpdf_streamcontentparser_unittest.cpp
@@ -5,7 +5,7 @@
#include "core/fpdfapi/page/cpdf_streamcontentparser.h"
#include "testing/gtest/include/gtest/gtest.h"
-TEST(cpdf_streamcontentparser, PDF_FindKeyAbbreviation) {
+TEST(CPDFStreamContentParserTest, PDFFindKeyAbbreviation) {
EXPECT_EQ(ByteStringView("BitsPerComponent"),
CPDF_StreamContentParser::FindKeyAbbreviationForTesting(
ByteStringView("BPC")));
@@ -24,7 +24,7 @@
ByteStringView("WW")));
}
-TEST(cpdf_streamcontentparser, PDF_FindValueAbbreviation) {
+TEST(CPDFStreamContentParserTest, PDFFindValueAbbreviation) {
EXPECT_EQ(ByteStringView("DeviceGray"),
CPDF_StreamContentParser::FindValueAbbreviationForTesting(
ByteStringView("G")));
diff --git a/core/fpdfapi/page/cpdf_streamparser.h b/core/fpdfapi/page/cpdf_streamparser.h
index ad54060..4a8749b 100644
--- a/core/fpdfapi/page/cpdf_streamparser.h
+++ b/core/fpdfapi/page/cpdf_streamparser.h
@@ -47,7 +47,7 @@
const CPDF_Object* pCSObj);
private:
- friend class cpdf_streamparser_ReadHexString_Test;
+ friend class CPDFStreamParserTest_ReadHexString_Test;
static constexpr uint32_t kMaxWordLength = 255;
void GetNextWord(bool& bIsNumber);
diff --git a/core/fpdfapi/page/cpdf_streamparser_unittest.cpp b/core/fpdfapi/page/cpdf_streamparser_unittest.cpp
index f38cd47..17490fc 100644
--- a/core/fpdfapi/page/cpdf_streamparser_unittest.cpp
+++ b/core/fpdfapi/page/cpdf_streamparser_unittest.cpp
@@ -9,7 +9,7 @@
using testing::ElementsAre;
using testing::IsEmpty;
-TEST(cpdf_streamparser, ReadHexString) {
+TEST(CPDFStreamParserTest, ReadHexString) {
{
// Position out of bounds.
uint8_t data[] = "12ab>";
diff --git a/core/fpdfapi/render/cpdf_docrenderdata_unittest.cpp b/core/fpdfapi/render/cpdf_docrenderdata_unittest.cpp
index 9611e3f..4a5f85b 100644
--- a/core/fpdfapi/render/cpdf_docrenderdata_unittest.cpp
+++ b/core/fpdfapi/render/cpdf_docrenderdata_unittest.cpp
@@ -169,7 +169,7 @@
}
};
-TEST(CPDF_DocRenderDataTest, TransferFunctionOne) {
+TEST(CPDFDocRenderDataTest, TransferFunctionOne) {
RetainPtr<CPDF_Dictionary> func_dict = CreateType2FunctionDict();
TestDocRenderData render_data;
@@ -194,7 +194,7 @@
EXPECT_EQ(0x001a1a1au, func->TranslateColor(0x99000000));
}
-TEST(CPDF_DocRenderDataTest, TransferFunctionArray) {
+TEST(CPDFDocRenderDataTest, TransferFunctionArray) {
CPDF_IndirectObjectHolder holder;
auto func_array = pdfium::MakeRetain<CPDF_Array>();
func_array->Append(CreateType0FunctionStreamReference(holder));
@@ -223,7 +223,7 @@
EXPECT_EQ(0x00191a00u, func->TranslateColor(0x99000000));
}
-TEST(CPDF_DocRenderDataTest, BadTransferFunctions) {
+TEST(CPDFDocRenderDataTest, BadTransferFunctions) {
{
auto func_stream = CreateBadType4FunctionStream();
diff --git a/core/fpdftext/cpdf_linkextract_unittest.cpp b/core/fpdftext/cpdf_linkextract_unittest.cpp
index 44e71b3..c329943 100644
--- a/core/fpdftext/cpdf_linkextract_unittest.cpp
+++ b/core/fpdftext/cpdf_linkextract_unittest.cpp
@@ -16,11 +16,11 @@
private:
// Add test cases as friends to access protected member functions.
// Access CheckMailLink and CheckWebLink.
- FRIEND_TEST(CPDF_LinkExtractTest, CheckMailLink);
- FRIEND_TEST(CPDF_LinkExtractTest, CheckWebLink);
+ FRIEND_TEST(CPDFLinkExtractTest, CheckMailLink);
+ FRIEND_TEST(CPDFLinkExtractTest, CheckWebLink);
};
-TEST(CPDF_LinkExtractTest, CheckMailLink) {
+TEST(CPDFLinkExtractTest, CheckMailLink) {
CPDF_TestLinkExtract extractor;
// Check cases that fail to extract valid mail link.
const wchar_t* const kInvalidStrings[] = {
@@ -65,7 +65,7 @@
}
}
-TEST(CPDF_LinkExtractTest, CheckWebLink) {
+TEST(CPDFLinkExtractTest, CheckWebLink) {
CPDF_TestLinkExtract extractor;
// Check cases that fail to extract valid web link.
// The last few are legit web addresses that we don't handle now.
diff --git a/core/fxcodec/gif/cfx_gifcontext_unittest.cpp b/core/fxcodec/gif/cfx_gifcontext_unittest.cpp
index ce43750..f5a626a 100644
--- a/core/fxcodec/gif/cfx_gifcontext_unittest.cpp
+++ b/core/fxcodec/gif/cfx_gifcontext_unittest.cpp
@@ -33,7 +33,7 @@
}
};
-TEST(CFX_GifContext, SetInputBuffer) {
+TEST(CFXGifContextTest, SetInputBuffer) {
uint8_t buffer[] = {0x00, 0x01, 0x02};
CFX_GifContextForTest context;
@@ -50,7 +50,7 @@
EXPECT_EQ(0u, context.InputBuffer()->GetPosition());
}
-TEST(CFX_GifContext, ReadAllOrNone) {
+TEST(CFXGifContextTest, ReadAllOrNone) {
CFX_GifContextForTest context;
context.SetTestInputBuffer({});
EXPECT_FALSE(context.ReadAllOrNone(pdfium::span<uint8_t>()));
@@ -79,7 +79,7 @@
}
}
-TEST(CFX_GifContext, ReadGifSignature) {
+TEST(CFXGifContextTest, ReadGifSignature) {
CFX_GifContextForTest context;
{
uint8_t data[1];
@@ -137,7 +137,7 @@
}
}
-TEST(CFX_GifContext, ReadLocalScreenDescriptor) {
+TEST(CFXGifContextTest, ReadLocalScreenDescriptor) {
CFX_GifContextForTest context;
{
uint8_t data[1];
@@ -213,7 +213,7 @@
}
}
-TEST(CFX_GifContext, ReadHeader) {
+TEST(CFXGifContextTest, ReadHeader) {
CFX_GifContextForTest context;
// Bad signature
{
diff --git a/core/fxcodec/jbig2/JBig2_BitStream_unittest.cpp b/core/fxcodec/jbig2/JBig2_BitStream_unittest.cpp
index 8e207b0..b20fd8f 100644
--- a/core/fxcodec/jbig2/JBig2_BitStream_unittest.cpp
+++ b/core/fxcodec/jbig2/JBig2_BitStream_unittest.cpp
@@ -6,7 +6,7 @@
#include "testing/gtest/include/gtest/gtest.h"
-TEST(JBig2_BitStream, ReadNBits) {
+TEST(JBig2BitStreamTest, ReadNBits) {
const uint8_t kData[] = {0xb1}; // 10110001
CJBig2_BitStream stream(kData, 0);
@@ -25,7 +25,7 @@
EXPECT_EQ(1, val2);
}
-TEST(JBig2_BitStream, ReadNBitsLargerThenData) {
+TEST(JBig2BitStreamTest, ReadNBitsLargerThenData) {
const uint8_t kData[] = {0xb1}; // 10110001
CJBig2_BitStream stream(kData, 42);
@@ -34,7 +34,7 @@
EXPECT_EQ(0xb1U, val1);
}
-TEST(JBig2_BitStream, ReadNBitsNullStream) {
+TEST(JBig2BitStreamTest, ReadNBitsNullStream) {
CJBig2_BitStream stream({}, 0);
uint32_t val1;
@@ -44,7 +44,7 @@
EXPECT_EQ(-1, stream.readNBits(2, &val2));
}
-TEST(JBig2_BitStream, ReadNBitsOutOfBounds) {
+TEST(JBig2BitStreamTest, ReadNBitsOutOfBounds) {
const uint8_t kData[] = {0xb1}; // 10110001
CJBig2_BitStream stream(kData, 42);
@@ -55,7 +55,7 @@
EXPECT_EQ(-1, stream.readNBits(2, &val2));
}
-TEST(JBig2_BitStream, ReadNBitsWhereNIs36) {
+TEST(JBig2BitStreamTest, ReadNBitsWhereNIs36) {
const uint8_t kData[] = {0xb0, 0x01, 0x00, 0x00, 0x40};
CJBig2_BitStream stream(kData, 42);
diff --git a/core/fxcrt/css/cfx_cssdeclaration_unittest.cpp b/core/fxcrt/css/cfx_cssdeclaration_unittest.cpp
index aa4fd54..081ba52 100644
--- a/core/fxcrt/css/cfx_cssdeclaration_unittest.cpp
+++ b/core/fxcrt/css/cfx_cssdeclaration_unittest.cpp
@@ -8,7 +8,7 @@
#include "testing/gtest/include/gtest/gtest.h"
-TEST(CFX_CSSDeclarationTest, HexEncodingParsing) {
+TEST(CFXCSSDeclarationTest, HexEncodingParsing) {
std::optional<FX_ARGB> maybe_color;
// Length value invalid.
@@ -49,7 +49,7 @@
EXPECT_EQ(60, FXARGB_B(maybe_color.value()));
}
-TEST(CFX_CSSDeclarationTest, RGBEncodingParsing) {
+TEST(CFXCSSDeclarationTest, RGBEncodingParsing) {
std::optional<FX_ARGB> maybe_color;
// Invalid input for rgb() syntax.
diff --git a/core/fxcrt/css/cfx_cssstylesheet_unittest.cpp b/core/fxcrt/css/cfx_cssstylesheet_unittest.cpp
index 4457024..f5f17f1 100644
--- a/core/fxcrt/css/cfx_cssstylesheet_unittest.cpp
+++ b/core/fxcrt/css/cfx_cssstylesheet_unittest.cpp
@@ -17,7 +17,7 @@
#include "core/fxcrt/css/cfx_cssvaluelist.h"
#include "testing/gtest/include/gtest/gtest.h"
-class CFX_CSSStyleSheetTest : public testing::Test {
+class CFXCSSStyleSheetTest : public testing::Test {
public:
void SetUp() override {
sheet_ = std::make_unique<CFX_CSSStyleSheet>();
@@ -105,35 +105,35 @@
CFX_CSSDeclaration* decl_;
};
-TEST_F(CFX_CSSStyleSheetTest, ParseEmpty) {
+TEST_F(CFXCSSStyleSheetTest, ParseEmpty) {
LoadAndVerifyRuleCount(L"", 0);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseBlankEmpty) {
+TEST_F(CFXCSSStyleSheetTest, ParseBlankEmpty) {
LoadAndVerifyRuleCount(L" \n\r\t", 0);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseStrayClose1) {
+TEST_F(CFXCSSStyleSheetTest, ParseStrayClose1) {
VerifyLoadFails(L"}");
}
-TEST_F(CFX_CSSStyleSheetTest, ParseStrayClose2) {
+TEST_F(CFXCSSStyleSheetTest, ParseStrayClose2) {
LoadAndVerifyRuleCount(L"foo }", 0);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseStrayClose3) {
+TEST_F(CFXCSSStyleSheetTest, ParseStrayClose3) {
VerifyLoadFails(L"foo {a: b}}");
}
-TEST_F(CFX_CSSStyleSheetTest, ParseEmptySelector) {
+TEST_F(CFXCSSStyleSheetTest, ParseEmptySelector) {
VerifyLoadFails(L"{a: b}");
}
-TEST_F(CFX_CSSStyleSheetTest, ParseEmptyBody) {
+TEST_F(CFXCSSStyleSheetTest, ParseEmptyBody) {
LoadAndVerifyRuleCount(L"foo {}", 0);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseMultipleSelectors) {
+TEST_F(CFXCSSStyleSheetTest, ParseMultipleSelectors) {
const wchar_t* buf =
L"a { border: 10px; }\n"
L"bcdef { text-decoration: underline; }\n"
@@ -187,7 +187,7 @@
CFX_CSSNumber::Unit::kNumber);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseChildSelectors) {
+TEST_F(CFXCSSStyleSheetTest, ParseChildSelectors) {
const wchar_t* buf = L"a b c { border: 10px; }";
EXPECT_TRUE(sheet_->LoadBuffer(buf));
EXPECT_EQ(1u, sheet_->CountRules());
@@ -225,7 +225,7 @@
CFX_CSSNumber::Unit::kPixels);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseUnhandledSelectors) {
+TEST_F(CFXCSSStyleSheetTest, ParseUnhandledSelectors) {
const wchar_t* buf = L"a > b { padding: 0; }";
EXPECT_TRUE(sheet_->LoadBuffer(buf));
EXPECT_EQ(0u, sheet_->CountRules());
@@ -243,11 +243,11 @@
EXPECT_EQ(0u, sheet_->CountRules());
}
-TEST_F(CFX_CSSStyleSheetTest, ParseMultipleSelectorsCombined) {
+TEST_F(CFXCSSStyleSheetTest, ParseMultipleSelectorsCombined) {
LoadAndVerifyDecl(L"a, b, c { border: 5px; }", {L"a", L"b", L"c"}, 4);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseBorder) {
+TEST_F(CFXCSSStyleSheetTest, ParseBorder) {
LoadAndVerifyDecl(L"a { border: 5px; }", {L"a"}, 4);
VerifyFloat(CFX_CSSProperty::BorderLeftWidth, 5.0,
CFX_CSSNumber::Unit::kPixels);
@@ -259,7 +259,7 @@
CFX_CSSNumber::Unit::kPixels);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseBorderFull) {
+TEST_F(CFXCSSStyleSheetTest, ParseBorderFull) {
LoadAndVerifyDecl(L"a { border: 5px solid red; }", {L"a"}, 4);
VerifyFloat(CFX_CSSProperty::BorderLeftWidth, 5.0,
CFX_CSSNumber::Unit::kPixels);
@@ -271,62 +271,62 @@
CFX_CSSNumber::Unit::kPixels);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseBorderLeft) {
+TEST_F(CFXCSSStyleSheetTest, ParseBorderLeft) {
LoadAndVerifyDecl(L"a { border-left: 2.5pc; }", {L"a"}, 1);
VerifyFloat(CFX_CSSProperty::BorderLeftWidth, 2.5,
CFX_CSSNumber::Unit::kPicas);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseBorderLeftThick) {
+TEST_F(CFXCSSStyleSheetTest, ParseBorderLeftThick) {
LoadAndVerifyDecl(L"a { border-left: thick; }", {L"a"}, 1);
VerifyEnum(CFX_CSSProperty::BorderLeftWidth, CFX_CSSPropertyValue::Thick);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseBorderRight) {
+TEST_F(CFXCSSStyleSheetTest, ParseBorderRight) {
LoadAndVerifyDecl(L"a { border-right: 2.5pc; }", {L"a"}, 1);
VerifyFloat(CFX_CSSProperty::BorderRightWidth, 2.5,
CFX_CSSNumber::Unit::kPicas);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseBorderTop) {
+TEST_F(CFXCSSStyleSheetTest, ParseBorderTop) {
LoadAndVerifyDecl(L"a { border-top: 2.5pc; }", {L"a"}, 1);
VerifyFloat(CFX_CSSProperty::BorderTopWidth, 2.5,
CFX_CSSNumber::Unit::kPicas);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseBorderBottom) {
+TEST_F(CFXCSSStyleSheetTest, ParseBorderBottom) {
LoadAndVerifyDecl(L"a { border-bottom: 2.5pc; }", {L"a"}, 1);
VerifyFloat(CFX_CSSProperty::BorderBottomWidth, 2.5,
CFX_CSSNumber::Unit::kPicas);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseWithCommentsInSelector) {
+TEST_F(CFXCSSStyleSheetTest, ParseWithCommentsInSelector) {
LoadAndVerifyDecl(L"/**{*/a/**}*/ { border-bottom: 2.5pc; }", {L"a"}, 1);
VerifyFloat(CFX_CSSProperty::BorderBottomWidth, 2.5,
CFX_CSSNumber::Unit::kPicas);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseWithCommentsInProperty) {
+TEST_F(CFXCSSStyleSheetTest, ParseWithCommentsInProperty) {
LoadAndVerifyDecl(L"a { /*}*/border-bottom: 2.5pc; }", {L"a"}, 1);
VerifyFloat(CFX_CSSProperty::BorderBottomWidth, 2.5,
CFX_CSSNumber::Unit::kPicas);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseWithCommentsInValue) {
+TEST_F(CFXCSSStyleSheetTest, ParseWithCommentsInValue) {
LoadAndVerifyDecl(L"a { border-bottom: /*;*/2.5pc;/* color:red;*/ }", {L"a"},
1);
VerifyFloat(CFX_CSSProperty::BorderBottomWidth, 2.5,
CFX_CSSNumber::Unit::kPicas);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseWithUnterminatedCommentInSelector) {
+TEST_F(CFXCSSStyleSheetTest, ParseWithUnterminatedCommentInSelector) {
LoadAndVerifyRuleCount(L"a/* { border-bottom: 2.5pc; }", 0);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseWithUnterminatedCommentInProperty) {
+TEST_F(CFXCSSStyleSheetTest, ParseWithUnterminatedCommentInProperty) {
LoadAndVerifyRuleCount(L"a { /*border-bottom: 2.5pc; }", 1);
}
-TEST_F(CFX_CSSStyleSheetTest, ParseWithUnterminatedCommentInValue) {
+TEST_F(CFXCSSStyleSheetTest, ParseWithUnterminatedCommentInValue) {
LoadAndVerifyRuleCount(L"a { border-bottom: /*2.5pc; }", 1);
}
diff --git a/core/fxcrt/css/cfx_cssvaluelistparser_unittest.cpp b/core/fxcrt/css/cfx_cssvaluelistparser_unittest.cpp
index f8e6e60..920725f 100644
--- a/core/fxcrt/css/cfx_cssvaluelistparser_unittest.cpp
+++ b/core/fxcrt/css/cfx_cssvaluelistparser_unittest.cpp
@@ -11,7 +11,7 @@
#include "core/fxcrt/widestring.h"
#include "testing/gtest/include/gtest/gtest.h"
-TEST(CFX_CSSValueListParserTest, rgb_short) {
+TEST(CFXCSSValueListParserTest, RGBShort) {
auto parser = std::make_unique<CFX_CSSValueListParser>(L"#abc", L' ');
auto maybe_next = parser->NextValue();
ASSERT_TRUE(maybe_next.has_value());
@@ -39,7 +39,7 @@
EXPECT_FALSE(parser->NextValue());
}
-TEST(CFX_CSSValueListParserTest, number_parsing) {
+TEST(CFXCSSValueListParserTest, NumberParsing) {
auto parser = std::make_unique<CFX_CSSValueListParser>(L"1234", L' ');
auto maybe_next = parser->NextValue();
ASSERT_TRUE(maybe_next.has_value());
@@ -84,7 +84,7 @@
EXPECT_EQ(L"43a1.12.34", maybe_next.value().string_view);
}
-TEST(CFX_CSSValueListParserTest, string_parsing) {
+TEST(CFXCSSValueListParserTest, StringParsing) {
auto parser = std::make_unique<CFX_CSSValueListParser>(L"'string'", L' ');
auto maybe_next = parser->NextValue();
ASSERT_TRUE(maybe_next.has_value());
@@ -105,7 +105,7 @@
EXPECT_EQ(L"standalone", maybe_next.value().string_view);
}
-TEST(CFX_CSSValueListParserTest, multiparsing) {
+TEST(CFXCSSValueListParserTest, MultiParsing) {
auto parser = std::make_unique<CFX_CSSValueListParser>(L"1, 2, 3", L',');
auto maybe_next = parser->NextValue();
ASSERT_TRUE(maybe_next.has_value());
diff --git a/core/fxcrt/fx_coordinates_unittest.cpp b/core/fxcrt/fx_coordinates_unittest.cpp
index 27a816b..01945c0 100644
--- a/core/fxcrt/fx_coordinates_unittest.cpp
+++ b/core/fxcrt/fx_coordinates_unittest.cpp
@@ -21,7 +21,7 @@
} // namespace
-TEST(CFX_FloatRect, FromFXRect) {
+TEST(CFXFloatRectTest, FromFXRect) {
FX_RECT downwards(10, 20, 30, 40);
CFX_FloatRect rect(downwards);
EXPECT_FLOAT_EQ(rect.left, 10.0f);
@@ -30,7 +30,7 @@
EXPECT_FLOAT_EQ(rect.top, 40.0f);
}
-TEST(CFX_FloatRect, GetBBox) {
+TEST(CFXFloatRectTest, GetBBox) {
CFX_FloatRect rect = CFX_FloatRect::GetBBox({});
EXPECT_FLOAT_EQ(0.0f, rect.left);
EXPECT_FLOAT_EQ(0.0f, rect.bottom);
@@ -86,7 +86,7 @@
EXPECT_FLOAT_EQ(6.3f, rect.top);
}
-TEST(CFX_FloatRect, GetInnerRect) {
+TEST(CFXFloatRectTest, GetInnerRect) {
FX_RECT inner_rect;
CFX_FloatRect rect;
@@ -140,7 +140,7 @@
EXPECT_EQ(kMinInt, inner_rect.top);
}
-TEST(CFX_FloatRect, GetOuterRect) {
+TEST(CFXFloatRectTest, GetOuterRect) {
FX_RECT outer_rect;
CFX_FloatRect rect;
@@ -192,7 +192,7 @@
EXPECT_EQ(kMinInt, outer_rect.top);
}
-TEST(CFX_FloatRect, Normalize) {
+TEST(CFXFloatRectTest, Normalize) {
CFX_FloatRect rect;
rect.Normalize();
EXPECT_FLOAT_EQ(0.0f, rect.left);
@@ -214,7 +214,7 @@
EXPECT_FLOAT_EQ(3.0f, rect.top);
}
-TEST(CFX_FloatRect, Scale) {
+TEST(CFXFloatRectTest, Scale) {
CFX_FloatRect rect(-1.0f, -3.0f, 4.5f, 3.2f);
rect.Scale(1.0f);
EXPECT_FLOAT_EQ(-1.0f, rect.left);
@@ -243,7 +243,7 @@
EXPECT_FLOAT_EQ(0.0f, rect.top);
}
-TEST(CFX_FloatRect, ScaleEmpty) {
+TEST(CFXFloatRectTest, ScaleEmpty) {
CFX_FloatRect rect;
rect.Scale(1.0f);
EXPECT_FLOAT_EQ(0.0f, rect.left);
@@ -267,7 +267,7 @@
EXPECT_FLOAT_EQ(0.0f, rect.top);
}
-TEST(CFX_FloatRect, ScaleFromCenterPoint) {
+TEST(CFXFloatRectTest, ScaleFromCenterPoint) {
CFX_FloatRect rect(-1.0f, -3.0f, 4.5f, 3.2f);
rect.ScaleFromCenterPoint(1.0f);
EXPECT_FLOAT_EQ(-1.0f, rect.left);
@@ -296,7 +296,7 @@
EXPECT_NEAR(0.1f, rect.top, 0.001f);
}
-TEST(CFX_FloatRect, ScaleFromCenterPointEmpty) {
+TEST(CFXFloatRectTest, ScaleFromCenterPointEmpty) {
CFX_FloatRect rect;
rect.ScaleFromCenterPoint(1.0f);
EXPECT_FLOAT_EQ(0.0f, rect.left);
@@ -320,7 +320,7 @@
EXPECT_FLOAT_EQ(0.0f, rect.top);
}
-TEST(CFX_FloatRect, Print) {
+TEST(CFXFloatRectTest, Print) {
std::ostringstream os;
CFX_FloatRect rect;
os << rect;
@@ -337,7 +337,7 @@
EXPECT_EQ("rect[w 4.25 x h 3.25 (left 10.5, bot 20.5)]", os.str());
}
-TEST(CFX_RectF, Print) {
+TEST(CFXRectFTest, Print) {
std::ostringstream os;
CFX_RectF rect;
os << rect;
@@ -354,7 +354,7 @@
EXPECT_EQ("rect[w 4.25 x h 3.25 (left 10.5, top 20.5)]", os.str());
}
-TEST(CFX_Matrix, ReverseIdentity) {
+TEST(CFXMatrixTest, ReverseIdentity) {
CFX_Matrix rev = CFX_Matrix().GetInverse();
EXPECT_FLOAT_EQ(1.0, rev.a);
@@ -370,7 +370,7 @@
EXPECT_FLOAT_EQ(expected.y, result.y);
}
-TEST(CFX_Matrix, SetIdentity) {
+TEST(CFXMatrixTest, SetIdentity) {
CFX_Matrix m;
EXPECT_FLOAT_EQ(1.0f, m.a);
EXPECT_FLOAT_EQ(0.0f, m.b);
@@ -393,7 +393,7 @@
EXPECT_TRUE(m.IsIdentity());
}
-TEST(CFX_Matrix, GetInverse) {
+TEST(CFXMatrixTest, GetInverse) {
constexpr CFX_Matrix m(3, 0, 2, 3, 1, 4);
CFX_Matrix rev = m.GetInverse();
@@ -411,7 +411,7 @@
}
// Note, I think these are a bug and the matrix should be the identity.
-TEST(CFX_Matrix, GetInverseCR702041) {
+TEST(CFXMatrixTest, GetInverseCR702041) {
// The determinate is < std::numeric_limits<float>::epsilon()
constexpr CFX_Matrix m(0.947368443f, -0.108947366f, -0.923076928f,
0.106153846f, 18.0f, 787.929993f);
@@ -431,7 +431,7 @@
EXPECT_FLOAT_EQ(expected.y, result.y);
}
-TEST(CFX_Matrix, GetInverseCR714187) {
+TEST(CFXMatrixTest, GetInverseCR714187) {
// The determinate is < std::numeric_limits<float>::epsilon()
constexpr CFX_Matrix m(0.000037f, 0.0f, 0.0f, -0.000037f, 182.413101f,
136.977646f);
@@ -453,7 +453,7 @@
#define EXPECT_NEAR_FIVE_PLACES(a, b) EXPECT_NEAR((a), (b), 1e-5)
-TEST(CFX_Matrix, ComposeTransformations) {
+TEST(CFXMatrixTest, ComposeTransformations) {
// sin(FXSYS_PI/2) and cos(FXSYS_PI/2) have a tiny error and are not
// exactly 1.0f and 0.0f. The rotation matrix is thus not perfect.
@@ -580,7 +580,7 @@
EXPECT_FLOAT_EQ(73.0f, p_10_20_transformed.y);
}
-TEST(CFX_Matrix, TransformRectForRectF) {
+TEST(CFXMatrixTest, TransformRectForRectF) {
CFX_Matrix rotate_90;
rotate_90.Rotate(FXSYS_PI / 2);
@@ -601,7 +601,7 @@
EXPECT_FLOAT_EQ(55.25f, rect.Height());
}
-TEST(CFX_Matrix, TransformRectForFloatRect) {
+TEST(CFXMatrixTest, TransformRectForFloatRect) {
CFX_Matrix rotate_90;
rotate_90.Rotate(FXSYS_PI / 2);
diff --git a/core/fxcrt/fx_random_unittest.cpp b/core/fxcrt/fx_random_unittest.cpp
index 0c6b9b0..2634d74 100644
--- a/core/fxcrt/fx_random_unittest.cpp
+++ b/core/fxcrt/fx_random_unittest.cpp
@@ -9,7 +9,7 @@
#include "testing/gtest/include/gtest/gtest.h"
-TEST(FX_Random, GenerateMT3600times) {
+TEST(FXRandomTest, GenerateMT3600times) {
// Prove this doesn't spin wait for a second each time.
// Since our global seeds are sequential, they wont't collide once
// seeded until 2^32 calls, and if the PNRG is any good, we won't
diff --git a/core/fxcrt/xml/cfx_xmlchardata_unittest.cpp b/core/fxcrt/xml/cfx_xmlchardata_unittest.cpp
index 8afa2ca..7a2bec2 100644
--- a/core/fxcrt/xml/cfx_xmlchardata_unittest.cpp
+++ b/core/fxcrt/xml/cfx_xmlchardata_unittest.cpp
@@ -7,17 +7,17 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/string_write_stream.h"
-TEST(CFX_XMLCharDataTest, GetType) {
+TEST(CFXXMLCharDataTest, GetType) {
CFX_XMLCharData data(L"My Data");
EXPECT_EQ(CFX_XMLNode::Type::kCharData, data.GetType());
}
-TEST(CFX_XMLCharDataTest, GetText) {
+TEST(CFXXMLCharDataTest, GetText) {
CFX_XMLCharData data(L"My Data");
EXPECT_EQ(L"My Data", data.GetText());
}
-TEST(CFX_XMLCharDataTest, Clone) {
+TEST(CFXXMLCharDataTest, Clone) {
CFX_XMLDocument doc;
CFX_XMLCharData data(L"My Data");
@@ -28,7 +28,7 @@
EXPECT_EQ(L"My Data", ToXMLCharData(clone)->GetText());
}
-TEST(CFX_XMLCharDataTest, Save) {
+TEST(CFXXMLCharDataTest, Save) {
auto stream = pdfium::MakeRetain<StringWriteStream>();
CFX_XMLCharData data(L"My Data");
data.Save(stream);
diff --git a/core/fxcrt/xml/cfx_xmldocument_unittest.cpp b/core/fxcrt/xml/cfx_xmldocument_unittest.cpp
index 7faabff..2511c40 100644
--- a/core/fxcrt/xml/cfx_xmldocument_unittest.cpp
+++ b/core/fxcrt/xml/cfx_xmldocument_unittest.cpp
@@ -7,12 +7,12 @@
#include "core/fxcrt/xml/cfx_xmlinstruction.h"
#include "testing/gtest/include/gtest/gtest.h"
-TEST(CFX_XMLDocumentTest, Root) {
+TEST(CFXXMLDocumentTest, Root) {
CFX_XMLDocument doc;
EXPECT_TRUE(doc.GetRoot() != nullptr);
}
-TEST(CFX_XMLDocumentTest, CreateNode) {
+TEST(CFXXMLDocumentTest, CreateNode) {
CFX_XMLDocument doc;
auto* node = doc.CreateNode<CFX_XMLElement>(L"elem");
diff --git a/core/fxcrt/xml/cfx_xmlelement_unittest.cpp b/core/fxcrt/xml/cfx_xmlelement_unittest.cpp
index 59d4b40..3bcaf2e 100644
--- a/core/fxcrt/xml/cfx_xmlelement_unittest.cpp
+++ b/core/fxcrt/xml/cfx_xmlelement_unittest.cpp
@@ -9,17 +9,17 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/string_write_stream.h"
-TEST(CFX_XMLElementTest, GetType) {
+TEST(CFXXMLElementTest, GetType) {
CFX_XMLElement node(L"node");
EXPECT_EQ(CFX_XMLNode::Type::kElement, node.GetType());
}
-TEST(CFX_XMLElementTest, GetName) {
+TEST(CFXXMLElementTest, GetName) {
CFX_XMLElement node(L"node");
EXPECT_EQ(L"node", node.GetName());
}
-TEST(CFX_XMLElementTest, GetLocalTagName) {
+TEST(CFXXMLElementTest, GetLocalTagName) {
CFX_XMLElement node1(L"node1");
EXPECT_EQ(L"node1", node1.GetLocalTagName());
@@ -27,7 +27,7 @@
EXPECT_EQ(L"node2", node2.GetLocalTagName());
}
-TEST(CFX_XMLElementTest, GetNamespacePrefix) {
+TEST(CFXXMLElementTest, GetNamespacePrefix) {
CFX_XMLElement node1(L"node1");
EXPECT_EQ(L"", node1.GetNamespacePrefix());
@@ -35,7 +35,7 @@
EXPECT_EQ(L"test", node2.GetNamespacePrefix());
}
-TEST(CFX_XMLElementTest, GetNamespaceURI) {
+TEST(CFXXMLElementTest, GetNamespaceURI) {
CFX_XMLElement node1(L"node1");
EXPECT_EQ(L"", node1.GetNamespaceURI());
@@ -52,7 +52,7 @@
EXPECT_EQ(L"https://example.org/ns2", node2.GetNamespaceURI());
}
-TEST(CFX_XMLElementTest, Attributes) {
+TEST(CFXXMLElementTest, Attributes) {
CFX_XMLElement node(L"test:node");
node.SetAttribute(L"first", L"one");
node.SetAttribute(L"second", L"two");
@@ -70,7 +70,7 @@
ASSERT_EQ(1U, node.GetAttributes().size());
}
-TEST(CFX_XMLElementTest, Clone) {
+TEST(CFXXMLElementTest, Clone) {
CFX_XMLDocument doc;
CFX_XMLElement node(L"test:node");
node.SetAttribute(L"first", L"one");
@@ -107,7 +107,7 @@
EXPECT_EQ(L"Text Child", text->GetText());
}
-TEST(CFX_XMLElementTest, Save) {
+TEST(CFXXMLElementTest, Save) {
auto stream = pdfium::MakeRetain<StringWriteStream>();
CFX_XMLElement node(L"root");
@@ -115,7 +115,7 @@
EXPECT_EQ("<root />\n", stream->ToString());
}
-TEST(CFX_XMLElementTest, SaveWithAttributes) {
+TEST(CFXXMLElementTest, SaveWithAttributes) {
auto stream = pdfium::MakeRetain<StringWriteStream>();
CFX_XMLElement node(L"root");
node.SetAttribute(L"first", L"one");
@@ -125,7 +125,7 @@
EXPECT_EQ("<root first=\"one\" second=\"two\" />\n", stream->ToString());
}
-TEST(CFX_XMLElementTest, SaveWithChildren) {
+TEST(CFXXMLElementTest, SaveWithChildren) {
auto stream = pdfium::MakeRetain<StringWriteStream>();
CFX_XMLElement node(L"node");
@@ -151,7 +151,7 @@
stream->ToString());
}
-TEST(CFX_XMLElementTest, SaveWithNamespace) {
+TEST(CFXXMLElementTest, SaveWithNamespace) {
auto stream = pdfium::MakeRetain<StringWriteStream>();
CFX_XMLElement node(L"test:root");
node.SetAttribute(L"xmlns:test", L"https://example.org/ns1");
@@ -161,7 +161,7 @@
stream->ToString());
}
-TEST(CFX_XMLElementTest, GetFirstChildNamed) {
+TEST(CFXXMLElementTest, GetFirstChildNamed) {
CFX_XMLElement node(L"node");
CFX_XMLElement node_child1(L"node-child");
node.AppendLastChild(&node_child1);
@@ -171,7 +171,7 @@
EXPECT_EQ(&node_child1, found);
}
-TEST(CFX_XMLElementTest, GetFirstChildNamedMissing) {
+TEST(CFXXMLElementTest, GetFirstChildNamedMissing) {
CFX_XMLElement node(L"node");
CFX_XMLElement node_child1(L"node-child");
node.AppendLastChild(&node_child1);
@@ -180,7 +180,7 @@
EXPECT_TRUE(found == nullptr);
}
-TEST(CFX_XMLElementTest, GetNthChildNamed) {
+TEST(CFXXMLElementTest, GetNthChildNamed) {
CFX_XMLElement node(L"node");
CFX_XMLElement node_child1(L"node-child");
CFX_XMLElement node_child2(L"node-child");
@@ -194,7 +194,7 @@
EXPECT_EQ(&node_child3, found);
}
-TEST(CFX_XMLElementTest, GetNthChildNamedMissingChild) {
+TEST(CFXXMLElementTest, GetNthChildNamedMissingChild) {
CFX_XMLElement node(L"node");
CFX_XMLElement node_child1(L"node-child");
CFX_XMLElement node_child2(L"node-child");
@@ -207,7 +207,7 @@
EXPECT_TRUE(found == nullptr);
}
-TEST(CFX_XMLElementTest, GetTextData) {
+TEST(CFXXMLElementTest, GetTextData) {
CFX_XMLElement node(L"node");
CFX_XMLText text_child1(L"Text Child 1");
diff --git a/core/fxcrt/xml/cfx_xmlinstruction_unittest.cpp b/core/fxcrt/xml/cfx_xmlinstruction_unittest.cpp
index 37f7405..838af3c 100644
--- a/core/fxcrt/xml/cfx_xmlinstruction_unittest.cpp
+++ b/core/fxcrt/xml/cfx_xmlinstruction_unittest.cpp
@@ -13,24 +13,24 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/string_write_stream.h"
-TEST(CFX_XMLInstructionTest, GetType) {
+TEST(CFXXMLInstructionTest, GetType) {
CFX_XMLInstruction node(L"acrobat");
EXPECT_EQ(CFX_XMLNode::Type::kInstruction, node.GetType());
}
-TEST(CFX_XMLInstructionTest, AcrobatInstruction) {
+TEST(CFXXMLInstructionTest, AcrobatInstruction) {
CFX_XMLInstruction node(L"acrobat");
EXPECT_TRUE(node.IsAcrobat());
EXPECT_FALSE(node.IsOriginalXFAVersion());
}
-TEST(CFX_XMLInstructionTest, OriginalXFAInstruction) {
+TEST(CFXXMLInstructionTest, OriginalXFAInstruction) {
CFX_XMLInstruction node(L"originalXFAVersion");
EXPECT_TRUE(node.IsOriginalXFAVersion());
EXPECT_FALSE(node.IsAcrobat());
}
-TEST(CFX_XMLInstructionTest, TargetData) {
+TEST(CFXXMLInstructionTest, TargetData) {
CFX_XMLInstruction node(L"acrobat");
EXPECT_EQ(0U, node.GetTargetData().size());
@@ -43,7 +43,7 @@
EXPECT_EQ(L"secondString", data[1]);
}
-TEST(CFX_XMLInstructionTest, Clone) {
+TEST(CFXXMLInstructionTest, Clone) {
CFX_XMLDocument doc;
CFX_XMLInstruction node(L"acrobat");
@@ -63,14 +63,14 @@
EXPECT_EQ(L"secondString", data[1]);
}
-TEST(CFX_XMLInstructionTest, SaveXML) {
+TEST(CFXXMLInstructionTest, SaveXML) {
auto stream = pdfium::MakeRetain<StringWriteStream>();
CFX_XMLInstruction node(L"xml");
node.Save(stream);
EXPECT_EQ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n", stream->ToString());
}
-TEST(CFX_XMLInstructionTest, SaveAcrobat) {
+TEST(CFXXMLInstructionTest, SaveAcrobat) {
auto stream = pdfium::MakeRetain<StringWriteStream>();
CFX_XMLInstruction node(L"acrobat");
node.AppendData(L"http://www.xfa.org/schema/xfa-template/3.3/");
@@ -82,7 +82,7 @@
stream->ToString());
}
-TEST(CFX_XMLInstructionTest, ParseAndReSave) {
+TEST(CFXXMLInstructionTest, ParseAndReSave) {
static const char input[] =
"<?acrobat http://www.xfa.org/schema/xfa-template/3.3/ Display:1 ?>\n"
"<node></node>";
@@ -114,7 +114,7 @@
out_stream->ToString());
}
-TEST(CFX_XMLInstructionTest, ParseAndReSaveInnerInstruction) {
+TEST(CFXXMLInstructionTest, ParseAndReSaveInnerInstruction) {
static const char input[] =
"<node>\n"
"<?acrobat http://www.xfa.org/schema/xfa-template/3.3/ Display:1 ?>\n"
diff --git a/core/fxcrt/xml/cfx_xmlnode_unittest.cpp b/core/fxcrt/xml/cfx_xmlnode_unittest.cpp
index ad07579..489e51b 100644
--- a/core/fxcrt/xml/cfx_xmlnode_unittest.cpp
+++ b/core/fxcrt/xml/cfx_xmlnode_unittest.cpp
@@ -28,7 +28,7 @@
} // namespace
-TEST(CFX_XMLNodeTest, GetParent) {
+TEST(CFXXMLNodeTest, GetParent) {
CFX_XMLElement node1(L"node");
CFX_XMLElement node2(L"node2");
CFX_XMLElement node3(L"node3");
@@ -41,7 +41,7 @@
EXPECT_EQ(&node2, node3.GetParent());
}
-TEST(CFX_XMLNodeTest, GetRoot) {
+TEST(CFXXMLNodeTest, GetRoot) {
CFX_XMLElement node1(L"node");
CFX_XMLElement node2(L"node2");
CFX_XMLElement node3(L"node3");
@@ -54,7 +54,7 @@
EXPECT_EQ(&node1, node3.GetRoot());
}
-TEST(CFX_XMLNodeTest, GetChildren) {
+TEST(CFXXMLNodeTest, GetChildren) {
CFX_XMLElement node1(L"node");
CFX_XMLElement node2(L"node2");
CFX_XMLElement node3(L"node3");
@@ -76,7 +76,7 @@
EXPECT_TRUE(node4.GetFirstChild() == nullptr);
}
-TEST(CFX_XMLNodeTest, DeleteChildren) {
+TEST(CFXXMLNodeTest, DeleteChildren) {
CFX_XMLElement node1(L"node");
CFX_XMLElement node2(L"node2");
CFX_XMLElement node3(L"node3");
@@ -100,7 +100,7 @@
EXPECT_TRUE(node3.GetParent() == &node2);
}
-TEST(CFX_XMLNodeTest, AddingChildren) {
+TEST(CFXXMLNodeTest, AddingChildren) {
CFX_XMLElement parent(L"Root");
CFX_XMLElement nodeA(L"A");
CFX_XMLElement nodeB(L"B");
@@ -144,7 +144,7 @@
EXPECT_EQ(L"EADBCF", ReverseChildrenString(&parent));
}
-TEST(CFX_XMLNodeTest, RemovingMiddleChild) {
+TEST(CFXXMLNodeTest, RemovingMiddleChild) {
CFX_XMLElement node1(L"node1");
CFX_XMLElement node2(L"node2");
CFX_XMLElement node3(L"node3");
@@ -174,7 +174,7 @@
EXPECT_TRUE(node4.GetNextSibling() == nullptr);
}
-TEST(CFX_XMLNodeTest, RemovingFirstChild) {
+TEST(CFXXMLNodeTest, RemovingFirstChild) {
CFX_XMLElement node1(L"node1");
CFX_XMLElement node2(L"node2");
CFX_XMLElement node3(L"node3");
@@ -204,7 +204,7 @@
EXPECT_TRUE(node4.GetNextSibling() == nullptr);
}
-TEST(CFX_XMLNodeTest, RemovingLastChild) {
+TEST(CFXXMLNodeTest, RemovingLastChild) {
CFX_XMLElement node1(L"node1");
CFX_XMLElement node2(L"node2");
CFX_XMLElement node3(L"node3");
@@ -233,7 +233,7 @@
EXPECT_TRUE(node3.GetNextSibling() == nullptr);
}
-TEST(CFX_XMLNodeTest, RemovingOnlyChild) {
+TEST(CFXXMLNodeTest, RemovingOnlyChild) {
CFX_XMLElement node1(L"node1");
CFX_XMLElement node2(L"node2");
@@ -250,7 +250,7 @@
EXPECT_TRUE(node2.GetPrevSibling() == nullptr);
}
-TEST(CFX_XMLNodeTest, RemoveMissingChild) {
+TEST(CFXXMLNodeTest, RemoveMissingChild) {
CFX_XMLElement node1(L"node1");
CFX_XMLElement node2(L"node2");
CFX_XMLElement node3(L"node3");
diff --git a/core/fxcrt/xml/cfx_xmlparser_unittest.cpp b/core/fxcrt/xml/cfx_xmlparser_unittest.cpp
index c692a0b..98235cf 100644
--- a/core/fxcrt/xml/cfx_xmlparser_unittest.cpp
+++ b/core/fxcrt/xml/cfx_xmlparser_unittest.cpp
@@ -13,7 +13,7 @@
#include "core/fxcrt/xml/cfx_xmlinstruction.h"
#include "testing/gtest/include/gtest/gtest.h"
-class CFX_XMLParserTest : public testing::Test {
+class CFXXMLParserTest : public testing::Test {
public:
std::unique_ptr<CFX_XMLDocument> Parse(pdfium::span<const char> input) {
CFX_XMLParser parser(
@@ -22,14 +22,14 @@
}
};
-TEST_F(CFX_XMLParserTest, AttributesMustBeQuoted) {
+TEST_F(CFXXMLParserTest, AttributesMustBeQuoted) {
static const char input[] =
"<script display=1>\n"
"</script>";
ASSERT_TRUE(Parse(input) == nullptr);
}
-TEST_F(CFX_XMLParserTest, Attributes) {
+TEST_F(CFXXMLParserTest, Attributes) {
static const char input[] =
"<script contentType=\"application/x-javascript\" display=\"1\">\n"
"</script>";
@@ -44,7 +44,7 @@
EXPECT_EQ(L"1", script->GetAttribute(L"display"));
}
-TEST_F(CFX_XMLParserTest, CData) {
+TEST_F(CFXXMLParserTest, CData) {
static const char input[] =
"<script>\n"
" <![CDATA[\n"
@@ -67,7 +67,7 @@
EXPECT_EQ(cdata, script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, CDataWithInnerScript) {
+TEST_F(CFXXMLParserTest, CDataWithInnerScript) {
static const char input[] =
"<script>\n"
" <![CDATA[\n"
@@ -92,7 +92,7 @@
EXPECT_EQ(cdata, script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, ArrowBangArrow) {
+TEST_F(CFXXMLParserTest, ArrowBangArrow) {
static const char input[] =
"<script>\n"
" <!>\n"
@@ -106,7 +106,7 @@
EXPECT_EQ(L"\n \n", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, ArrowBangBracketArrow) {
+TEST_F(CFXXMLParserTest, ArrowBangBracketArrow) {
static const char input[] =
"<script>\n"
" <![>\n"
@@ -120,7 +120,7 @@
EXPECT_EQ(L"\n ", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, IncompleteCData) {
+TEST_F(CFXXMLParserTest, IncompleteCData) {
static const char input[] =
"<script>\n"
" <![CDATA>\n"
@@ -134,7 +134,7 @@
EXPECT_EQ(L"\n ", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, UnClosedCData) {
+TEST_F(CFXXMLParserTest, UnClosedCData) {
static const char input[] =
"<script>\n"
" <![CDATA[\n"
@@ -148,7 +148,7 @@
EXPECT_EQ(L"\n ", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, EmptyCData) {
+TEST_F(CFXXMLParserTest, EmptyCData) {
static const char input[] =
"<script>\n"
" <![CDATA[]]>\n"
@@ -162,7 +162,7 @@
EXPECT_EQ(L"\n \n", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, Comment) {
+TEST_F(CFXXMLParserTest, Comment) {
static const char input[] =
"<script>\n"
" <!-- A Comment -->\n"
@@ -176,7 +176,7 @@
EXPECT_EQ(L"\n \n", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, IncorrectCommentStart) {
+TEST_F(CFXXMLParserTest, IncorrectCommentStart) {
static const char input[] =
"<script>\n"
" <!- A Comment -->\n"
@@ -190,7 +190,7 @@
EXPECT_EQ(L"\n \n", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, CommentEmpty) {
+TEST_F(CFXXMLParserTest, CommentEmpty) {
static const char input[] =
"<script>\n"
" <!---->\n"
@@ -204,7 +204,7 @@
EXPECT_EQ(L"\n \n", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, CommentThreeDash) {
+TEST_F(CFXXMLParserTest, CommentThreeDash) {
static const char input[] =
"<script>\n"
" <!--->\n"
@@ -218,7 +218,7 @@
EXPECT_EQ(L"\n ", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, CommentTwoDash) {
+TEST_F(CFXXMLParserTest, CommentTwoDash) {
static const char input[] =
"<script>\n"
" <!-->\n"
@@ -231,7 +231,7 @@
EXPECT_EQ(L"\n ", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, Entities) {
+TEST_F(CFXXMLParserTest, Entities) {
static const char input[] =
"<script>"
"B" // B
@@ -256,7 +256,7 @@
EXPECT_EQ(L"BTjH\xab48&<>'\"", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, EntityOverflowHex) {
+TEST_F(CFXXMLParserTest, EntityOverflowHex) {
static const char input[] =
"<script>"
"�"
@@ -271,7 +271,7 @@
EXPECT_EQ(L" ", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, EntityOverflowDecimal) {
+TEST_F(CFXXMLParserTest, EntityOverflowDecimal) {
static const char input[] =
"<script>"
"�"
@@ -286,7 +286,7 @@
EXPECT_EQ(L" ", script->GetTextData());
}
-TEST_F(CFX_XMLParserTest, IsXMLNameChar) {
+TEST_F(CFXXMLParserTest, IsXMLNameChar) {
EXPECT_FALSE(CFX_XMLParser::IsXMLNameChar(L'-', true));
EXPECT_TRUE(CFX_XMLParser::IsXMLNameChar(L'-', false));
@@ -324,15 +324,15 @@
EXPECT_FALSE(CFX_XMLParser::IsXMLNameChar(0xFFFE, true));
}
-TEST_F(CFX_XMLParserTest, BadElementClose) {
+TEST_F(CFXXMLParserTest, BadElementClose) {
ASSERT_TRUE(Parse("</endtag>") == nullptr);
}
-TEST_F(CFX_XMLParserTest, DoubleElementClose) {
+TEST_F(CFXXMLParserTest, DoubleElementClose) {
ASSERT_TRUE(Parse("<p></p></p>") == nullptr);
}
-TEST_F(CFX_XMLParserTest, ParseInstruction) {
+TEST_F(CFXXMLParserTest, ParseInstruction) {
static const char input[] =
"<?originalXFAVersion http://www.xfa.org/schema/xfa-template/3.3/ ?>"
"<form></form>";
@@ -348,7 +348,7 @@
EXPECT_TRUE(instruction->IsOriginalXFAVersion());
}
-TEST_F(CFX_XMLParserTest, BadEntity) {
+TEST_F(CFXXMLParserTest, BadEntity) {
static const char input[] =
"<script>"
"Test &<p>; thing"
diff --git a/core/fxcrt/xml/cfx_xmltext_unittest.cpp b/core/fxcrt/xml/cfx_xmltext_unittest.cpp
index 55e879c..08f5e17 100644
--- a/core/fxcrt/xml/cfx_xmltext_unittest.cpp
+++ b/core/fxcrt/xml/cfx_xmltext_unittest.cpp
@@ -7,17 +7,17 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/string_write_stream.h"
-TEST(CFX_XMLTextTest, GetType) {
+TEST(CFXXMLTextTest, GetType) {
CFX_XMLText text(L"My Text");
EXPECT_EQ(CFX_XMLNode::Type::kText, text.GetType());
}
-TEST(CFX_XMLTextTest, GetText) {
+TEST(CFXXMLTextTest, GetText) {
CFX_XMLText data(L"My Data");
EXPECT_EQ(L"My Data", data.GetText());
}
-TEST(CFX_XMLTextTest, Clone) {
+TEST(CFXXMLTextTest, Clone) {
CFX_XMLDocument doc;
CFX_XMLText data(L"My Data");
@@ -27,7 +27,7 @@
EXPECT_EQ(L"My Data", ToXMLText(clone)->GetText());
}
-TEST(CFX_XMLTextTest, Save) {
+TEST(CFXXMLTextTest, Save) {
auto stream = pdfium::MakeRetain<StringWriteStream>();
CFX_XMLText data(L"My Data & this is < and > and ' and \" stuff.");
data.Save(stream);
@@ -35,7 +35,7 @@
stream->ToString());
}
-TEST(CFX_XMLTextTest, SetText) {
+TEST(CFXXMLTextTest, SetText) {
CFX_XMLText data(L"My Data");
EXPECT_EQ(L"My Data", data.GetText());
data.SetText(L"New Text");
diff --git a/core/fxge/dib/cfx_dibbase_unittest.cpp b/core/fxge/dib/cfx_dibbase_unittest.cpp
index ac05c09..f6a3a12 100644
--- a/core/fxge/dib/cfx_dibbase_unittest.cpp
+++ b/core/fxge/dib/cfx_dibbase_unittest.cpp
@@ -55,7 +55,7 @@
} // namespace
-TEST(CFX_DIBBaseTest, GetOverlapRectTrivialOverlap) {
+TEST(CFXDIBBaseTest, GetOverlapRectTrivialOverlap) {
auto bitmap = pdfium::MakeRetain<CFX_DIBitmap>();
EXPECT_TRUE(bitmap->Create(400, 300, FXDIB_Format::k1bppRgb));
@@ -68,7 +68,7 @@
RunOverlapRectTest(bitmap.Get(), kInput, &kExpectedOutput);
}
-TEST(CFX_DIBBaseTest, GetOverlapRectOverlapNoLimit) {
+TEST(CFXDIBBaseTest, GetOverlapRectOverlapNoLimit) {
auto bitmap = pdfium::MakeRetain<CFX_DIBitmap>();
EXPECT_TRUE(bitmap->Create(400, 300, FXDIB_Format::k1bppRgb));
@@ -81,7 +81,7 @@
RunOverlapRectTest(bitmap.Get(), kInput, &kExpectedOutput);
}
-TEST(CFX_DIBBaseTest, GetOverlapRectOverlapLimitedBySource) {
+TEST(CFXDIBBaseTest, GetOverlapRectOverlapLimitedBySource) {
auto bitmap = pdfium::MakeRetain<CFX_DIBitmap>();
EXPECT_TRUE(bitmap->Create(400, 300, FXDIB_Format::k1bppRgb));
@@ -94,7 +94,7 @@
RunOverlapRectTest(bitmap.Get(), kInput, &kExpectedOutput);
}
-TEST(CFX_DIBBaseTest, GetOverlapRectOverlapLimitedByDestination) {
+TEST(CFXDIBBaseTest, GetOverlapRectOverlapLimitedByDestination) {
auto bitmap = pdfium::MakeRetain<CFX_DIBitmap>();
EXPECT_TRUE(bitmap->Create(400, 300, FXDIB_Format::k1bppRgb));
@@ -107,7 +107,7 @@
RunOverlapRectTest(bitmap.Get(), kInput, &kExpectedOutput);
}
-TEST(CFX_DIBBaseTest, GetOverlapRectBadInputs) {
+TEST(CFXDIBBaseTest, GetOverlapRectBadInputs) {
auto bitmap = pdfium::MakeRetain<CFX_DIBitmap>();
EXPECT_TRUE(bitmap->Create(400, 300, FXDIB_Format::k1bppRgb));