Initial release #1

Merged
warrence merged 102 commits from dev into main 2026-06-30 10:26:52 +02:00
Showing only changes of commit 384dca2d20 - Show all commits
+5 -5
View File
@@ -473,21 +473,21 @@ macro_rules! graph_topology_tests {
"unexpected incidence count for vertex {:?}", "unexpected incidence count for vertex {:?}",
vertices[i] vertices[i]
); );
let mut remaining = incidences[i].clone(); let mut expected = incidences[i].clone();
for incidence in graph.incidences(vertices[i]) { for incidence in graph.incidences(vertices[i]) {
let pos = remaining let pos = expected
.iter() .iter()
.position(|(v, e)| *v == incidence.0 && *e == incidence.1) .position(|(v, e)| *v == incidence.0 && *e == incidence.1)
.expect(&format!( .expect(&format!(
"unexpected incidence {incidence:?} of vertex {:?} from the iterator", "unexpected incidence {incidence:?} of vertex {:?} from the iterator",
vertices[i] vertices[i]
)); ));
remaining.swap_remove(pos); expected.swap_remove(pos);
} }
assert!( assert!(
remaining.is_empty(), expected.is_empty(),
"expected incidences {:?} of vertex {:?} were not matched by the iterator", "expected incidences {:?} of vertex {:?} were not matched by the iterator",
remaining, expected,
vertices[i] vertices[i]
); );
} }