Tests: engine tests that add fonts to the shared font database take one lock

This commit is contained in:
bflatastic
2026-10-24 05:52:15 +07:00
parent 23d8820898
commit b2835c4f2b
5 changed files with 23 additions and 0 deletions
+2
View File
@@ -911,6 +911,7 @@ mod tests {
/// resets the type that uses it.
#[test]
fn variable_font_settings_are_captured_explicitly() {
let _fonts = crate::adding_fonts();
use vectorcraft_text::test_fonts::{TWO_AXIS_FAMILY, two_axis_font};
vectorcraft_text::FontDb::global().add_font(two_axis_font().unwrap());
let (mut s, source) = session_with_text("Source");
@@ -934,6 +935,7 @@ mod tests {
/// version and Variable Font settings, unless the style sets them.
#[test]
fn another_font_from_a_style_clears_the_old_fonts_version_and_settings() {
let _fonts = crate::adding_fonts();
use vectorcraft_text::test_fonts::{TWO_AXIS_FAMILY, two_axis_font};
vectorcraft_text::FontDb::global().add_font(two_axis_font().unwrap());
let (mut s, id) = session_with_text("Source");
+1
View File
@@ -1867,6 +1867,7 @@ mod area_tests {
/// when set, each value clamped to its axis's range, and cleared by another font or style.
#[test]
fn variable_font_settings_are_a_character_attribute_saved_only_when_set() {
let _fonts = crate::adding_fonts();
use vectorcraft_text::test_fonts::{TWO_AXIS_FAMILY as FAMILY, two_axis_font};
vectorcraft_text::FontDb::global().add_font(two_axis_font().unwrap());
let mut s = Session::new();