Skip to content

Commit 2a88d99

Browse files
committed
feat: checkpoint
1 parent 58218e7 commit 2a88d99

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

  • libs/@local/hashql/mir/src/pass/execution/island/schedule

libs/@local/hashql/mir/src/pass/execution/island/schedule/tests.rs

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,23 +36,19 @@ fn data_island_before_consumer() {
3636
let schedule = graph.schedule();
3737
let entries = schedule.entries();
3838

39-
assert!(entries.len() >= 2);
39+
assert_eq!(entries.len(), 2);
4040

4141
let exec_entry = entries
4242
.iter()
43-
.find(|entry| matches!(graph[entry.island].kind(), IslandKind::Exec(_)));
43+
.find(|entry| matches!(graph[entry.island].kind(), IslandKind::Exec(_)))
44+
.expect("should have an exec island");
4445
let data_entry = entries
4546
.iter()
46-
.find(|entry| matches!(graph[entry.island].kind(), IslandKind::Data));
47+
.find(|entry| matches!(graph[entry.island].kind(), IslandKind::Data))
48+
.expect("should have a data island");
4749

48-
if let (Some(exec_entry), Some(data_entry)) = (exec_entry, data_entry) {
49-
assert!(
50-
exec_entry.level > data_entry.level,
51-
"exec island (level {}) should be after data island (level {})",
52-
exec_entry.level,
53-
data_entry.level
54-
);
55-
}
50+
assert_eq!(data_entry.level, 0);
51+
assert_eq!(exec_entry.level, 1);
5652
}
5753

5854
/// Every island in the graph appears exactly once in the schedule.

0 commit comments

Comments
 (0)