cobertura/cobertura — pull request #195 by alexkamp (2014-09-15 13:21:03+00:00)
Title: Activated the "FailOnError" flag for the Unit Test "instrumentExisting"

hey,

the unit test "instrumentExisting" tries to instrument an existing classfile. However, in fact the classfile is not in the repository. Thereby the test should fail, it does not test the functionality it should test. Still, "FailOnError" is false, so the instrumentation fails silently and the test succeeds. Thereby the test is currently equivalent to "instrumentNotExisting", which certainly was not the intention of the test author.

This commit sets the "FailOnError"-flag to "true". This makes sure that the test is failing if the input file is missing.

In a future step, it is necessary to add the missing classfile. However, I can't do so as I do not have the file.

Greetings,
Alex

PS: I think there should also be a test for non-existing file and failOnError true, just to make sure the flag has the desired effect.

PPS: It would be nice to check whether the instrumented class file is actually generated as well.