[Yhc] Testing QuickCheck properties with Yhc

Isaac isaacdupree at charter.net
Wed Nov 8 18:25:16 EST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I made a script for testing QuickCheck properties in a module by adding
a line to that file that contains a function
_automatedQuickCheckMainWhichCanBeDeletedWheneverYouWantButPleaseDoNotChangeThisLineBecauseItMightConfuseTheStupidScriptThatProcessesIt
:: IO ()
which tests all properties found in the file when run.
(let us call that ridiculously long name $TESTMAIN_NAME from now on)

To test using ghc, I pass the argument
- -main-is $MODULE_NAME.$TESTMAIN_NAME
(where $MODULE_NAME is found out by the script).

To test using Hugs, I do `echo "$TESTMAIN_NAME" | hugs`.

Any advice on how to do the same thing for Yhc -- execute an IO action
defined in the top level of an arbitrary module, but not exported from
the module?

Isaac

P.S. I'm attaching the script... I'll probably release it officially
some time if I clean it up (e.g. find a good way to do it in a better
and more portable language, like Haskell, maybe? and add some options)

P.P.S. I made this because I didn't like the only existing one I could
find, which didn't even work for me without some hacking.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFUmdbHgcxvIWYTTURAoJZAJ9L4Tlrnxmt2ugneJaDnlt6IMQNgACfdHmq
UOAvdTJ5TSIQBtkroMLArsI=
=neb8
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestQuickCheckProperties.sh
Type: application/x-shellscript
Size: 6165 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/yhc/attachments/20061108/3b84b904/TestQuickCheckProperties.bin


More information about the Yhc mailing list