2006-03-25から1日間の記事一覧

OUnit

stringとかfloatとかintとかboolに対しては、printerがすでに用意されているOUnit.assert_equal。 let assert_eq msg expected actual = let printer x = let tag = Obj.tag (Obj.repr x) in if tag = Obj.int_tag then string_of_int (Obj.magic x) else if…