From 5aa2884f5d84d9758ff1fb036d2045b876afcd99 Mon Sep 17 00:00:00 2001 From: Inga Date: Sat, 2 Dec 2023 01:15:13 +0000 Subject: [PATCH] lol --- day01-hard/src/main.zig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/day01-hard/src/main.zig b/day01-hard/src/main.zig index f855805..6f4afcc 100644 --- a/day01-hard/src/main.zig +++ b/day01-hard/src/main.zig @@ -234,3 +234,9 @@ test "get last digit" { try std.testing.expectEqual(@as(?u8, 7), get_last_digit("sevene")); try std.testing.expectEqual(@as(?u8, 0), get_last_digit("!evene")); } + +test "get value" { + // Oopsie! Thankfully the author of the puzzle didn't see this coming 🤪 + try std.testing.expectEqual(@as(?u8, 21), get_value("twone")); + try std.testing.expectEqual(@as(?u8, 58), get_value("fiveight")); +}