ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 21387] - [PATCH] Permit <junit> to turn on Java (1.4) assertions in tests + tested code
Date Tue, 08 Jul 2003 02:56:40 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21387>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21387

[PATCH] Permit <junit> to turn on Java (1.4) assertions in tests + tested code





------- Additional Comments From jesse.glick@netbeans.com  2003-07-08 02:56 -------
Thanks, I didn't see that class. That would be more natural - to add an
<assertions> subelement to <junit>. If I have another moment, I will try to redo
this patch to use that util class. Can't promise to be able to get to <java> too.

BTW it is not true that you can only turn on assertions when forking. Any
classes loaded from a new class loader can have their assertion status set as
they are loaded. See the current patch here for an example - <junit fork="false"
javaassertions="true"> does work if you load the test classes in a new loader,
the normal mode. Therefore I think the API of Assertions should be changed a bit
- currently it assumes that it will be used only in CommandlineJava, but you
should be able to have it apply itself to a ClassLoader too, I suppose. I might
suggest a public void applyAssertions(ClassLoader), and also making
getCommandPrefix & toCommand package-private - impl detail of
applyAssertions(CommandlineJava). One annoyance is that child class loaders will
not inherit the assertion status of their ancestors as far as I can tell.

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


Mime
View raw message