Version française
Home     About     Download     Resources     Contact us    
Browse thread
Integration of tests (was: Re: [Caml-list] invoke function from its name as string)
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David MENTRE <dmentre@l...>
Subject: Integration of tests (was: Re: [Caml-list] invoke function from its name as string)
Hello,

2008/3/13, Andrew Gacek <andrew.gacek@gmail.com>:
> Andrej's solution is interesting since it lets you interleave the
>  regular code with the test code. For my own code, I keep all tests
>  isolated to separate files and in each file I maintain the tests as a
>  list of anonymous functions.

In my own code, I maintain a set of tests per module, tests that can
be activated with a static program-wide compilation flag: if
Config.do_autotests is true, the tests are compiled and executed at
module startup.

For example, see code starting at line 469 in:
  http://www.linux-france.org/cgi-bin/hgwebdir.cgi/demexp/latest-dev?f=4f0c248c82c3;file=srv/voting.ml.nw

Yours,
d.