tck/src/main/java/org/apache/jdo/tck/query/jdoql/operators/BooleanLogicalOR.java [56:109]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void testPositive() {
    PersistenceManager pm = getPM();
    if (debug) logger.debug("\nExecuting positive test BooleanLogicalOR() ...");

    Transaction tx = pm.currentTransaction();
    tx.begin();

    List<PrimitiveTypes> instance9 = pm.newQuery(PrimitiveTypes.class, "id == 9").executeList();
    List<PrimitiveTypes> instancesLess3 = pm.newQuery(PrimitiveTypes.class, "id < 3").executeList();
    List<PrimitiveTypes> allOddInstances =
        pm.newQuery(PrimitiveTypes.class, "booleanNull").executeList();
    List<PrimitiveTypes> allInstances = pm.newQuery(PrimitiveTypes.class, "true").executeList();
    List<PrimitiveTypes> empty = Collections.emptyList();

    // case true | true
    runSimplePrimitiveTypesQuery("true | true", pm, allInstances, ASSERTION_FAILED);

    // case true | false
    runSimplePrimitiveTypesQuery("true | false", pm, allInstances, ASSERTION_FAILED);

    // case false | true
    runSimplePrimitiveTypesQuery("false | true", pm, allInstances, ASSERTION_FAILED);

    // case false | false
    runSimplePrimitiveTypesQuery("false | false", pm, empty, ASSERTION_FAILED);

    // case boolean | boolean
    runSimplePrimitiveTypesQuery(
        "intNotNull == 9 | booleanNotNull", pm, allOddInstances, ASSERTION_FAILED);
    runSimplePrimitiveTypesQuery("id == 1 | id == 2", pm, instancesLess3, ASSERTION_FAILED);

    // case boolean | Boolean
    runSimplePrimitiveTypesQuery(
        "intNotNull == 9 | booleanNull", pm, allOddInstances, ASSERTION_FAILED);
    // case Boolean | boolean
    runSimplePrimitiveTypesQuery(
        "booleanNull | intNotNull == 9", pm, allOddInstances, ASSERTION_FAILED);
    // case Boolean | Boolean
    runSimplePrimitiveTypesQuery(
        "booleanNull | booleanNull", pm, allOddInstances, ASSERTION_FAILED);

    // case Boolean parameter
    runParameterPrimitiveTypesQuery(
        "param | id == 9", "Boolean param", Boolean.TRUE, pm, allInstances, ASSERTION_FAILED);
    runParameterPrimitiveTypesQuery(
        "param | id == 9", "Boolean param", Boolean.FALSE, pm, instance9, ASSERTION_FAILED);

    // case boolean parameter
    runParameterPrimitiveTypesQuery(
        "param | id == 9", "boolean param", Boolean.TRUE, pm, allInstances, ASSERTION_FAILED);
    runParameterPrimitiveTypesQuery(
        "param | id == 9", "boolean param", Boolean.FALSE, pm, instance9, ASSERTION_FAILED);
    tx.commit();
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



tck/src/main/java/org/apache/jdo/tck/query/jdoql/operators/ConditionalOR.java [54:107]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  public void testPositive() {
    PersistenceManager pm = getPM();
    if (debug) logger.debug("\nExecuting test ConditionalOR() ...");

    Transaction tx = pm.currentTransaction();
    tx.begin();

    List<PrimitiveTypes> instance9 = pm.newQuery(PrimitiveTypes.class, "id == 9").executeList();
    List<PrimitiveTypes> instancesLess3 = pm.newQuery(PrimitiveTypes.class, "id < 3").executeList();
    List<PrimitiveTypes> allOddInstances =
        pm.newQuery(PrimitiveTypes.class, "booleanNull").executeList();
    List<PrimitiveTypes> allInstances = pm.newQuery(PrimitiveTypes.class, "true").executeList();
    List<PrimitiveTypes> empty = Collections.emptyList();

    // case true || true
    runSimplePrimitiveTypesQuery("true || true", pm, allInstances, ASSERTION_FAILED);

    // case true || false
    runSimplePrimitiveTypesQuery("true || false", pm, allInstances, ASSERTION_FAILED);

    // case false || true
    runSimplePrimitiveTypesQuery("false || true", pm, allInstances, ASSERTION_FAILED);

    // case false || false
    runSimplePrimitiveTypesQuery("false || false", pm, empty, ASSERTION_FAILED);

    // case boolean || boolean
    runSimplePrimitiveTypesQuery(
        "intNotNull == 9 || booleanNotNull", pm, allOddInstances, ASSERTION_FAILED);
    runSimplePrimitiveTypesQuery("id == 1 || id == 2", pm, instancesLess3, ASSERTION_FAILED);

    // case boolean || Boolean
    runSimplePrimitiveTypesQuery(
        "intNotNull == 9 || booleanNull", pm, allOddInstances, ASSERTION_FAILED);
    // case Boolean || boolean
    runSimplePrimitiveTypesQuery(
        "booleanNull || intNotNull == 9", pm, allOddInstances, ASSERTION_FAILED);
    // case Boolean || Boolean
    runSimplePrimitiveTypesQuery(
        "booleanNull || booleanNull", pm, allOddInstances, ASSERTION_FAILED);

    // case Boolean parameter
    runParameterPrimitiveTypesQuery(
        "param || id == 9", "Boolean param", Boolean.TRUE, pm, allInstances, ASSERTION_FAILED);
    runParameterPrimitiveTypesQuery(
        "param || id == 9", "Boolean param", Boolean.FALSE, pm, instance9, ASSERTION_FAILED);

    // case boolean parameter
    runParameterPrimitiveTypesQuery(
        "param || id == 9", "boolean param", Boolean.TRUE, pm, allInstances, ASSERTION_FAILED);
    runParameterPrimitiveTypesQuery(
        "param || id == 9", "boolean param", Boolean.FALSE, pm, instance9, ASSERTION_FAILED);
    tx.commit();
  }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



