edu.sdsc.inca.depot.util
Class ExprComparitor
java.lang.Object
edu.sdsc.inca.depot.util.ExprComparitor
public class ExprComparitor
- extends java.lang.Object
Matches the contents of certain tags in a report body against an expected
expression. Supports the boolean binary operators <, <=, >, >=,
==, !=, <>, &&, and ||, as well as perl's pattern match (=~)
and mismatch (!~) operators. Supports parenthesized sub-expressions.
Operands may be any of: a quoted string literal; a numeric literal; a
pattern literal enclosed in slashes; an identifier defined in the report
body by an ID tag; a version literal composed of digits, letters,
underscores and dots.
- Author:
- jhayes
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FAILURE_RESULT
public static final java.lang.String FAILURE_RESULT
- See Also:
- Constant Field Values
SUCCESS_RESULT
public static final java.lang.String SUCCESS_RESULT
- See Also:
- Constant Field Values
ExprComparitor
public ExprComparitor()
compare
public java.lang.String compare(AcceptedOutput ao,
Report report)
- Compares a report against acceptable output.
- Parameters:
ao
- the acceptable output secificationreport
- the report to compare
- Returns:
- a string that starts with either FAILURE_RESULT or SUCCESS_RESULT,
depending on whether or not the comparision succeeded