open Test_migration let assert_equal = Alcotest.(check int "") let float_repr = "float_repr" >:: fun () -> let () = Alcotest.(check string) "Float repr" "3873921.620000" ImportDataTypes.Value.(to_string "C" (Float 3873921.62)) in () let significant_zero = "leading 0" >:: fun () -> Alcotest.(check string) "00123" "=\"00123\"" ImportDataTypes.Value.(to_string "C" (Content "00123")); Alcotest.(check string) "0.0123" "0.0123" ImportDataTypes.Value.(to_string "C" (Content "0.0123")); Alcotest.(check string) "00123 A" "00123 A" ImportDataTypes.Value.(to_string "C" (Content "00123 A")) let test_suit = [ ( "Column A" >:: fun () -> assert_equal 1 (ImportDataTypes.Path.column_of_string "A") ); ( "Column a" >:: fun () -> assert_equal 1 (ImportDataTypes.Path.column_of_string "a") ); ( "Column name" >:: fun () -> let () = for i = 1 to 1_000 do let column_name = ImportDataTypes.Path.column_to_string i in let column_index = ImportDataTypes.Path.column_of_string column_name in assert_equal i column_index done in () ); float_repr; significant_zero; ] let tests = "importCSV_test" >::: test_suit