squah-confluent commented on PR #21073: URL: https://github.com/apache/kafka/pull/21073#issuecomment-3638541838
It's not too bad. We just need a single parameterized test taking `(s1, s2, expectedSign)` and run a list of inputs through `compare()`. These ought to be sufficient: ```java // Empty strings "", "", 0 "", "aaa", -1 "aaa", "", 1 "aaa", "aaa", 0 "aaa", "bbb", -1 "bbb", "aaa", 1 // Same as above, but with different lengths (can probably skip this) "aaaaaa", "bbb", -1 "aaa", "bbbbbb", -1 "bbbbbb", "aaa", 1 "bbb", "aaaaaa", 1 // Strings have a common prefix "common_prefix_aaa", "common_prefix_bbb", -1 "common_prefix_bbb", "common_prefix_aaa", 1 // Same as above, but with different lengths (can probably skip this) "common_prefix_aaaaaa", "common_prefix_bbb", -1 "common_prefix_aaa", "common_prefix_bbbbbb", -1 "common_prefix_bbbbbb", "common_prefix_aaa", 1 "common_prefix_bbb", "common_prefix_aaaaaa", 1 // One string is a prefix of the other "common_prefix", "common_prefix_aaa", -1 "common_prefix_aaa", "common_prefix", 1 ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
