diff --git a/test/test_csv.ml b/test/test_csv.ml index be3ebdb..4e4cb6b 100644 --- a/test/test_csv.ml +++ b/test/test_csv.ml @@ -1,23 +1,20 @@ -open Csv -open Alcotest - (* Function to read CSV file *) let read_csv filename = let ic = open_in filename in - let csv = Csv.load_in ic in + let csv = (Csv.load_in : in_channel -> 'a) ic in csv (* Test to check if the CSV file is read correctly *) let test_read_csv () = let csv_data = read_csv "files/csv/data.csv" in let nb_columns = Csv.columns csv_data in - check int "Number of columns" nb_columns 5 + Alcotest.check Alcotest.int "Number of columns" nb_columns 5 (* Run the test *) let () = - run "CSV Tests" [ + Alcotest.run "CSV Tests" [ "Read CSV", [ - test_case "Read and validate CSV" `Quick test_read_csv + Alcotest.test_case "Read and validate CSV" `Quick test_read_csv ] ]