In random collaboration test, compare all guests' buffers to the host's buffers

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-02-16 11:15:20 -08:00
parent 06fb9ccca0
commit 93ed34f918
2 changed files with 25 additions and 18 deletions

View file

@ -344,6 +344,11 @@ impl Project {
cx.update(|cx| Project::local(client, user_store, languages, fs, cx))
}
#[cfg(any(test, feature = "test-support"))]
pub fn shared_buffer(&self, peer_id: PeerId, remote_id: u64) -> Option<ModelHandle<Buffer>> {
Some(self.shared_buffers.get(&peer_id)?.get(&remote_id)?.clone())
}
pub fn fs(&self) -> &Arc<dyn Fs> {
&self.fs
}