Skip to content

Commit ac171dd

Browse files
Drop “Success” message for test passes
This change makes TokenizerTester, TreeTester, and EncodingTester stop emitting the word “Success” to standard error every time a test passes. Otherwise, without this change, in test output, we end up with so many “Success” lines that the actual test failures are effectively obscured (you have to scroll back through the output/log to hunt for failures).
1 parent cec3848 commit ac171dd

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

test-src/nu/validator/htmlparser/test/EncodingTester.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ private boolean runTest() throws IOException, SAXException {
8888
String sniffed = charset.name();
8989
String expected = Encoding.forName(builder.toString()).newDecoder().charset().name();
9090
if (expected.equalsIgnoreCase(sniffed)) {
91-
System.err.println("Success.");
9291
// System.err.println(stream);
9392
} else {
9493
exitStatus = 1;

test-src/nu/validator/htmlparser/test/TokenizerTester.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,7 @@ private void runTestInner(String inputString, JSONArray expectedTokens,
190190
try {
191191
driver.tokenize(is);
192192
JSONArray actualTokens = tokenHandler.getArray();
193-
if (jsonDeepEquals(actualTokens, expectedTokens)) {
194-
writer.write("Success\n");
195-
} else {
193+
if (!jsonDeepEquals(actualTokens, expectedTokens)) {
196194
exitStatus = 1;
197195
writer.write("Failure\n");
198196
writer.write(description);

test-src/nu/validator/htmlparser/test/TreeTester.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,6 @@ private boolean runTest() throws Throwable {
228228
* && expectedErrors.size() ==
229229
* actualErrors.size()
230230
*/) {
231-
System.err.println("Success.");
232231
// System.err.println(stream);
233232
} else {
234233
exitStatus = 1;

0 commit comments

Comments
 (0)