[Haskell-cafe] Automatic discovery of tests

2012-04-28 Thread Graham Berks
Hi, trying to learn haskell and the associated build env.
I come from a java/scala world so trying to understand the how to invoke tests.

Have a cabal file that invokes a main function to execute a test.
But wondering if there is any automatic discovery of tests as per junit.

I have seen test-framework-th but to me that implies putting a 
testGroupGenerator into each module. Am i correct about that and if so is there 
an example of calling multiple modules tests ?

Or is there a better way just to invoke specific functions prefixed with case_ 
prop_ etc in the entire src/test directory of the cabal build ?

Thanks 

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Automatic discovery of tests

2012-04-28 Thread Simon Hengel
Hi Graham,

 Or is there a better way just to invoke specific functions prefixed
 with case_ prop_ etc in the entire src/test directory of the cabal
 build ?

I think this would be possible if we had GHC ticket #1475 implemented.
I just added a comment [1].

Cheers,
Simon

[1] http://hackage.haskell.org/trac/ghc/ticket/1475#comment:12

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Automatic discovery of tests

2012-04-27 Thread G
Hi, trying to learn haskell and the associated build env.
I come from a java/scala world so trying to understand the how to invoke 
tests.

Have a cabal file that invokes a main function to execute a test.
But wondering if there is any automatic discovery of tests as per junit.

I have seen test-framework-th but to me that implies putting 
a testGroupGenerator into each module. Am i correct about that and if so is 
there an example of calling multiple modules tests ?

Or is there a better way just to invoke specific functions prefixed with 
case_ prop_ etc in the entire src/test directory of the cabal build ?

Thanks
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe