Skip to content

Commit f5ad53c

Browse files
sideshowbarkerhsivonen
authored andcommitted
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 c4571cf commit f5ad53c

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
@@ -87,7 +87,6 @@ private boolean runTest() throws IOException, SAXException {
8787
String sniffed = charset.name();
8888
String expected = Encoding.forName(builder.toString()).newDecoder().charset().name();
8989
if (expected.equalsIgnoreCase(sniffed)) {
90-
System.err.println("Success.");
9190
// System.err.println(stream);
9291
} else {
9392
exitStatus = 1;

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,7 @@ private void runTestInner(String inputString, JSONArray expectedTokens,
191191
try {
192192
driver.tokenize(is);
193193
JSONArray actualTokens = tokenHandler.getArray();
194-
if (jsonDeepEquals(actualTokens, expectedTokens)) {
195-
writer.write("Success\n");
196-
} else {
194+
if (!jsonDeepEquals(actualTokens, expectedTokens)) {
197195
exitStatus = 1;
198196
writer.write("Failure\n");
199197
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
@@ -227,7 +227,6 @@ private boolean runTest() throws Throwable {
227227
* && expectedErrors.size() ==
228228
* actualErrors.size()
229229
*/) {
230-
System.err.println("Success.");
231230
// System.err.println(stream);
232231
} else {
233232
exitStatus = 1;

0 commit comments

Comments
 (0)