()
| 193 | use crate::engine::graph::csr::CsrIndex; |
| 194 | |
| 195 | fn make_snapshot() -> Arc<CsrSnapshot> { |
| 196 | let mut csr = CsrIndex::new(); |
| 197 | for i in 0..100 { |
| 198 | csr.add_edge(&format!("n{i}"), "L", &format!("n{}", (i + 1) % 100)) |
| 199 | .unwrap(); |
| 200 | } |
| 201 | Arc::new(CsrSnapshot::from_csr(&mut csr)) |
| 202 | } |
| 203 | |
| 204 | #[test] |
| 205 | fn compute_partitions_basic() { |