From 4a9317f3f47376ae0bd7d37851521c0e6ae56f5d Mon Sep 17 00:00:00 2001 From: YHH <359807859@qq.com> Date: Tue, 29 Jul 2025 10:39:48 +0800 Subject: [PATCH] =?UTF-8?q?querysystem=E8=BF=9B=E8=A1=8Cci=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E9=9A=94=E7=A6=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/ECS/Core/QuerySystem.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ECS/Core/QuerySystem.test.ts b/tests/ECS/Core/QuerySystem.test.ts index b7938ac3..7bdce8d6 100644 --- a/tests/ECS/Core/QuerySystem.test.ts +++ b/tests/ECS/Core/QuerySystem.test.ts @@ -405,6 +405,7 @@ describe('QuerySystem - 查询系统测试', () => { describe('查询统计和性能监控', () => { test('应该能够获取查询统计信息', () => { + querySystem.clearCache(); // 确保测试隔离 entities[0].addComponent(new PositionComponent(10, 20)); entities[1].addComponent(new VelocityComponent(1, 1)); @@ -460,6 +461,7 @@ describe('QuerySystem - 查询系统测试', () => { describe('内存管理和优化', () => { test('大量查询不应该导致内存泄漏', () => { + querySystem.clearCache(); // 确保测试隔离 const entityCount = 1000; const testEntities: Entity[] = [];