Open andre15silva opened 3 years ago
Hi @andre15silva
I could be the case that we have a mistake in our test data. Which is the project example related to Calculator
that you test?
I see that the in some example projects that use Calculator, the while(true)
does not exist.
Example:
https://github.com/SpoonLabs/flacoco/blob/master/examples/exampleFL1/FLtest1/src/main/java/fr/spoonlabs/FLtest1/Calculator.java
https://github.com/SpoonLabs/flacoco/blob/master/examples/exampleFL3/FLtest1/src/main/java/fr/spoonlabs/FLtest1/Calculator.java
Hi @martinezmatias
This is a new test case based on exampleFL1
, sorry for not specifying it.
I haven't added it since it won't work, but I'll open a PR in a second so you can see.
You can see https://github.com/SpoonLabs/flacoco/pull/69 now
Perfect. I see now that in the PR the example has the while(true)
Right now,
flacoco
does not considerwhile
loop conditions that have a constant valuetrue
in the coverage computation.Example:
Output:
while(true) {
is on line 10.Another example where this happens is https://github.com/SpoonLabs/astor/tree/master/examples/quixbugscompiled/detect_cycle