From 195dbbe1015596fdd2a09571eb76fafeeb72605b Mon Sep 17 00:00:00 2001 From: Bob Singor Date: Tue, 3 Nov 2026 23:19:49 +0200 Subject: [PATCH] Give the caption golden's polygon and polyline a stroke colour EPDFMeasureEmbedderTest.CaptionAppearanceGolden failed the release's Linux source tests on main (8074892ce, run 41716790696): 1,322 pixels differ. The CI's actual and expected images differ only in the bottom row, where the polygon and polyline lost their black outlines. The test never gives those two a /C, and since #104 (no stroke) a shape without one draws no outline, as Acrobat does. #104 already set a colour in the measurement tests' line helper; this test builds its shapes itself. Now they are black, so the golden draws as before and measure_captions.png is unchanged. On Linux in Docker the release job's suites now pass in full: unit 1,327, embedder 1,777. On macOS this test already failed before #104: measure_captions_mac.png is stale for another reason. --- fpdfsdk/epdf_measure_embeddertest.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fpdfsdk/epdf_measure_embeddertest.cpp b/fpdfsdk/epdf_measure_embeddertest.cpp index c925dac5f..404d76e7a 100644 --- a/fpdfsdk/epdf_measure_embeddertest.cpp +++ b/fpdfsdk/epdf_measure_embeddertest.cpp @@ -943,6 +943,9 @@ TEST_F(EPDFMeasureEmbedderTest, CaptionAppearanceGolden) { FS_RECTF rect{x - 1, 101, x + 121, 29}; ASSERT_TRUE(FPDFAnnot_SetRect(a.get(), &rect)); ASSERT_TRUE(EPDFAnnot_SetVertices(a.get(), points, 4)); + // Black: a shape without /C has no stroke. + ASSERT_TRUE( + FPDFAnnot_SetColor(a.get(), FPDFANNOT_COLORTYPE_Color, 0, 0, 0, 255)); SetText(a.get(), "Contents", i ? L"14.85 m" : L"13.57 m²"); FS_POINTF center{x + 150, 70}; ASSERT_TRUE(