Fix comparisons between signed and unsigned in test cases