Skip to content

Commit 7f2d03d

Browse files
committed
more tests
1 parent 418d6c0 commit 7f2d03d

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

raphtory/src/db/graph/views/valid_graph.rs

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -751,6 +751,27 @@ mod tests {
751751
assert_graph_equal(&gv, &gvm);
752752
}
753753

754+
#[test]
755+
fn missing_temporal_edge2() {
756+
let g = PersistentGraph::new();
757+
g.add_edge(5645330705666146591, 1, 0, NO_PROPS, None)
758+
.unwrap();
759+
g.add_edge(-1210620964744371166, 0, 1, NO_PROPS, None)
760+
.unwrap();
761+
g.add_edge(0, 0, 1, NO_PROPS, None).unwrap();
762+
g.add_edge(0, 1, 0, NO_PROPS, None).unwrap();
763+
g.add_edge(-2858313576584972493, 1, 0, NO_PROPS, Some("b"))
764+
.unwrap();
765+
let gw = g
766+
.valid()
767+
.unwrap()
768+
.window(-6657701247011733639, 5645330705666058885);
769+
let gwm = gw.materialize().unwrap();
770+
let exploded: Vec<_> = gwm.edges().explode().into_iter().collect();
771+
println!("{:?}", exploded);
772+
assert_graph_equal(&gw, &gwm);
773+
}
774+
754775
#[test]
755776
fn mismatched_edge_properties() {
756777
let g = PersistentGraph::new();
@@ -762,6 +783,15 @@ mod tests {
762783
.unwrap();
763784

764785
let gw = g.valid().unwrap().window(-1, 1);
786+
assert_eq!(
787+
gw.edge(0, 1)
788+
.unwrap()
789+
.properties()
790+
.constant()
791+
.get("const_test")
792+
.unwrap(),
793+
Prop::map([("_default", 2)])
794+
);
765795
assert_graph_equal(&gw, &gw.materialize().unwrap());
766796
}
767797
}

0 commit comments

Comments
 (0)