示例#1
0
  @Test
  public void testNormalizeSymbolReferenceAndReference() throws Exception {
    OrOperator operator = new OrOperator();

    Function function =
        new Function(operator.info(), Arrays.<Symbol>asList(new Reference(), new Reference()));
    Symbol normalizedSymbol = operator.normalizeSymbol(function);
    assertThat(normalizedSymbol, instanceOf(Function.class));
  }
示例#2
0
  @Test
  public void testNormalizeSymbolReferenceAndLiteral() throws Exception {
    OrOperator operator = new OrOperator();

    Function function =
        new Function(
            operator.info(), Arrays.<Symbol>asList(new Reference(), Literal.newLiteral(true)));
    Symbol normalizedSymbol = operator.normalizeSymbol(function);
    assertLiteralSymbol(normalizedSymbol, true);
  }