@Override public void doTable(Parse table) { table.parts.parts.addToBody("<br/>classpath: " + System.getProperty("java.class.path")); } }
@Override public void doTable(Parse table) { table.parts.parts.addToBody("<br/>classpath: " + System.getProperty("java.class.path")); } }
public void info(Parse cell, String message) { cell.addToBody(info(message)); }
public Parse makeMessageCell(Exception e) { Parse errorCell = new Parse("td", "", null, null); final StringWriter buffer = new StringWriter(); e.printStackTrace(new PrintWriter(buffer)); errorCell.addToTag(" colspan=\"" + (columnBindings.length + 1) + "\""); errorCell.addToBody("<i>" + ERROR_INDICATOR + e.getMessage() + "</i>"); errorCell.addToBody("<pre>" + (buffer.toString()) + "</pre>"); wrong(errorCell); return errorCell; }
public void exception(Parse cell, Throwable exception) { while (exception.getClass().equals(InvocationTargetException.class)) { exception = ((InvocationTargetException) exception).getTargetException(); } if (isFriendlyException(exception)) { cell.addToBody("<hr/>" + label(exception.getMessage())); } else { final StringWriter buf = new StringWriter(); exception.printStackTrace(new PrintWriter(buf)); cell.addToBody("<hr><pre><div class=\"fit_stacktrace\">" + (buf.toString()) + "</div></pre>"); } cell.addToTag(" class=\"error\""); counts.exceptions++; }
public Parse makeMessageCell(Exception e) { Parse errorCell = new Parse("td", "", null, null); final StringWriter buffer = new StringWriter(); e.printStackTrace(new PrintWriter(buffer)); errorCell.addToTag(" colspan=\"" + (columnBindings.length + 1) + "\""); errorCell.addToBody("<i>" + ERROR_INDICATOR + e.getMessage() + "</i>"); errorCell.addToBody("<pre>" + (buffer.toString()) + "</pre>"); wrong(errorCell); return errorCell; }
protected void mark(Iterator<Parse> rows, String message) { String annotation = label(message); while (rows.hasNext()) {; Parse row = rows.next(); wrong(row.parts); row.parts.addToBody(annotation); } }
protected void mark(Iterator<?> rows, String message) { String annotation = label(message); while (rows.hasNext()) { Parse row = (Parse) rows.next(); wrong(row.parts); row.parts.addToBody(annotation); } }
protected void mark(Iterator<?> rows, String message) { String annotation = label(message); while (rows.hasNext()) { Parse row = (Parse) rows.next(); wrong(row.parts); row.parts.addToBody(annotation); } }
protected void updateColumns(Parse column, double actual, double expected, boolean greaterThan) { if (checkFailureBasedOnGreaterThanOrLessThan(actual, expected, greaterThan)) { super.wrong(column, Double.toString(actual)); } else { super.right(column); column.addToBody("<hr>actual " + Double.toString(actual)); } }
protected void mark(Parse rows, String message) { String annotation = label(message); while (rows != null) { wrong(rows.parts); rows.parts.addToBody(annotation); rows = rows.more; } }
protected void mark(Parse rows, String message) { String annotation = label(message); while (rows != null) { wrong(rows.parts); rows.parts.addToBody(annotation); rows = rows.more; } }
protected void mark(Parse rows, String message) { String annotation = label(message); while (rows != null) { wrong(rows.parts); rows.parts.addToBody(annotation); rows = rows.more; } }
protected void updateColumns(Parse column, double actual, double expected, boolean greaterThan) { if (checkFailureBasedOnGreaterThanOrLessThan(actual, expected, greaterThan)) { super.wrong(column, Double.toString(actual)); } else { super.right(column); column.addToBody("<hr>actual " + Double.toString(actual)); } }
@Override public void wrong(Parse cell, String actual) { // if prefix is used we don't escape the actual value if (actual.startsWith(NO_ESCAPE_PREFIX)) { wrong(cell); String actualNoPrefix = actual.substring(NO_ESCAPE_PREFIX.length()); cell.addToBody(label("expected") + "<hr>" + actualNoPrefix + label("actual")); } else { super.wrong(cell, actual); } } }
private void handleException(Fixture fixture, Parse cell, Exception e) { if (cell.text().isEmpty()) { cell.addToBody(gray("error")); } else { fixture.exception(cell, e); } }
public void error(Parse cell, String message) { cell.body = escape(cell.text()); cell.addToBody("<hr><pre>" + escape(message) + "</pre>"); cell.addToTag(" bgcolor=\"" + yellow + "\""); counts.exceptions++; }
public void wrong(Parse cell, String actual) { wrong(cell); cell.addToBody(label("expected") + "<hr>" + escape(actual) + label("actual")); }