From f7117254f82a2965c265416060d3dc0d96b030e4 Mon Sep 17 00:00:00 2001
From: GeWuYou <95328647+GeWuYou@users.noreply.github.com>
Date: Fri, 17 Apr 2026 23:16:04 +0800
Subject: [PATCH] =?UTF-8?q?fix(tests):=20=E4=BF=AE=E5=A4=8DUI=E8=B7=AF?=
=?UTF-8?q?=E7=94=B1=E4=BA=A4=E4=BA=92=E6=B5=8B=E8=AF=95=E4=B8=AD=E7=9A=84?=
=?UTF-8?q?=E6=96=87=E6=A1=A3=E6=B3=A8=E9=87=8A=E5=92=8C=E4=BB=A3=E7=A0=81?=
=?UTF-8?q?=E5=9D=97=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 为PopAsync测试方法添加了缺失的返回值XML文档注释
- 在Godot页面行为恢复逻辑中添加了正确的代码块括号
- 确保当ResumeFromShow为true时OnResume方法调用的条件判断正确
---
GFramework.Game.Tests/UI/UiRouterInteractionTests.cs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/GFramework.Game.Tests/UI/UiRouterInteractionTests.cs b/GFramework.Game.Tests/UI/UiRouterInteractionTests.cs
index dbed8ac1..0920631d 100644
--- a/GFramework.Game.Tests/UI/UiRouterInteractionTests.cs
+++ b/GFramework.Game.Tests/UI/UiRouterInteractionTests.cs
@@ -133,6 +133,7 @@ public class UiRouterInteractionTests
///
/// 验证弹出栈顶页面后,恢复下层页面时不会重复触发恢复逻辑。
///
+ /// 表示异步测试执行过程的任务。
[Test]
public async Task PopAsync_WhenPageResumesDuringShow_DoesNotCallResumeTwice()
{
@@ -343,7 +344,9 @@ public class UiRouterInteractionTests
// The Godot page behavior resumes from OnShow(), so the router must not call OnResume() again on top.
if (ResumeFromShow)
+ {
OnResume();
+ }
}
///