Package org.apache.imperius.spl.parser.expressions.impl

Examples of org.apache.imperius.spl.parser.expressions.impl.Log10


        //SensorLookup lookup = new SensorLookupImpl(map);

        try {
          Vector v = new Vector();
            v.add(new ShortConstant(sn1));
            Expression e1 = new Log10(v,true);

            v.clear();
            v.add(new IntegerConstant(in1));
            Expression e2 = new Log10(v,true);

            v.clear();
            v.add(new LongConstant(ln1));
            Expression e3 = new Log10(v,true);

            v.clear();
            v.add(new FloatConstant(fn1));
            Expression e4 = new Log10(v,true);

            v.clear();
            v.add(new DoubleConstant(dn1));
            Expression e5 = new Log10(v,true);

           assertTrue(((Number) e1.evaluate()).doubleValue()==1.4771212547196624);
           assertTrue(((Number) e2.evaluate()).doubleValue()==2.9999999999999996);
           assertTrue(((Number) e3.evaluate()).doubleValue()==3.301029995663981);
           assertTrue(((Number) e4.evaluate()).doubleValue()==1.6998377126400839);
           assertTrue(((Number) e5.evaluate()).doubleValue()==2.0017337128090005);
          

        } catch (SPLException e) {
            fail("Received evaluation exception " + e.getMessage());
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.imperius.spl.parser.expressions.impl.Log10

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.