Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Improve randomized test assertion message when diff base is wrong

Max Brunsfeldabfbba68f055
diff --git a/crates/collab/src/tests/randomized_integration_tests.rs b/crates/collab/src/tests/randomized_integration_tests.rs
index eb78ffd47a5..00273722c43 100644
--- a/crates/collab/src/tests/randomized_integration_tests.rs
+++ b/crates/collab/src/tests/randomized_integration_tests.rs
@@ -973,7 +973,11 @@ fn check_consistency_between_clients(clients: &[(Rc<TestClient>, TestAppContext)
host_buffer.read_with(host_cx, |b, _| b.diff_base().map(ToString::to_string));
let guest_diff_base = guest_buffer
.read_with(client_cx, |b, _| b.diff_base().map(ToString::to_string));
- assert_eq!(guest_diff_base, host_diff_base);
+ assert_eq!(
+ guest_diff_base, host_diff_base,
+ "guest {} diff base does not match host's for path {path:?} in project {project_id}",
+ client.username
+ );
let host_saved_version =
host_buffer.read_with(host_cx, |b, _| b.saved_version().clone());