Skip to content

Commit 1d25f8a

Browse files
Drop “Success” for TokenizerTester/TreeTester pass
This change makes TokenizerTester and TreeTester stop emitting the word “Success” to standard error every single time a test passes. Otherwise, without this change, in TokenizerTester/TreeTester 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 the failures).
1 parent 04902b6 commit 1d25f8a

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

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)