Move project assertions into main assertion function

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
Max Brunsfeld 2023-04-06 11:38:21 -07:00
parent ef04dc14cc
commit 22a6a243bc
2 changed files with 16 additions and 32 deletions

View file

@ -869,7 +869,17 @@ fn check_consistency_between_clients(clients: &[(Rc<TestClient>, TestAppContext)
}
}
guest_project.check_invariants(cx);
for buffer in guest_project.opened_buffers(cx) {
let buffer = buffer.read(cx);
assert_eq!(
buffer.deferred_ops_len(),
0,
"{} has deferred operations for buffer {:?} in project {:?}",
client.username,
buffer.file().unwrap().full_path(cx),
guest_project.remote_id(),
);
}
});
}