diff --git a/2022/src/bin/day01.rs b/2022/src/bin/day01.rs index f6f0e11..f043a73 100644 --- a/2022/src/bin/day01.rs +++ b/2022/src/bin/day01.rs @@ -20,7 +20,8 @@ fn part2(parsed: &Parsed) -> usize { } boilerplate! { - TEST_INPUT == "1000 + TEST_INPUT == "\ +1000 2000 3000 diff --git a/2022/src/bin/day02.rs b/2022/src/bin/day02.rs index aa8d0a1..1397a18 100644 --- a/2022/src/bin/day02.rs +++ b/2022/src/bin/day02.rs @@ -35,10 +35,11 @@ fn part2(parsed: &str) -> usize { } boilerplate! { - TEST_INPUT == "A Y -B X -C Z -", + TEST_INPUT == "\ + A Y\n\ + B X\n\ + C Z\n\ + ", tests: { part1: { TEST_INPUT => 15 }, part2: { diff --git a/2022/src/bin/day03.rs b/2022/src/bin/day03.rs index 6d86a0a..32d1848 100644 --- a/2022/src/bin/day03.rs +++ b/2022/src/bin/day03.rs @@ -40,12 +40,14 @@ fn part2(parsed: &Parsed) -> usize { } boilerplate! { - TEST_INPUT == "vJrwpWtwJgWrhcsFMMfFFhFp -jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL -PmmdzqPrVvPwwTWBwg -wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn -ttgJtRGJQctTZtZT -CrZsJsPPZsGzwwsLwLmpwMDw", + TEST_INPUT == "\ + vJrwpWtwJgWrhcsFMMfFFhFp\n\ + jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL\n\ + PmmdzqPrVvPwwTWBwg\n\ + wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn\n\ + ttgJtRGJQctTZtZT\n\ + CrZsJsPPZsGzwwsLwLmpwMDw\ + ", tests: { part1: { TEST_INPUT => 157 }, part2: { TEST_INPUT => 70 }, diff --git a/2022/src/bin/day04.rs b/2022/src/bin/day04.rs index 5f45471..bbfe7d4 100644 --- a/2022/src/bin/day04.rs +++ b/2022/src/bin/day04.rs @@ -30,12 +30,14 @@ fn part2(parsed: &Parsed) -> usize { } boilerplate! { - TEST_INPUT == "2-4,6-8 -2-3,4-5 -5-7,7-9 -2-8,3-7 -6-6,4-6 -2-6,4-8", + TEST_INPUT == "\ + 2-4,6-8\n\ + 2-3,4-5\n\ + 5-7,7-9\n\ + 2-8,3-7\n\ + 6-6,4-6\n\ + 2-6,4-8\ + ", tests: { part1: { TEST_INPUT => 2 }, part2: { TEST_INPUT => 4 }, diff --git a/2022/src/bin/day07.rs b/2022/src/bin/day07.rs index e7b5a95..0a7aa8d 100644 --- a/2022/src/bin/day07.rs +++ b/2022/src/bin/day07.rs @@ -74,7 +74,8 @@ fn part2(parsed: &Node<'_>) -> usize { } boilerplate! { - TEST_INPUT == "$ cd / + TEST_INPUT == "\ +$ cd / $ ls dir a 14848514 b.txt diff --git a/2022/src/bin/day08.rs b/2022/src/bin/day08.rs index f356a7f..c039925 100644 --- a/2022/src/bin/day08.rs +++ b/2022/src/bin/day08.rs @@ -82,11 +82,13 @@ const TEST_OUTPUT: &[bool] = &[true, true, false, true, false]; const TRANSPOSE_OUTPUT: &[[u8; 3]; 3] = &[[1, 4, 7], [2, 5, 8], [3, 6, 9]]; boilerplate! { - TEST_INPUT == "30373 -25512 -65332 -33549 -35390", + TEST_INPUT == "\ + 30373\n\ + 25512\n\ + 65332\n\ + 33549\n\ + 35390\ + ", tests: { part1: { TEST_INPUT => 21 }, part2: { TEST_INPUT => 8 }, diff --git a/2022/src/bin/day09.rs b/2022/src/bin/day09.rs index 378c1e7..d06831e 100644 --- a/2022/src/bin/day09.rs +++ b/2022/src/bin/day09.rs @@ -63,26 +63,28 @@ fn step_towards(tail: &mut (i32, i32), head: (i32, i32)) -> bool { } boilerplate! { - TEST_INPUT == "R 4 -U 4 -L 3 -D 1 -R 4 -D 1 -L 5 -R 2", + TEST_INPUT == "\ + R 4\n\ + U 4\n\ + L 3\n\ + D 1\n\ + R 4\n\ + D 1\n\ + L 5\n\ + R 2\ + ", tests: { part1: { TEST_INPUT => 13 }, part2: { TEST_INPUT => 1, - "R 5 -U 8 -L 8 -D 3 -R 17 -D 10 -L 25 -U 20" => 36, + "R 5\n\ + U 8\n\ + L 8\n\ + D 3\n\ + R 17\n\ + D 10\n\ + L 25\n\ + U 20" => 36, }, }, bench1 == 6367,