Open DomainName97 opened 1 month ago
Hi, could you create a small reproducer project? It was not possible to reproduce this issue locally.
I will try to explain. The class VerificationFailedException has a parameter(throwable) in the constructor, which is not used in the code.
Creating a class object looks like the following
catch (exception: RustoreHttpException.BadRequestException) {
throw VerificationFailedException(exception)
Then I check the type of an object not using class parameters
is VerificationFailedException -> {
...
}
In that case, the class is not included in the test coverage report if it is written in a separate file on one line. But if the class parameter is used in the code, then the single-line class will be included in test coverage
Furthermore, if you write it in several lines, it will be included in the test coverage report
Describe the bug Same test suite, but different instruction coverage measurements exist
Expected behavior Сoverage measurements should be equal
Reproducer When a class written in a separate file on one line, it is not included in test coverage. But if you write it in several lines, it will be included in the test coverage report.
Reports
Environment