I’ve been working on the variable-length-quantity exercise and I found its test cases to be a bit lacking. Virtually all test cases use integers that either:
a) are all ones
b) have a single one
I think it would be really useful to add some integers that don’t follow these patterns.
1 Like
Yeah, that’s a good point. When looking at the canonical-data.json in the problem-specifications repo, it does seem like most of the values in the test cases are either:
- all ones (like
127, 16383, 2097151, 268435455, 4294967295), or
- powers of two or similar values with a single 1-bit (like
64, 128, 8192, 16384, 2097152, 268435456).
There are very few, if any, values with more “mixed” bit patterns. Adding cases that don’t fall into those neat categories would definitely help surface bugs that the current cases might miss.
The more I look into the test cases the worse I feel about them :D
3 Likes