Skip to content

Commit fd241cf

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 c01d841 commit fd241cf

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

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,7 @@ private void runTestInner(String inputString, JSONArray expectedTokens,
181181
try {
182182
driver.tokenize(is);
183183
JSONArray actualTokens = tokenHandler.getArray();
184-
if (jsonDeepEquals(actualTokens, expectedTokens)) {
185-
writer.write("Success\n");
186-
} else {
184+
if (!jsonDeepEquals(actualTokens, expectedTokens)) {
187185
exitStatus = 1;
188186
writer.write("Failure\n");
189187
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
@@ -223,7 +223,6 @@ private boolean runTest() throws Throwable {
223223
* && expectedErrors.size() ==
224224
* actualErrors.size()
225225
*/) {
226-
System.err.println("Success.");
227226
// System.err.println(stream);
228227
} else {
229228
exitStatus = 1;

0 commit comments

Comments
 (0)