commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <p...@steitz.com>
Subject Re: [math] stupid question about test input files
Date Wed, 14 May 2003 16:02:20 GMT
Craig R. McClanahan wrote:
> 
> On Wed, 14 May 2003, Phil Steitz wrote:
> 
> 
>>Date: Wed, 14 May 2003 08:11:05 -0700
>>From: Phil Steitz <phil@steitz.com>
>>Reply-To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
>>To: Jakarta Commons Developers List <commons-dev@jakarta.apache.org>
>>Subject: [math] stupid question about test input files
>>
>>I am bundling up my RandomData, EmpiricalDistribution and ValueServer
>>classes for submission and the last two can take file input data.  The
>>test cases need to read from a test data file.  Can I assume that this
>>file will be available to the test cases with no path spec?
>>
> 
> 
> A plain filename with no path will be assumed to exist in the directory
> from which the tests are run -- not necessarily a good assumption.
> 
> FWIW, I normally deal with this sort of thing by including the test files
> in the same package source directory as the test case itself, make sure
> they get copied to the output "classes" directory, and use
> ClassLoader.getResourceAsStream() to load them.  The test cases for
> Digester (among others) use that approach.
> 

Thanks!  I will look at the Digester test cases and follow that pattern.

Phil

> 
>>Phil
> 
> 
> Craig
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 




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


Mime
View raw message