ConstValue extends AbstractNode { public Object getValue(){ return value; } ConstValue(InputStream is); Object getValue(); @Override String toString(); String getUnquotedValue(); boolean isSysConstant(); SystemConsts getSysConstant();  }
@Test public void testStringConst() throws Exception { String test = "'string value'"; String expected = test.replaceAll("'", "\""); ConstValue cv = new ConstValue(getInputStream(test)); assertNotNull(cv.getValue()); assertEquals(expected, cv.getValue()); assertTrue(cv.getValue() instanceof String); test = "\"string value\""; cv = new ConstValue(getInputStream(test)); assertNotNull(cv.getValue()); assertEquals(expected, cv.getValue()); assertTrue(cv.getValue() instanceof String); }
@Test public void testNumConst() throws Exception { String test = "12345.89"; ConstValue cv = new ConstValue(getInputStream(test)); assertNotNull(cv.getValue()); assertTrue(cv.getValue() instanceof String); assertEquals(test, cv.getValue()); }