FPEvalDataset/LeetCodeProblem
0305
1 2module Main = struct3 open OUnit24 5 (* Program start *)6 7 (* Program end *)8 9 (* Test cases *)10 11let test1 _ = assert_equal true (hasSpecialSubstring "aaabaaa" 3)12 13let test2 _ = assert_equal false (hasSpecialSubstring "abc" 2)14 15let test3 _ = assert_equal false (hasSpecialSubstring "npiqeyedtwkxpacknwmuiqjwfcjoaspqjjrkedlpsecmlbdzjhmmadyuffboureyfg" 8)16 17let test4 _ = assert_equal false (hasSpecialSubstring "frfibfvbjbembzqmpygdsutmdnefweotbbutvihqaodnvkhlovtyhvgksijkrvqclikuzdgjee" 53)18 19let test5 _ = assert_equal false (hasSpecialSubstring "ow" 2)20 21let test6 _ = assert_equal false (hasSpecialSubstring "kcbgeeldqbijcfbfwkxjtzrrgvcplhftpaz" 10)22 23let test7 _ = assert_equal false (hasSpecialSubstring "puvexiblpdkdberrcjucrehjrzizyobtittk" 15)24 25let test8 _ = assert_equal true (hasSpecialSubstring "nbmzvrvoljbqwtwmj" 1)26 27let test9 _ = assert_equal false (hasSpecialSubstring "laluchhncipksfyucufozhrkflsrbeqkrnrvyiaihwkptuiquycoxfpmelchzdciilupqsdaqkkyjnkzdyejhatdzjdcco" 61)28 29let test10 _ = assert_equal false (hasSpecialSubstring "wohlljnaddwmpuwamgkiyfvtuzbpcjhlvohkrwnpaiolofylskymmeouuoztkpqbcxjuxqpkqhgjmuutdxdjmjdkwkamikp" 32)30 31 32 (* Grouping test cases *)33 let suite = "Test Suite for hasSpecialSubstring" >::: [34 35 "test1" >:: test1;36 "test2" >:: test2;37 "test3" >:: test3;38 "test4" >:: test4;39 "test5" >:: test5;40 "test6" >:: test6;41 "test7" >:: test7;42 "test8" >:: test8;43 "test9" >:: test9;44 "test10" >:: test10;45 ]46 47 48 (* Running the tests *)49 let () = run_test_tt_main suite50end51 