diff options
Diffstat (limited to 'core/fpdfapi/edit')
-rw-r--r-- | core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp index 403bd6ab03..e9b3d15d30 100644 --- a/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp +++ b/core/fpdfapi/edit/cpdf_pagecontentgenerator_unittest.cpp @@ -117,12 +117,12 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessGraphics) { pPathObj->m_FillType = FXFILL_WINDING; pPathObj->m_bStroke = true; - float rgb[3] = {0.5f, 0.7f, 0.35f}; + static const std::vector<float> rgb = {0.5f, 0.7f, 0.35f}; CPDF_ColorSpace* pCS = CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB); - pPathObj->m_ColorState.SetFillColor(pCS, rgb, 3); + pPathObj->m_ColorState.SetFillColor(pCS, rgb); - float rgb2[3] = {1, 0.9f, 0}; - pPathObj->m_ColorState.SetStrokeColor(pCS, rgb2, 3); + static const std::vector<float> rgb2 = {1, 0.9f, 0}; + pPathObj->m_ColorState.SetStrokeColor(pCS, rgb2); pPathObj->m_GeneralState.SetFillAlpha(0.5f); pPathObj->m_GeneralState.SetStrokeAlpha(0.8f); @@ -140,7 +140,7 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessGraphics) { pathString.Left(48)); EXPECT_EQ(" gs 1 0 0 1 0 0 cm 1 2 m 3 4 l 5 6 l h B Q\n", pathString.Right(43)); - ASSERT_TRUE(pathString.GetLength() > 91); + ASSERT_GT(pathString.GetLength(), 91U); CPDF_Dictionary* externalGS = TestGetResource( &generator, "ExtGState", pathString.Mid(48, pathString.GetLength() - 91)); ASSERT_TRUE(externalGS); @@ -174,12 +174,12 @@ TEST_F(CPDF_PageContentGeneratorTest, ProcessStandardText) { CPDF_Font* pFont = CPDF_Font::GetStockFont(pDoc.get(), "Times-Roman"); pTextObj->m_TextState.SetFont(pFont); pTextObj->m_TextState.SetFontSize(10.0f); - float rgb[3] = {0.5f, 0.7f, 0.35f}; + static const std::vector<float> rgb = {0.5f, 0.7f, 0.35f}; CPDF_ColorSpace* pCS = CPDF_ColorSpace::GetStockCS(PDFCS_DEVICERGB); - pTextObj->m_ColorState.SetFillColor(pCS, rgb, 3); + pTextObj->m_ColorState.SetFillColor(pCS, rgb); - float rgb2[3] = {1, 0.9f, 0}; - pTextObj->m_ColorState.SetStrokeColor(pCS, rgb2, 3); + static const std::vector<float> rgb2 = {1, 0.9f, 0}; + pTextObj->m_ColorState.SetStrokeColor(pCS, rgb2); pTextObj->m_GeneralState.SetFillAlpha(0.5f); pTextObj->m_GeneralState.SetStrokeAlpha(0.8f); pTextObj->Transform(CFX_Matrix(1, 0, 0, 1, 100, 100)); |