Bad packages for private classes

1 view
Skip to first unread message

Alan Stearns

unread,
Jun 7, 2010, 7:40:30 PM6/7/10
to Flexcover Discussion Group
If I have a private class in an .as file (a class defined outside the
package) the .cvm and .cvr files say that it's part of the
"ASFileName.as$<linenumber>" package. This causes problems downstream
in my reports. I use the flexcover-to-cobertura transform which passes
those package names along, and the Hudson plugin displays them along
with the normal packages. The problem crops up when the report gets
confused about displaying the source files - it either chooses the
normal package or the munged package version. So I either see the line
markers for the private classes or the main class, but not both.

If I change the munged package name to the correct name for the
package that contains the main class, then the report works. Is there
a reason flexCover can't use the actual package name in the first
place? I see that if I change the name in the .cvm file the private
class is not tracked, so I'm considering just replacing the munged
package names in the .cvr file before my script passes things along to
cobertura.

Here's an example source file. FlexCover will correctly track coverage
for both classes, but the report will only show the line markers for
internalClass.

package testPackage
{
import flash.display.Sprite;

public class flexCoverTest extends Sprite
{
public function flexCoverTest()
{
super();
2+2;
new internalClass();
}
}
}

class internalClass
{
public function internalClass()
{
2*2;
}
}

Daniel Rinehart

unread,
Jun 17, 2010, 1:48:53 PM6/17/10
to flexcover-...@googlegroups.com
This sounds similar to an existing logged issue:

http://code.google.com/p/flexcover/issues/detail?id=12

It would be great to capture your additional feedback.

-- Daniel R. <dan...@neophi.com> [http://danielr.neophi.com/]

> --
> You received this message because you are subscribed to the Google Groups "Flexcover Discussion Group" group.
> To post to this group, send email to flexcover-...@googlegroups.com.
> To unsubscribe from this group, send email to flexcover-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/flexcover-discussion?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages