ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: another unit-test question
Date Tue, 04 Mar 2003 23:59:59 GMT
Just to add my $0.02 on this... I don't compile the production and test 
code together into a single tree.  I keep them separate even for the 
.class files.  Because of Ant's nice <path> handling, its easy to put 
them together when you need them together (in <junit> for example).

The only time I blur test code together with production code is with 
Cactus tests that have to be deployed into the container.

	Erik

On Tuesday, March 4, 2003, at 06:28  PM, Erik Price wrote:
>
>
> Erik Price wrote:
>> Should I be copying my production code source tree into a new tree 
>> with the test code embedded alongside it?  If so then what happens 
>> when I make a change to the source code, I have to first copy it into 
>> the test tree so that I can run the unit tests again?
>
> Nevermind, it just clicked.  I keep the test code in one tree, and the 
> production code in another tree (so they are not mingled together), 
> but in my "test" target I can use the "javac" task on both trees and 
> compile them together into a single tree of unit-testable code, and 
> run unit tests on that...
>
> /project
>   /src
>     /com
>       /erikprice
>         /myproj
>           productioncode.java
>   /test
>     /com
>       /erikprice
>         /myproj
>           unittestcode.java
>   /build
>     /test
>       /com
>         /erikprice
>           /myproj
>             productioncode.class
>             unittestcode.class
>
> ...confirmed by Matt Quail as I finished up this email.  Thanks and 
> pardon me for not having seen this in the first place ;) !
>
>
> Erik
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>


Mime
View raw message