open Year2024.Day01.Part02 let test_solve haveLeft haveRight want () = Alcotest.(check int) "incorrect solution" want @@ solve haveLeft haveRight let () = let open Alcotest in run "test suite for day 01 part 02" [ ( "test solutions" , [ test_case "empty list is 0" `Quick @@ (test_solve [] []) 0 ; test_case "ten x zero occurrances of ten" `Quick @@ (test_solve [10] [1; 2; 3]) 0 ; test_case "two x three occurrances of two" `Quick @@ (test_solve [2] [2; 2; 2]) 6 ; test_case "solves example correctly" `Quick @@ (test_solve [3; 4; 2; 1; 3; 3] [4; 3; 5; 3; 9; 3]) 31 ] ) ]