# HG changeset patch # User Jonathan Knowles # Date 1265039942 0 # Node ID 86c008b5d3aa275c7422fc5f5e32d8429fc681a7 # Parent 647fd458b3759aaa726a4fa5fffb28eab378ba15 [PCR0047] Adds to Ocamltest a new test case constructor "make_function_test_case", useful for making a test case that tests a single function. Signed-off-by: Jonathan Knowles diff -r 647fd458b375 -r 86c008b5d3aa ocaml/util/ocamltest.ml --- a/ocaml/util/ocamltest.ml Mon Feb 01 15:59:02 2010 +0000 +++ b/ocaml/util/ocamltest.ml Mon Feb 01 15:59:02 2010 +0000 @@ -259,6 +259,9 @@ let make_test_case name description case = Case (name, description, case) +let make_function_test_case name case = + Case (name, sprintf "Tests the %s function." name, case) + let make_test_suite name description suite = Suite (name, description, suite) diff -r 647fd458b375 -r 86c008b5d3aa ocaml/util/ocamltest.mli --- a/ocaml/util/ocamltest.mli Mon Feb 01 15:59:02 2010 +0000 +++ b/ocaml/util/ocamltest.mli Mon Feb 01 15:59:02 2010 +0000 @@ -84,6 +84,9 @@ (** Makes a test case. *) val make_test_case : name -> description -> case -> test +(** Makes a function test case with a default description. *) +val make_function_test_case : name -> case -> test + (** Makes a test suite. *) val make_test_suite : name -> description -> suite -> test