From 8f77b1a8a345919dd2102478902188a73dee8b80 Mon Sep 17 00:00:00 2001 From: "Marc R. Hoffmann" Date: Wed, 2 Feb 2022 19:37:18 +0100 Subject: [PATCH] (squash) Review Comment Co-authored-by: Evgeny Mandrikov <138671+Godin@users.noreply.github.com> --- .../jacoco/agent/rt/internal/CoverageTransformerTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/CoverageTransformerTest.java b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/CoverageTransformerTest.java index 7dc67b1c14..194ac206cc 100644 --- a/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/CoverageTransformerTest.java +++ b/org.jacoco.agent.rt.test/src/org/jacoco/agent/rt/internal/CoverageTransformerTest.java @@ -214,8 +214,10 @@ public void testTransformFailure() { protectionDomain, null); fail("IllegalClassFormatException expected."); } catch (IllegalClassFormatException e) { - assertTrue(e.getMessage(), e.getMessage() - .startsWith("Error while instrumenting org.jacoco.Sample")); + assertEquals(String.format( + "Error while instrumenting %s with JaCoCo %s/%s.", + "org.jacoco.Sample", JaCoCo.VERSION, JaCoCo.COMMITID_SHORT), + e.getMessage()); } recorder.assertException(IllegalClassFormatException.class, String.format("Error while instrumenting %s with JaCoCo %s/%s.",