}
@Override
protected void runTest() throws Throwable
{
Expr expr = null ;
try {
expr = parse(exprString) ;
}
catch (Error err)
{
fail("Error thrown in parse: "+err) ;
}
catch (Exception ex)
{
if ( failureMode != TestExpr.PARSE_FAIL )
fail("Unexpected parsing failure: "+ex) ;
checkException(expr, ex) ;
return ;
}
if ( failureMode == TestExpr.PARSE_FAIL )
{
fail("Test should have failed in parsing: "+expr) ;
return ;
}
Expr expr2 = expr.deepCopy() ;
if ( ! expr.equals(expr2) )
{
System.out.println("Expr: "+expr) ;
System.out.println("Expr2: "+expr2) ;
assertEquals(expr, expr2) ;