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")); +}