Fix assertions

This commit is contained in:
Antonio Scandurra 2023-01-17 18:09:45 +01:00
parent cc788dc5f7
commit dc88a67f50

View File

@ -407,28 +407,28 @@ async fn test_random_collaboration(
let host_saved_version =
host_buffer.read_with(host_cx, |b, _| b.saved_version().clone());
let guest_saved_version =
host_buffer.read_with(host_cx, |b, _| b.saved_version().clone());
guest_buffer.read_with(client_cx, |b, _| b.saved_version().clone());
assert_eq!(guest_saved_version, host_saved_version);
let host_saved_version_fingerprint = host_buffer
.read_with(host_cx, |b, _| b.saved_version_fingerprint().to_string());
let guest_saved_version_fingerprint = host_buffer
.read_with(host_cx, |b, _| b.saved_version_fingerprint().to_string());
let guest_saved_version_fingerprint = guest_buffer
.read_with(client_cx, |b, _| b.saved_version_fingerprint().to_string());
assert_eq!(
guest_saved_version_fingerprint,
host_saved_version_fingerprint
);
let host_saved_mtime = host_buffer.read_with(host_cx, |b, _| b.saved_mtime());
let guest_saved_mtime = host_buffer.read_with(host_cx, |b, _| b.saved_mtime());
let guest_saved_mtime = guest_buffer.read_with(client_cx, |b, _| b.saved_mtime());
assert_eq!(guest_saved_mtime, host_saved_mtime);
let host_is_dirty = host_buffer.read_with(host_cx, |b, _| b.is_dirty());
let guest_is_dirty = host_buffer.read_with(host_cx, |b, _| b.is_dirty());
let guest_is_dirty = guest_buffer.read_with(client_cx, |b, _| b.is_dirty());
assert_eq!(guest_is_dirty, host_is_dirty);
let host_has_conflict = host_buffer.read_with(host_cx, |b, _| b.has_conflict());
let guest_has_conflict = host_buffer.read_with(host_cx, |b, _| b.has_conflict());
let guest_has_conflict = guest_buffer.read_with(client_cx, |b, _| b.has_conflict());
assert_eq!(guest_has_conflict, host_has_conflict);
}
}