Am Mittwoch, den 09.09.2015, 14:35 -0600 schrieb John Christopher McAlpine: > From what I can tell, the tests for the OCaml compiler and standard > libraries are all done with a fairly small framework designed > specifically for testing the compiler and standard libraries. Is there > any particular reason not to use a tool such as OUnit or Broken for > these tests? I am aware that adding dependencies to the compiler is > generally frowned upon, but these libraries could significantly improve > the maintainability of the core language and libraries. The last sentence is a quite strong thesis. Recently, I was in a similar situation as the OCaml developers, namely the need arose to create unit tests for a fairly large project (a commercial one, so I cannot point to it). I was considering oUnit. Finally, I dropped it, because it is not that useful at all. The point is that the most important function for unit-testing is polymorphic equality, and this is a built-in. All the other stuff is absolutely optional, and if you need it, just a matter of 10-20 lines (e.g. for selecting unit tests from the command-line - IF this is the applicable environment). It turns out the most useful are utility functions like let ( &&& ) x y = x && y (* logical AND without short-circuit eval *) or let named_check name p = if not p then printf "[FAILED: %s]" name; p which are typically missing in unit testing frameworks because these were once ported from imperative languages. E.g. a test could now look like let test0001() = named_check "subexpr1" (f 3 4 5 = 8) &&& named_check "subexpr2" (g 6 7 8 = 9) My experience is that all the other stuff you need is highly special to the project. What is the gain of maintainability you get by using a framework? Gerd -- ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------