private void checkExpected() { for ( int anExpected : expected ) { if ( anExpected != 0 ) { fail( "Expected error: " + ParseException.errorCodeName( anExpected ) + " but it did not occur." ); } } }
private void checkExpected() { for ( int anExpected : expected ) { if ( anExpected != 0 ) { fail( "Expected error: " + ParseException.errorCodeName( anExpected ) + " but it did not occur." ); } } }
private void error(int level, Exception e) { //System.err.println(e.getMessage()); if (e instanceof ParseException) { int eCode = ((ParseException) e).getErrorNumber(); onError(level, eCode); } else { fail("Not expecting an Exception: " + e.getMessage()); } }
private void error(int level, Exception e) { //System.err.println(e.getMessage()); if (e instanceof ParseException) { int eCode = ((ParseException) e).getErrorNumber(); onError(level, eCode); } else { fail("Not expecting an Exception: " + e.getMessage()); } }
void onError(int level, int num) { for (int i = 0; i < expected.length; i++) if (expected[i] == num) { expected[i] = 0; return; } String msg = "Parser reports unexpected " + WGTestSuite.errorLevelName[level] + ": " + ParseException.errorCodeName(num); println(msg); fail(msg); }
void onError(int level, int num) { for (int i = 0; i < expected.length; i++) if (expected[i] == num) { expected[i] = 0; return; } String msg = "Parser reports unexpected " + WGTestSuite.errorLevelName[level] + ": " + ParseException.errorCodeName(num); println(msg); fail(msg); }
try { a.load(in); fail("Thread was not interrupted."); } catch (InterruptedIOException | SAXParseException e) {
try { a.load(in); fail("Thread was not interrupted."); } catch (InterruptedIOException | SAXParseException e) {