コード例 #1
0
 @Test
 public void testBinaryFunctionsFilter() {
   for (Relation rel : Relation.values()) {
     if (rel.isFunctionCall() && (2 == rel.getExpectedArgumentCount())) {
       testValid("a eq " + rel.getoDataString() + "(a, b)");
     }
   }
 }
コード例 #2
0
  /*
   * Test the few ternary operators
   */
  @Test
  public void testTernaryFunctionsFilter() {
    // Test the 3 argument version of substring
    testValid("a eq substring('a', 'b', 'c')");

    for (Relation rel : Relation.values()) {
      if (rel.isFunctionCall() && (3 == rel.getExpectedArgumentCount())) {
        testValid("a eq " + rel.getoDataString() + "(a, b, c)");
      }
    }
  }
コード例 #3
0
 @Test
 public void testUnaaryFunctionsFilter() {
   for (Relation rel : Relation.values()) {
     if (rel.isFunctionCall() && (1 == rel.getExpectedArgumentCount())) {
       if (Relation.ISOF != rel) {
         testValid("a eq " + rel.getoDataString() + "(a)");
       } else {
         // ISOF requires literal arguments.
         testValid("a eq " + rel.getoDataString() + "('a')");
       }
     }
   }
 }