CoolFace
Datasetpublic

TheRealSamuel/LeetCodeProblem

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes564downloads
main.ml51 linesDownload Raw Back to ocaml_tests
1 2module Main = struct3    open OUnit24 5    (* Program start *)6 7    (* Program end *)8 9    (* Test cases *)10    11let test1 _ = assert_equal "tdar" (getEncryptedString "dart" 3)12 13let test2 _ = assert_equal "aaa" (getEncryptedString "aaa" 1)14 15let test3 _ = assert_equal "miorbbuoygmhvmavtzmldkjebyivpuowhrivdwbptxxr" (getEncryptedString "rbbuoygmhvmavtzmldkjebyivpuowhrivdwbptxxrmio" 7741)16 17let test4 _ = assert_equal "inzhxqyxkmnffmqytnvoxbhvhqfefrfsrrnzulrpiwithkpxofnpkulntdhb" (getEncryptedString "hvhqfefrfsrrnzulrpiwithkpxofnpkulntdhbinzhxqyxkmnffmqytnvoxb" 2798)18 19let test5 _ = assert_equal "ggyblhcdukedgcayseoppquyjrtrwzclevblddphqzhkozxqezgbvjxqqdqvlqg" (getEncryptedString "zgbvjxqqdqvlqgggyblhcdukedgcayseoppquyjrtrwzclevblddphqzhkozxqe" 4109)20 21let test6 _ = assert_equal "wbsjapojgdynxwxplea" (getEncryptedString "nxwxpleawbsjapojgdy" 3352)22 23let test7 _ = assert_equal "atwxwsycospwwsvgyapifwgxqsekzkgguhqnlcclmnthlcbebbnoprqjacebuzgzxwkwdwr" (getEncryptedString "dwratwxwsycospwwsvgyapifwgxqsekzkgguhqnlcclmnthlcbebbnoprqjacebuzgzxwkw" 7103)24 25let test8 _ = assert_equal "vexxdstahykrysrgeqhhttsaqfqbwfpdgtymrfxnmkotfswvpzzphhwwjbpfrkgilo" (getEncryptedString "xxdstahykrysrgeqhhttsaqfqbwfpdgtymrfxnmkotfswvpzzphhwwjbpfrkgilove" 328)26 27let test9 _ = assert_equal "wjfxbaeeaafdwxzffckzmvshncjipexriwcqnffkbpraerezrxaokhzkrvtkbmezlcq" (getEncryptedString "rezrxaokhzkrvtkbmezlcqwjfxbaeeaafdwxzffckzmvshncjipexriwcqnffkbprae" 7727)28 29let test10 _ = assert_equal "pqzxyybtiiddsgzhfqhavqacrlimfhusrrgarplrqwrhftlmhlrdtkfmlzukcyazjbglrizzhyhu" (getEncryptedString "hftlmhlrdtkfmlzukcyazjbglrizzhyhupqzxyybtiiddsgzhfqhavqacrlimfhusrrgarplrqwr" 6417)30 31 32    (* Grouping test cases *)33    let suite = "Test Suite for getEncryptedString" >::: [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