Skip to content

excludesLints test in WithoutLintsTest.java doesn't fail on exclusion failure #1483

Description

@Thayorns

The parameterized test excludesLints in src/test/java/org/eolang/lints/WithoutLintsTest.java:34 builds a WithoutLints over a single fake lint named ascii-only (line 41) and asks it to exclude unit-test-missing or unit-test-without-live-file (line 42). Neither name is in the list, so the assertion at line 44 only checks that ascii-only is not equal to the excluded name. That holds whatever WithoutLints does: if its filter handed the origin back untouched, the test would still be green.

The fixture drifted over several refactors, the last one in 235cda2d swapping in LtFake("ascii-only"), while the names in @ValueSource stayed the same.

Putting new WithoutLintsTest.LtFake(lid) into the fixture next to another fake, and asserting that lid is not among the remaining names, makes the test fail when exclusion stops working.

@yegor256

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood-titleThe title was checked and improved by ChatGPT

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions