thecoop commented on code in PR #14518: URL: https://github.com/apache/lucene/pull/14518#discussion_r2054146955
########## lucene/core/src/test/org/apache/lucene/util/TestArrayUtil.java: ########## @@ -113,16 +119,11 @@ public void testParseInt() throws Exception { parseInt("0.34"); }); - int test = parseInt("1"); - assertTrue(test + " does not equal: " + 1, test == 1); - test = parseInt("-10000"); - assertTrue(test + " does not equal: " + -10000, test == -10000); - test = parseInt("1923"); - assertTrue(test + " does not equal: " + 1923, test == 1923); - test = parseInt("-1"); - assertTrue(test + " does not equal: " + -1, test == -1); - test = ArrayUtil.parseInt("foo 1923 bar".toCharArray(), 4, 4); - assertTrue(test + " does not equal: " + 1923, test == 1923); + assertThat(parseInt("1"), equalTo(1)); + assertThat(parseInt("-10000"), equalTo(-10000)); + assertThat(parseInt("1923"), equalTo(1923)); + assertThat(parseInt("-1"), equalTo(-1)); + assertThat(ArrayUtil.parseInt("foo 1923 bar".toCharArray(), 4, 4), equalTo(1923)); Review Comment: `assertEquals` is ambiguous to what the thing being test is vs the expected value it should have, `assertThat` is not -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org