Hacker News new | ask | show | jobs
by fanf2 747 days ago
Counting digits is very closely adjacent to the general category of parsing and printing (or serialization/deserialization), which are both tricky to get right and have simple correctness tests. They are perfect candidates for property-based testing.
1 comments

But how do you do PBT here without having a known-correct algorithm available? Because that scenario is seldom the case in practice.