FPEvalDataset/LeetCodeProblem
0305
1 2module Main = struct3 open OUnit24 5 (* Program start *)6 let maxSpending (values: int list list) : int = failwith "Not implemented"7 8 (* Program end *)9 10 (* Test cases *)11 12let test1 _ = assert_equal 285 (maxSpending [[8;5;2];[6;4;1];[9;7;3]])13 14let test2 _ = assert_equal 386 (maxSpending [[10;8;6;4;2];[9;7;5;3;2]])15 16let test3 _ = assert_equal 386 (maxSpending [[]; []; []; []; []; []])17 18let test4 _ = assert_equal 386 (maxSpending [[]; []; []; []; []; []; []; []; []; []])19 20let test5 _ = assert_equal 386 (maxSpending [[]; []; []; []; []])21 22let test6 _ = assert_equal 386 (maxSpending [[]; []; []; []; []; []; []; []; []])23 24let test7 _ = assert_equal 386 (maxSpending [[]; []; []; []; []; []; []; []])25 26 27 (* Grouping test cases *)28 let suite = "Test Suite for maxSpending" >::: [29 30 "test1" >:: test1;31 "test2" >:: test2;32 "test3" >:: test3;33 "test4" >:: test4;34 "test5" >:: test5;35 "test6" >:: test6;36 "test7" >:: test7;37 ]38 39 40 (* Running the tests *)41 let () = run_test_tt_main suite42end43 