feat(day): add ‹[KO]› to message when test fails

Signed-off-by: Matej Focko <me@mfocko.xyz>
This commit is contained in:
Matej Focko 2024-12-05 11:59:26 +01:00
parent 9dd5ae0c39
commit 2632bc7a58
Signed by: mfocko
SSH key fingerprint: SHA256:icm0fIOSJUpy5+1x23sfr+hLtF9UhY8VpMC7H4WFJP8

View file

@ -24,13 +24,13 @@ abstract class Day<Part1Answer, Part2Answer> {
part1Answer?.let {
print("Checking part 1:\t")
check(part1() == it) { "Given answer: ${part1()}" }
check(part1() == it) { "[KO] Given answer: ${part1()}" }
println("[OK]")
}
part2Answer?.let {
print("Checking part 2:\t")
check(part2() == it) { "Given answer: ${part2()}" }
check(part2() == it) { "[KO] Given answer: ${part2()}" }
println("[OK]")
}
}