This is an automated email from the ASF dual-hosted git repository. spmallette pushed a commit to branch GValueManager3.8-wip in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit f2961640d4097c931641bdb8fae9bba576eb8a45 Author: Stephen Mallette <[email protected]> AuthorDate: Wed Jun 11 10:34:34 2025 -0400 wip - tests --- .../optimization/InlineFilterStrategyTest.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategyTest.java b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategyTest.java index a58084dc91..a43ae2d2ca 100644 --- a/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategyTest.java +++ b/gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/optimization/InlineFilterStrategyTest.java @@ -204,6 +204,39 @@ public class InlineFilterStrategyTest { // Test edge label with GValue { outE().hasLabel(GValue.of("x", "knows")).inV().asAdmin() }, { outE().hasLabel(GValue.of("x", "knows"), GValue.of("y", "created")).inV().asAdmin() }, + + // Additional test cases for expanded coverage + + // Test with P.within predicate using GValue + { filter(has("age", P.within(GValue.ofInteger("x", 20), GValue.ofInteger("y", 30), GValue.ofInteger("z", 40)))).asAdmin() }, + + // Test with P.inside predicate using GValue + { filter(has("age", inside(GValue.ofInteger("x", 20), GValue.ofInteger("y", 30)))).asAdmin() }, + + // Test with multiple has steps in filter + { filter(has("age", GValue.of("x", 25)).has("name", GValue.of("y", "marko"))).asAdmin() }, + + // Test with nested filters + { filter(filter(has("age", GValue.of("x", 25)))).asAdmin() }, + + // Test with more complex nested structure + { filter(or(has("name", GValue.of("x", "marko")), + filter(and(has("age", gt(GValue.ofInteger("y", 30))), + has("age", lt(GValue.ofInteger("z", 40))))))).asAdmin() }, + + // Test with different GValue types + { filter(has("weight", GValue.ofDouble("x", 0.5))).asAdmin() }, + { filter(has("active", GValue.ofBoolean("x", true))).asAdmin() }, + + // Test with multiple variables in a single predicate + { filter(has("age", inside(GValue.ofInteger("min", 20), GValue.ofInteger("max", 30)))).asAdmin() }, + + // Test with hasLabel and multiple GValues + { filter(hasLabel(GValue.of("x", "person"))).asAdmin() }, + { filter(hasLabel(GValue.of("x", "person"), GValue.of("y", "software"))).asAdmin() }, + + // Test with traversal filter step containing GValue + { filter(__.filter(has("age", GValue.of("x", 25)))).asAdmin() }, }); }
