windows: Fix tests on Windows (#22616)

Release Notes:

- N/A

---------

Co-authored-by: Mikayla <mikayla.c.maki@gmail.com>
This commit is contained in:
张小白 2025-02-05 22:30:09 +08:00 committed by GitHub
parent c252b5db16
commit 74c4dbd237
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
56 changed files with 1540 additions and 856 deletions

View file

@ -1433,7 +1433,10 @@ impl ToDisplayPoint for Anchor {
#[cfg(test)]
pub mod tests {
use super::*;
use crate::{movement, test::marked_display_snapshot};
use crate::{
movement,
test::{marked_display_snapshot, test_font},
};
use block_map::BlockPlacement;
use gpui::{
div, font, observe, px, App, AppContext as _, BorrowAppContext, Element, Hsla, Rgba,
@ -1492,10 +1495,11 @@ pub mod tests {
}
});
let font = test_font();
let map = cx.new(|cx| {
DisplayMap::new(
buffer.clone(),
font("Helvetica"),
font,
font_size,
wrap_width,
true,