#111 option to exclude setters/getters

open
nobody
None
5
2006-12-01
2006-12-01
No

A faster, 'hardcode-able' feature would be to detect setter and getters, and to not intrument them.

If a setter is strictly doing 1 assignment to the variable of the supposed name/type, or if the getter strictly return that supposed variable+type, then exclude.

This is particularly usefull when analysing coverage of tests.

Example of code to exclude:

void setFoo(<type> x) {
this.foo = x;
}

<type> getFoo() {
return this.foo;
}

Example of code to NOT exclude:

void setFoo(String x) {
if(x!=null) //because of condition
this.foo = x;
}

int getFoo() {
return foo<0? 0 : foo; //because of condition
}

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks