diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 257df53c7e..939a99658c 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -34,6 +34,7 @@ This is a {{ site.pmd.release_type }} release. * [#2014](https://github.com/pmd/pmd/issues/2014): \[core] Making add(SourceCode sourceCode) public for alternative file systems * [#2036](https://github.com/pmd/pmd/issues/2036): \[core] Wrong include/exclude patterns are silently ignored * [#2067](https://github.com/pmd/pmd/issues/2067): \[core] Build issue on Windows + * [#2072](https://github.com/pmd/pmd/issues/2072): \[test]\[core] Not enough info in "test setup error" when numbers of lines do not match * java * [#2042](https://github.com/pmd/pmd/issues/2042): \[java] PMD crashes with ClassFormatError: Absent Code attribute... * java-bestpractices @@ -97,6 +98,7 @@ This is a {{ site.pmd.release_type }} release. * [#2047](https://github.com/pmd/pmd/pull/2047): \[java] Fix computation of metrics with annotations - [Andi](https://github.com/andipabst) * [#2065](https://github.com/pmd/pmd/pull/2065): \[java] Stop checking UR anomalies - [Carlos Macasaet](https://github.com/l0s) * [#2070](https://github.com/pmd/pmd/pull/2070): \[core] Fix renderer tests for windows builds - [Saladoc](https://github.com/Saladoc) +* [#2073](https://github.com/pmd/pmd/pull/2073): \[test]\[core] Add expected and actual line of numbers to message wording - [snuyanzin](https://github.com/snuyanzin) {% endtocmaker %} diff --git a/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTst.java b/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTst.java index 232f8a45cc..5ba2ce9815 100644 --- a/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTst.java +++ b/pmd-test/src/main/java/net/sourceforge/pmd/testframework/RuleTst.java @@ -212,8 +212,9 @@ public abstract class RuleTst { List expected = test.getExpectedLineNumbers(); if (report.size() != expected.size()) { - throw new RuntimeException("Test setup error: number of execpted line numbers doesn't match " - + "number of violations for test case '" + test.getDescription() + "'"); + throw new RuntimeException("Test setup error: number of expected line numbers " + expected.size() + + " doesn't match number of violations " + report.size() + " for test case '" + + test.getDescription() + "'"); } Iterator it = report.iterator();