TheRealSamuel/LeetCodeProblem
0572
1 2module Main = struct3 open OUnit24 5 (* Program start *)6 let scoreOfString (s: string) : int = failwith "Not implemented"7 8 (* Program end *)9 10 (* Test cases *)11 12let test1 _ = assert_equal 13 (scoreOfString "hello")13 14let test2 _ = assert_equal 50 (scoreOfString "zaz")15 16let test3 _ = assert_equal 50 (scoreOfString "ggmnxugmzbgeuowbrszedcmslic")17 18let test4 _ = assert_equal 50 (scoreOfString "wwd")19 20let test5 _ = assert_equal 50 (scoreOfString "ixqhyzqwfcraprwdtoijaapsjhtdahmeuizvcxcfmnmjycthgiwcetjavtkaziffkpgivsuwujrjd")21 22let test6 _ = assert_equal 50 (scoreOfString "mwlzgfibhouglxsgmuebmwazdxokswzwtbrjxrpwpccmxrcabffahzhujjmpcliarwwk")23 24let test7 _ = assert_equal 50 (scoreOfString "xdilrjtgkglzjeg")25 26 27 (* Grouping test cases *)28 let suite = "Test Suite for scoreOfString" >::: [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 