Search in sources :

Example 1 with SourcePos

use of org.activityinfo.model.formula.SourcePos in project activityinfo by bedatadriven.

the class FormulaValidatorTest method badNumberOfArguments.

@Test
public void badNumberOfArguments() {
    FormulaValidator validator = validate("IF(1)");
    assertThat(validator.getErrors(), hasSize(1));
    assertThat(validator.getErrors().get(0).getSourceRange(), equalTo(new SourceRange(new SourcePos(0, 0), 5)));
}
Also used : FormulaValidator(org.activityinfo.analysis.FormulaValidator) SourceRange(org.activityinfo.model.formula.SourceRange) SourcePos(org.activityinfo.model.formula.SourcePos) Test(org.junit.Test)

Aggregations

FormulaValidator (org.activityinfo.analysis.FormulaValidator)1 SourcePos (org.activityinfo.model.formula.SourcePos)1 SourceRange (org.activityinfo.model.formula.SourceRange)1 Test (org.junit.Test)1