ValueEval[] values = {
new NumberEval(4),
BoolEval.FALSE,
new NumberEval(5),
new StringEval("Albert"),
BoolEval.FALSE,
BoolEval.TRUE,
new NumberEval(10),
new StringEval("Charles"),
new StringEval("Ed"),
new NumberEval(10),
new NumberEval(25),
BoolEval.TRUE,
new StringEval("Ed"),
};
AreaEval ae = EvalFactory.createAreaEval("A1:A13", values);
assertEquals(ErrorEval.NA, invokeMatch(new StringEval("Aaron"), ae, MATCH_LARGEST_LTE));
confirmInt(5, invokeMatch(BoolEval.FALSE, ae, MATCH_LARGEST_LTE));
confirmInt(2, invokeMatch(BoolEval.FALSE, ae, MATCH_EXACT));
confirmInt(3, invokeMatch(new NumberEval(5), ae, MATCH_LARGEST_LTE));
confirmInt(3, invokeMatch(new NumberEval(5), ae, MATCH_EXACT));
confirmInt(8, invokeMatch(new StringEval("CHARLES"), ae, MATCH_EXACT));
//wildcard values
confirmInt(8, invokeMatch(new StringEval("CHAR*"), ae, MATCH_EXACT));
confirmInt(8, invokeMatch(new StringEval("*CHARLES"), ae, MATCH_EXACT));
confirmInt(4, invokeMatch(new StringEval("Ben"), ae, MATCH_LARGEST_LTE));
confirmInt(13, invokeMatch(new StringEval("ED"), ae, MATCH_LARGEST_LTE));
confirmInt(13, invokeMatch(new StringEval("ED*"), ae, MATCH_LARGEST_LTE));
confirmInt(13, invokeMatch(new StringEval("*ED"), ae, MATCH_LARGEST_LTE));
confirmInt(9, invokeMatch(new StringEval("ED"), ae, MATCH_EXACT));
confirmInt(9, invokeMatch(new StringEval("ED*"), ae, MATCH_EXACT));
confirmInt(13, invokeMatch(new StringEval("Hugh"), ae, MATCH_LARGEST_LTE));
assertEquals(ErrorEval.NA, invokeMatch(new StringEval("Hugh"), ae, MATCH_EXACT));
confirmInt(11, invokeMatch(new NumberEval(30), ae, MATCH_LARGEST_LTE));
confirmInt(12, invokeMatch(BoolEval.TRUE, ae, MATCH_LARGEST_LTE));
}