📄 consoletestresult.java
字号:
package org.placelab.test;import java.io.PrintWriter;/** * All tests produce a TestResult. * */public class ConsoleTestResult extends TestResult { private PrintWriter pw; private boolean printHTML; public static final String SHOW_ERROR_TRACE="irs.showErrorTrace";/** The test results are written to pw and the results are either simple HTML if printHTML is true, or plain text. **/ public ConsoleTestResult(PrintWriter pw, boolean printHTML) { this.pw = pw; this.printHTML = printHTML; } public ConsoleTestResult(PrintWriter pw, boolean printHTML, boolean haveNetwork_NOTUSED) { this(pw,printHTML); } public void print(String msg) { if (printHTML) { pw.println("<font face=Curier>" + msg + "</font><br>"); } else { pw.println(msg); } } public void exceptionExtra(Throwable t) { if (true || System.getProperty(SHOW_ERROR_TRACE)!=null) { t.printStackTrace(System.err); } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -