pitest
pitest copied to clipboard
Conditionals with `isDebugEnabled`
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.