summaryrefslogtreecommitdiff
path: root/2024/OCaml/test/day_04_part_01.ml
diff options
context:
space:
mode:
authorDJ O'Leary <dijitol@proton.me>2025-08-19 00:48:54 +0200
committerDJ O'Leary <dijitol@proton.me>2025-08-19 00:49:06 +0200
commitdbdeb7eaf3b92308e4895eb76dd9f3c5dae5b041 (patch)
treeff33f18e876fd3e4b23492c6241b03061b741de0 /2024/OCaml/test/day_04_part_01.ml
parentbb9b8f0d29195f19df38608af9371a18c45b6d61 (diff)
some change idk
Diffstat (limited to '2024/OCaml/test/day_04_part_01.ml')
-rw-r--r--2024/OCaml/test/day_04_part_01.ml30
1 files changed, 20 insertions, 10 deletions
diff --git a/2024/OCaml/test/day_04_part_01.ml b/2024/OCaml/test/day_04_part_01.ml
index 9f43df0..9550e5b 100644
--- a/2024/OCaml/test/day_04_part_01.ml
+++ b/2024/OCaml/test/day_04_part_01.ml
@@ -36,7 +36,8 @@ let calculate_num_of_matches_tests =
"is 0 when no matches present"
>:: test_calculate_num_of_matches 0 "SMMX" 1 { index = 3; character = 'X' };
"is 1 when only one match present - top to bottom"
- >:: (*
+ >::
+ (*
|.|X|.|
|.|M|.|
|.|A|.|
@@ -45,7 +46,8 @@ let calculate_num_of_matches_tests =
test_calculate_num_of_matches 1 ".X..M..A..S." 3
{ index = 1; character = 'X' };
"is 1 when only one match present - top to bottom edge"
- >:: (*
+ >::
+ (*
|X|.|.|
|M|.|.|
|A|.|.|
@@ -54,7 +56,8 @@ let calculate_num_of_matches_tests =
test_calculate_num_of_matches 1 "X..M..A..S.." 3
{ index = 0; character = 'X' };
"is 1 when only one match present - bottom to top"
- >:: (*
+ >::
+ (*
|.|S|.|
|.|A|.|
|.|M|.|
@@ -63,17 +66,20 @@ let calculate_num_of_matches_tests =
test_calculate_num_of_matches 1 ".S..A..M..X." 3
{ index = 10; character = 'X' };
"is 1 when only one match present - left to right"
- >:: (*
+ >::
+ (*
|X|M|A|S|
*)
test_calculate_num_of_matches 1 "XMAS" 4 { index = 0; character = 'X' };
"is 1 when only one match present - right to left"
- >:: (*
+ >::
+ (*
|S|A|M|X|
*)
test_calculate_num_of_matches 1 "SAMX" 4 { index = 3; character = 'X' };
"is 1 when only one match present - bottom right to top left"
- >:: (*
+ >::
+ (*
|S|.|.|.|
|.|A|.|.|
|.|.|M|.|
@@ -82,7 +88,8 @@ let calculate_num_of_matches_tests =
test_calculate_num_of_matches 1 "S....A....M....X" 4
{ index = 15; character = 'X' };
"is 1 when only one match present - top left to bottom right"
- >:: (*
+ >::
+ (*
|X|.|.|.|
|.|M|.|.|
|.|.|A|.|
@@ -91,7 +98,8 @@ let calculate_num_of_matches_tests =
test_calculate_num_of_matches 1 "X....M....A....S" 4
{ index = 0; character = 'X' };
"is 1 when only one match present - bottom left to top right"
- >:: (*
+ >::
+ (*
|.|.|.|S|
|.|.|A|.|
|.|M|.|.|
@@ -100,7 +108,8 @@ let calculate_num_of_matches_tests =
test_calculate_num_of_matches 1 "...S..A..M..X..." 4
{ index = 12; character = 'X' };
"is 1 when only one match present - top right to bottom left"
- >:: (*
+ >::
+ (*
|.|.|.|X|
|.|.|M|.|
|.|A|.|.|
@@ -109,7 +118,8 @@ let calculate_num_of_matches_tests =
test_calculate_num_of_matches 1 "...X..M..A..S..." 4
{ index = 3; character = 'X' };
"is 8 when matches present in all possible directions"
- >:: (*
+ >::
+ (*
|S|.|.|S|.|.|S|
|.|A|.|A|.|A|.|
|.|.|M|M|M|.|.|