From 148aacd1a206df58f7853a9a761d471b381ba35e Mon Sep 17 00:00:00 2001 From: alex <> Date: Mon, 16 Dec 2024 16:28:58 +0100 Subject: [PATCH] Day16 - more test cases and still failing MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Since the provided answer is wrong, try more test cases found in the subreddit of the day. Such test cases are passing. I can’t find the implementation error yet. --- src/day16.rs | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/src/day16.rs b/src/day16.rs index fb9facc..111dee1 100644 --- a/src/day16.rs +++ b/src/day16.rs @@ -167,11 +167,60 @@ mod tests { #.#.#.#########.# #S#.............# #################"; + // from + // + static TEXT_INPUT_2: &str = "\ +########################### +#######################..E# +######################..#.# +#####################..##.# +####################..###.# +###################..##...# +##################..###.### +#################..####...# +################..#######.# +###############..##.......# +##############..###.####### +#############..####.......# +############..###########.# +###########..##...........# +##########..###.########### +#########..####...........# +########..###############.# +#######..##...............# +######..###.############### +#####..####...............# +####..###################.# +###..##...................# +##..###.################### +#..####...................# +#.#######################.# +#S........................# +###########################"; + // same source + static TEXT_INPUT_3: &str = "\ +#################################################### +#......................................#..........E# +#......................................#...........# +#....................#.................#...........# +#....................#.................#...........# +#....................#.................#...........# +#....................#.................#...........# +#....................#.................#...........# +#....................#.................#...........# +#....................#.................#...........# +#....................#.................#...........# +#....................#.............................# +#S...................#.............................# +####################################################"; + #[test] fn test_part1() { assert_eq!(7036, run_part1(TEXT_INPUT_0).unwrap()); assert_eq!(11048, run_part1(TEXT_INPUT_1).unwrap()); + assert_eq!(21148, run_part1(TEXT_INPUT_2).unwrap()); + assert_eq!(5078, run_part1(TEXT_INPUT_3).unwrap()); } #[test] -- 2.39.5