Change collator tests to check that all ways of comparing agree
We should have fuzzing to check that compare and write_sort_key_to agree.
CC @rs-sac
Fuzzing does not seem right for this.
What I do in ICU unit tests is that every time I expect compare(s1, s2) to return some value, I use a test helper function that calls every possible way to do the comparison -- UTF-16 strings, UTF-8 strings, character iterator, sort keys -- and that they all yield the same result.
What I do in ICU unit tests is that every time I expect compare(s1, s2) to return some value, I use a test helper function that calls every possible way to do the comparison -- UTF-16 strings, UTF-8 strings, character iterator, sort keys -- and that they all yield the same result.
Yeah, we should do it that way. Changed the issue title.