Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditionals with isDebugEnabled #1312

Open
daniel-frak opened this issue Feb 28, 2024 · 0 comments
Open

Conditionals with isDebugEnabled #1312

daniel-frak opened this issue Feb 28, 2024 · 0 comments

Comments

@daniel-frak
Copy link

Consider code like this (using @Slf4j):

if(log.isDebugEnabled()) {
  log.debug("Test log {}". performSomeComputation());
}

While pitest correctly ignores the log.debug statement, the conditional is still being mutated.

The Pitest quick start guide says PIT avoids generating this type of equivalent mutation by not generating mutations for lines that contain a call to common logging frameworks, so I would expect this conditional to be ignored as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant