use of org.apache.poi.ss.formula.ptg.BoolPtg in project poi by apache.
the class TestFormulaParserIf method testYN.
public void testYN() {
Ptg[] ptgs = parseFormula("IF(TRUE,\"Y\",\"N\")");
assertEquals(7, ptgs.length);
BoolPtg flag = (BoolPtg) ptgs[0];
AttrPtg funif = (AttrPtg) ptgs[1];
StringPtg y = (StringPtg) ptgs[2];
AttrPtg goto1 = (AttrPtg) ptgs[3];
StringPtg n = (StringPtg) ptgs[4];
assertEquals(true, flag.getValue());
assertEquals("Y", y.getValue());
assertEquals("N", n.getValue());
assertEquals("IF", funif.toFormulaString());
assertTrue("tAttrSkip ptg exists", goto1.isSkip());
}
use of org.apache.poi.ss.formula.ptg.BoolPtg in project poi by apache.
the class TestFormulaParser method testTRUE.
@Test
public void testTRUE() {
Ptg[] ptgs = parseFormula("TRUE");
assertEquals(1, ptgs.length);
BoolPtg flag = (BoolPtg) ptgs[0];
assertEquals(true, flag.getValue());
}
Aggregations