[racket] testing impure stuff

From: Manfred Lotz (manfred.lotz at arcor.de)
Date: Sun Dec 22 14:28:37 EST 2013

On Sun, 22 Dec 2013 14:04:40 -0500
Matthias Felleisen <matthias at ccs.neu.edu>
wrote:

> 
> On Dec 22, 2013, at 1:54 PM, Manfred Lotz wrote:
> 
> > Hi there,
> > I just wrote a file duplicate finder where I'm not quite sure how to
> > build up my test cases.
> > 
> > The problem is that most of my test cases are impure. They rely
> > upon a directory layout.
> > 
> > What is the best way to do this? Should I create a directory
> > structure containing most (or better all) of my test cases, and
> > then base my test cases upon the existing structure?
> > 
> > Or perhaps even better create my directory structure on the fly and
> > build my test cases upon this?
> > 
> > 
> > How do other people create test cases for impure situations?
> 
> 
> I have written such a program several years ago (a primitive version)
> and I tested it by writing another program that generated tmp
> directories with certain characteristics. -- Matthias
> 


Ok, this convinces me to create a directory tree structure on the fly
(containing all cases I need), and then base my test cases on the
created tree structure.


-- 
Thanks,
Manfred









Posted on the users mailing list.