Пример #1
0
  @Test
  public void testResultValue03() throws Exception {
    Log10Function function = new Log10Function();
    function.addArgument(new ValueFunctionArgument("1000"));

    assertTrue(function.parse());

    assertEquals(3.0, function.getInternalValue(), Math.ulp(1.0));
  }
Пример #2
0
 /** Registers all the built-in functions. */
 public void registerBuiltins() {
   registerFunction(
       AbsFunction.getName(),
       AbsFunction.getDescription(),
       AbsFunction.getArgumentNames(),
       AbsFunction.class);
   registerFunction(
       AndFunction.getName(),
       AndFunction.getDescription(),
       AndFunction.getArgumentNames(),
       AndFunction.class);
   registerFunction(
       ConcatFunction.getName(),
       ConcatFunction.getDescription(),
       ConcatFunction.getArgumentNames(),
       ConcatFunction.class);
   registerFunction(
       CosFunction.getName(),
       CosFunction.getDescription(),
       CosFunction.getArgumentNames(),
       CosFunction.class);
   registerFunction(
       IncludesFunction.getName(),
       IncludesFunction.getDescription(),
       IncludesFunction.getArgumentNames(),
       IncludesFunction.class);
   registerFunction(
       Log10Function.getName(),
       Log10Function.getDescription(),
       Log10Function.getArgumentNames(),
       Log10Function.class);
   registerFunction(
       LogFunction.getName(),
       LogFunction.getDescription(),
       LogFunction.getArgumentNames(),
       LogFunction.class);
   registerFunction(
       MaxFunction.getName(),
       MaxFunction.getDescription(),
       MaxFunction.getArgumentNames(),
       MaxFunction.class);
   registerFunction(
       MeanFunction.getName(),
       MeanFunction.getDescription(),
       MeanFunction.getArgumentNames(),
       MeanFunction.class);
   registerFunction(
       MedianFunction.getName(),
       MedianFunction.getDescription(),
       MedianFunction.getArgumentNames(),
       MedianFunction.class);
   registerFunction(
       MinFunction.getName(),
       MinFunction.getDescription(),
       MinFunction.getArgumentNames(),
       MinFunction.class);
   registerFunction(
       MultFunction.getName(),
       MultFunction.getDescription(),
       MultFunction.getArgumentNames(),
       MultFunction.class);
   registerFunction(
       NotFunction.getName(),
       NotFunction.getDescription(),
       NotFunction.getArgumentNames(),
       NotFunction.class);
   registerFunction(
       OrFunction.getName(),
       OrFunction.getDescription(),
       OrFunction.getArgumentNames(),
       OrFunction.class);
   registerFunction(
       PowFunction.getName(),
       PowFunction.getDescription(),
       PowFunction.getArgumentNames(),
       PowFunction.class);
   registerFunction(
       RemoveFunction.getName(),
       RemoveFunction.getDescription(),
       RemoveFunction.getArgumentNames(),
       RemoveFunction.class);
   registerFunction(
       SinFunction.getName(),
       SinFunction.getDescription(),
       SinFunction.getArgumentNames(),
       SinFunction.class);
   registerFunction(
       StddevFunction.getName(),
       StddevFunction.getDescription(),
       StddevFunction.getArgumentNames(),
       StddevFunction.class);
   registerFunction(
       SumFunction.getName(),
       SumFunction.getDescription(),
       SumFunction.getArgumentNames(),
       SumFunction.class);
   registerFunction(
       TanFunction.getName(),
       TanFunction.getDescription(),
       TanFunction.getArgumentNames(),
       TanFunction.class);
   registerFunction(
       TrimFunction.getName(),
       TrimFunction.getDescription(),
       TrimFunction.getArgumentNames(),
       TrimFunction.class);
   registerFunction(
       XorFunction.getName(),
       XorFunction.getDescription(),
       XorFunction.getArgumentNames(),
       XorFunction.class);
 }