@Test
    @FeatureRequirement(featureClass = GraphFeatures.class, feature = GraphFeatures.FEATURE_ORDERABILITY_SEMANTICS)
    public void testCompareAcrossTypes() {
        // P.eq
        checkHasNext(false, g.inject("foo").is(P.eq(1.0d)));
        checkHasNext(false, g.inject(1.0d).is(P.eq("foo")));
        // P.neq
        checkHasNext(true, g.inject("foo").is(P.neq(1.0d)));
        checkHasNext(true, g.inject(1.0d).is(P.neq("foo")));
        // P.lt
        checkHasNext(false, g.inject("foo").is(P.lt(1.0d)));
        checkHasNext(false, g.inject(1.0d).is(P.lt("foo")));
        // P.lte
        checkHasNext(false, g.inject("foo").is(P.lte(1.0d)));
        checkHasNext(false, g.inject(1.0d).is(P.lte("foo")));
        // P.gt
        checkHasNext(false, g.inject("foo").is(P.gt(1.0d)));
        checkHasNext(false, g.inject(1.0d).is(P.gt("foo")));
        // P.gte
        checkHasNext(false, g.inject("foo").is(P.gte(1.0d)));
        checkHasNext(false, g.inject(1.0d).is(P.gte("foo")));
    }
Comparisons across type families. FALSE for P.eq, TRUE for P.neq, and UNDEF with binary
reduction to FALSE for P.lt/lte/gt/gte.
gremlin-test/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/step/TernaryBooleanLogicsTest.java