I don't see how that's specific to comparison functions. It's just a result of someone not unit-testing their code.
I was expecting to see an example of structure comparisons such as struct date {int year; int month; int day;} which are easy to get wrong unless you've internalized the pattern (or use modern C++ where it'll generate the comparison operators automatically for you).