Fix Locator::from_index

Enhance language::tests::test_random_collaborators so that it checks buffer invariants.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
This commit is contained in:
Max Brunsfeld 2022-01-05 17:58:24 -08:00
parent e5faaeb2f2
commit f9f75e98f8
4 changed files with 46 additions and 34 deletions

View file

@ -941,6 +941,10 @@ fn test_random_collaboration(cx: &mut MutableAppContext, mut rng: StdRng) {
now += Duration::from_millis(rng.gen_range(0..=200));
buffers.extend(new_buffer);
for buffer in &buffers {
buffer.read(cx).check_invariants();
}
if mutation_count == 0 && network.is_idle() {
break;
}