edu.sdsc.inca.depot.util
Class ExprComparitor

java.lang.Object
  extended by 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

Field Summary
static java.lang.String FAILURE_RESULT
           
static java.lang.String SUCCESS_RESULT
           
 
Constructor Summary
ExprComparitor()
           
 
Method Summary
 java.lang.String compare(AcceptedOutput ao, Report report)
          Compares a report against acceptable output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

ExprComparitor

public ExprComparitor()
Method Detail

compare

public java.lang.String compare(AcceptedOutput ao,
                                Report report)
Compares a report against acceptable output.

Parameters:
ao - the acceptable output secification
report - the report to compare
Returns:
a string that starts with either FAILURE_RESULT or SUCCESS_RESULT, depending on whether or not the comparision succeeded