From 5008b657aac1bffbfba843f410bae053f5667ff7 Mon Sep 17 00:00:00 2001 From: Predrag Gruevski Date: Wed, 18 Dec 2024 00:24:34 +0000 Subject: [PATCH] Sloppy repro of "mandatory folded edges" not being considered mandatory. --- trustfall_core/src/interpreter/hints/tests/mod.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/trustfall_core/src/interpreter/hints/tests/mod.rs b/trustfall_core/src/interpreter/hints/tests/mod.rs index 4c2cf5a4..a4b3327b 100644 --- a/trustfall_core/src/interpreter/hints/tests/mod.rs +++ b/trustfall_core/src/interpreter/hints/tests/mod.rs @@ -1204,6 +1204,18 @@ mod static_property_values { Some(CandidateValue::Single(FieldValue::Int64(1))), next_neighbor.statically_required_property("value"), ); + + let next_edge_info = destination.first_mandatory_edge("predecessor").expect("no mandatory 'predecessor' edge info"); + let next_neighbor = next_edge_info.destination(); + assert_eq!(vid(3), next_neighbor.vid()); + + // This value *is* statically known here: the "fold-count-filter" around it + // ensures that at least one such value must exist, or else vertices + // from the currently-resolved edge will be discarded. + assert_eq!( + Some(CandidateValue::Single(FieldValue::Int64(1))), + next_neighbor.statically_required_property("value"), + ); })), eid(2) => TrackCalls::::new_underlying(Box::new(|info| { let destination = info.destination();