test.ml 417 B

123456789101112131415161718192021222324
  1. open OUnit2
  2. let sample_list : int list = [
  3. 1721;
  4. 979;
  5. 366;
  6. 299;
  7. 675;
  8. 1456;
  9. ]
  10. let test_part_one _ =
  11. assert_equal (Lib.part_one sample_list) (Some [1721; 299])
  12. let test_part_two _ =
  13. assert_equal (Lib.part_two sample_list) (Some [979; 366; 675])
  14. let () =
  15. run_test_tt_main
  16. ("day one" >:::
  17. [
  18. "part one" >:: test_part_one;
  19. "part two" >:: test_part_two;
  20. ])