commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jörg Schaible <Joerg.Schai...@Elsag-Solutions.com>
Subject RE: [lang] Clover coverage of text.VariableFormatter
Date Wed, 27 Jul 2005 07:58:56 GMT
Oliver Heger wrote on Wednesday, July 27, 2005 8:19 AM:

> Jörg Schaible wrote:
>> Gary Gregory wrote on Monday, July 25, 2005 9:13 PM:
>> 
>> 
>>> Oliver (or others):
>>> 
>>> There is just one line of code marked with a "?" by Clover in
>>> VariableFormatter. The rest of the class is covered by the unit
>>> tests: 
>>> 
>>> http://people.apache.org/~ggregory/commons-lang/2.2-dev/docs/clover/
>>> 
>>> I am not sure if this would be fixed by using the latest version of
>>> Clover but it means that we do not have 100% for VariableFormatter
>>> and it sure would be nice to get there.
>>> 
>>> Can you shine a light on this or see if you can get that last line
>>> to get covered?
>> 
>> 
>> This means, that there is within this line more than one execution
>> path e.g. typically for ?: expessions or complex logical expressions.
>> Clover is aware, that you did not test all the paths and neither mark
>> the line as totally tested nor as untested.
>> 
>> - Jörg
>> 
> 
> In our special case this would mean that not all conditions of the
> while-loop are triggered, right? These conditions test for
> the existence
> of a variable start token and of an end token after that.
> Looking at the
> unit tests I think that all possible combinations of existing and
> missing start and end tokens would be covered.
> 
> Is it possible that because of the short cut evaluation of boolean
> expressions some pathes are never executed? Just a guess.

Definately! For a test just format the source so that each of the logical expressions is on
its own line. Then is the logic of Clover obvious ...

- Jörg

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message