//SensorLookup lookup = new SensorLookupImpl(map);
try {
Vector v = new Vector();
v.add(new ShortConstant(sn1));
Expression e1 = new SquareRoot(v,true);
v.clear();
v.add(new IntegerConstant(in1));
Expression e2 = new SquareRoot(v,true);
v.clear();
v.add(new LongConstant(ln1));
Expression e3 = new SquareRoot(v,true);
v.clear();
v.add(new FloatConstant(fn1));
Expression e4 = new SquareRoot(v,true);
v.clear();
v.add(new DoubleConstant(dn1));
Expression e5 = new SquareRoot(v,true);
assertTrue(
(new Double(Math.sqrt(sn1)).shortValue()
- ((Number) e1.evaluate()).shortValue())
== 0);
assertTrue(
(new Double(Math.sqrt(in1)).intValue()
- ((Number) e2.evaluate()).intValue())
== 0);
assertTrue(
(new Double(Math.sqrt(ln1)).longValue()
- ((Number) e3.evaluate()).longValue())
== 0);
assertTrue(
(new Double(Math.sqrt(fn1)).floatValue()
- ((Number) e4.evaluate()).floatValue())
== 0);
assertTrue(
(new Double(Math.sqrt(dn1)).doubleValue()
- ((Number) e5.evaluate()).doubleValue())
== 0);
//assertSame((new Double(dn1)).getClass(), (e1.evaluate()).getClass());
} catch (SPLException e) {
fail("Received evaluation exception " + e.getMessage());