Skip to content

pitestDiff lists the mutants of a line marked diff-coverage: ignore as live; should the marker cover them? #32

Backlog

Description

@vlsi

I mark a changed line that no test runs with // diff-coverage: ignore -- <reason>, and diff coverage stops counting it. pitestDiff still lists every mutant on that line as live, as no test reaches it: ..., on every branch that changes the line.

log.debug("x"); // diff-coverage: ignore -- debug output only

The marker says that no test needs to run the line, so every mutant PIT makes there is NO_COVERAGE. The guide's diff-coverage section offers the marker for such a line, and its mutation section says nothing about the mutants on it.

On main (38aa248), only DiffCoverageReport reads the marker (IGNORE_MARKER, DiffCoverageReport.java:40). PitestSurvivors and ChangedLinesFilter do not read it. I established this by reading the code; I have not run pitestDiff on such a line.

#31 adds // mutant: equivalent <id> -- <reason>, which acknowledges a live mutant by its id. With it, an ignored line needs a second marker with an id for each mutant. #17 rules out diff-coverage: ignore only for a line that tests run, and neither #31 nor the guides say what an ignored line needs.

Should pitestDiff list the NO_COVERAGE mutants of a line marked diff-coverage: ignore with the acknowledged mutants, under the marker's reason? Or is the second marker intended? Either answer belongs in both guides, next to the step that offers diff-coverage: ignore.

Found in the review of #31.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions