From: Janne H. <ja...@hy...> - 2004-12-21 20:19:04
|
Hi, > which is 'triple handling', in fact worse, since the test name > has to be written as well.. :) Well, it depends on how many test contributors and how many tests we're expecting. I'm not expecting that many, so I don't consider adding tests such a big problem. > Ideally, the test.mak, mainline, and module level > test function should be generated, not hand coded, > that is the Makefile should generate the these things > using a refined equivalent of 'ls test_*.ml'. This might be doable with GNU Make's $(wildcard) and some other tricks. I never tried, but it seems doable. Then again, if I *don't* do this, the Makefile would be more straightforward and would even allow test contributors to write their own small utility modules. If I want to use wildcards, I will also need a portable way to automatically make the .ml files topologically sorted. However, as to your other suggestions, frankly, I think you're making the build process unnecessarily complicated. I don't see how adding new tests can ever become a bottleneck. Nor do I think it can be somehow unsafe (even if a couple of files need to be modified), due to O'Caml's strong static typing. Anyhow.. If someone will make a more sophisticated build system in the future, I'm OK with that.. Just make 100% sure that it ports to Windows. I noticed there's been some talk about adding path handling into ExtLib. These *definitely* need to be tested on Windows to make sure they work as expected! Currently my main concern though is getting more meaningful tests into the suite.. > test_*_<module>_*.ml > > Note this implies names like > > test_jh_ExtList.ml > > would not be allowed, a suffix would be required. > That could be fixed by also allowing names of that form. > I personally think we should mandate the suffix: > we'd better decide fast, before there are too many tests: > CVS isn't good at file renaming .. :) Surely you can just check if the suffix is missing and if so, automatically name it "untitled". I find it perfectly OK to have more than one test in one file. In some cases it allows to share some code between individual tests. See test_jh_BitSet.ml for an example (bitset_of_int, etc). As for renaming.. Grrr I wish we could use Subversion.. :) ciao, janne |