summaryrefslogtreecommitdiff
path: root/2025/ocaml/test/application
diff options
context:
space:
mode:
Diffstat (limited to '2025/ocaml/test/application')
-rw-r--r--2025/ocaml/test/application/test_d01p01.ml4
-rw-r--r--2025/ocaml/test/application/test_d01p02.ml4
-rw-r--r--2025/ocaml/test/application/test_d04p01.ml2
3 files changed, 7 insertions, 3 deletions
diff --git a/2025/ocaml/test/application/test_d01p01.ml b/2025/ocaml/test/application/test_d01p01.ml
index 70f5ab2..e57db01 100644
--- a/2025/ocaml/test/application/test_d01p01.ml
+++ b/2025/ocaml/test/application/test_d01p01.ml
@@ -12,7 +12,9 @@ R14
L82|}
let test_full_given_example () =
- Alcotest.(check int) "full given example" 3 (solve example_data ())
+ Alcotest.(check int)
+ "full given example" 3
+ (match solve example_data () with Error _ -> 0 | Ok ans -> ans)
let () =
let open Alcotest in
diff --git a/2025/ocaml/test/application/test_d01p02.ml b/2025/ocaml/test/application/test_d01p02.ml
index e29c932..bbda035 100644
--- a/2025/ocaml/test/application/test_d01p02.ml
+++ b/2025/ocaml/test/application/test_d01p02.ml
@@ -12,7 +12,9 @@ R14
L82|}
let test_full_given_example () =
- Alcotest.(check int) "full given example" 6 (solve example_data ())
+ Alcotest.(check int)
+ "full given example" 6
+ (match solve example_data () with Error _ -> 0 | Ok ans -> ans)
let () =
let open Alcotest in
diff --git a/2025/ocaml/test/application/test_d04p01.ml b/2025/ocaml/test/application/test_d04p01.ml
index 783659e..ffbe102 100644
--- a/2025/ocaml/test/application/test_d04p01.ml
+++ b/2025/ocaml/test/application/test_d04p01.ml
@@ -14,7 +14,7 @@ let example =
let test_input_to_matrix have want () =
Alcotest.(check int) "number of rolls of paper that are accessible" want
- @@ solve have ()
+ @@ match solve have () with Error _ -> 0 | Ok ans -> ans
let () =
let open Alcotest in