fix(tests): correctly deinit font faces

This commit is contained in:
Qwerasd
2025-05-01 18:37:24 -06:00
parent cfedd477b2
commit 5319d38366
2 changed files with 16 additions and 11 deletions

View File

@@ -425,7 +425,8 @@ test "fontconfig" {
try testing.expect(n.len > 0);
// Load it and verify it works
const face = try def.load(lib, .{ .size = .{ .points = 12 } });
var face = try def.load(lib, .{ .size = .{ .points = 12 } });
defer face.deinit();
try testing.expect(face.glyphIndex(' ') != null);
}
@@ -456,6 +457,7 @@ test "coretext" {
try testing.expect(n.len > 0);
// Load it and verify it works
const face = try def.load(lib, .{ .size = .{ .points = 12 } });
var face = try def.load(lib, .{ .size = .{ .points = 12 } });
defer face.deinit();
try testing.expect(face.glyphIndex(' ') != null);
}