Use NoopTextSystem during tests (#28607)

This should allow tests to be more similar across platforms.

Release Notes:

- N/A
This commit is contained in:
Conrad Irwin 2025-04-11 16:26:41 -06:00 committed by GitHub
parent 97a9a5de10
commit 5994ac5cec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 97 additions and 54 deletions

View file

@ -330,13 +330,6 @@ mod tests {
fn build_wrapper() -> LineWrapper {
let dispatcher = TestDispatcher::new(StdRng::seed_from_u64(0));
let cx = TestAppContext::new(dispatcher, None);
cx.text_system()
.add_fonts(vec![
std::fs::read("../../assets/fonts/plex-mono/ZedPlexMono-Regular.ttf")
.unwrap()
.into(),
])
.unwrap();
let id = cx.text_system().font_id(&font("Zed Plex Mono")).unwrap();
LineWrapper::new(id, px(16.), cx.text_system().platform_text_system.clone())
}
@ -734,16 +727,16 @@ mod tests {
lines[0].layout.wrap_boundaries(),
&[
WrapBoundary {
run_ix: 1,
glyph_ix: 3
run_ix: 0,
glyph_ix: 7
},
WrapBoundary {
run_ix: 2,
glyph_ix: 3
run_ix: 0,
glyph_ix: 12
},
WrapBoundary {
run_ix: 4,
glyph_ix: 2
run_ix: 0,
glyph_ix: 18
}
],
);