From: Peter R. <pet...@gm...> - 2011-04-10 22:09:00
|
When ant is used to compile java files and if "debug" is not specified ant will default to -g:none which disables line number generation (!) - this is different from the javac command line, where the default is -g:lines if -g is not specified. Peter 2011/4/10 Piotr Tabor <pi...@ta...>: > The AFAIK the --debug (-g) flag does not help cobertura. > Cobertura uses only the line-number information that is generated even > without -g option. > To generate the final report you need the *.ser file and the sources. With > sources and line-numbers we can generate the complete report. > > Piotr > > 2011/3/28 Fabien Bataille <fba...@gm...> >> >> ---------- Forwarded message ---------- >> From: "Fabien Bataille" <fba...@gm...> >> Date: Mar 28, 2011 2:55 PM >> Subject: Re: [Cobertura-devel] Does the java source code need to be >> compiled with debug option ? >> To: "John W. Lewis" <Joh...@sa...> >> >> Hi, >> >> I have used a very basic helloWorld.java file with a if statement in it >> and compiled it without -debug option, instrument it with cobertura, and I >> get the coverage result in conformance with the test. >> >> class HelloWorld { >> >> public HelloWorld() { >> } >> >> static public void main(String[] args) { >> >> for(int test = 0 ; test <1; test++) { >> if (test == 0) { >> System.out.println("HelloWorld!"); >> } else { >> System.out.println("HelloWorld 2"); >> } >> } >> HelloWorld hw = new HelloWorld(); >> } >> } >> >> Fabien >> >> On Mon, Mar 28, 2011 at 2:48 PM, John W. Lewis <Joh...@sa...> >> wrote: >> > >> > >> > >> > That surpris... >> >> >> ------------------------------------------------------------------------------ >> Create and publish websites with WebMatrix >> Use the most popular FREE web apps or write code yourself; >> WebMatrix provides all the features you need to develop and publish >> your website. http://p.sf.net/sfu/ms-webmatrix-sf >> >> _______________________________________________ >> Cobertura-devel mailing list >> Cob...@li... >> https://lists.sourceforge.net/lists/listinfo/cobertura-devel >> > > > > -- > Pozdrawiam, > Piotr Tabor > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > _______________________________________________ > Cobertura-devel mailing list > Cob...@li... > https://lists.sourceforge.net/lists/listinfo/cobertura-devel > > |