From f3d50c63613715f2fed739fc49aef50980cae9fc Mon Sep 17 00:00:00 2001 From: GeWuYou <95328647+GeWuYou@users.noreply.github.com> Date: Sat, 18 Apr 2026 14:59:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor(tests):=20=E6=9B=B4=E6=96=B0=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E4=BB=A3=E7=A0=81=E4=B8=AD=E7=9A=84=E5=91=BD=E5=90=8D?= =?UTF-8?q?=E7=A9=BA=E9=97=B4=E5=BC=95=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 RichTextEffectsControllerTests 中的 GFramework.Godot.Text 引用替换为 Godot 相关命名空间 - 使用 Godot.Collections.Array 替代系统数组类型 - 在 GlobalUsings 中添加 GFramework.Godot.Text 的全局引用 - 修复返回类型以使用新的 Array 结构 --- GFramework.Godot.Tests/GlobalUsings.cs | 1 + .../Text/RichTextEffectsControllerTests.cs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/GFramework.Godot.Tests/GlobalUsings.cs b/GFramework.Godot.Tests/GlobalUsings.cs index 70989071..622488b8 100644 --- a/GFramework.Godot.Tests/GlobalUsings.cs +++ b/GFramework.Godot.Tests/GlobalUsings.cs @@ -22,3 +22,4 @@ global using System.Globalization; global using System.IO; global using System.Text; global using System.Text.Json; +global using GFramework.Godot.Text; diff --git a/GFramework.Godot.Tests/Text/RichTextEffectsControllerTests.cs b/GFramework.Godot.Tests/Text/RichTextEffectsControllerTests.cs index c028e178..0280d8c9 100644 --- a/GFramework.Godot.Tests/Text/RichTextEffectsControllerTests.cs +++ b/GFramework.Godot.Tests/Text/RichTextEffectsControllerTests.cs @@ -1,4 +1,5 @@ -using GFramework.Godot.Text; +using Godot; +using Godot.Collections; using Array = Godot.Collections.Array; namespace GFramework.Godot.Tests.Text; @@ -115,7 +116,7 @@ public sealed class RichTextEffectsControllerTests { CapturedProfiles.Add(profile); CapturedAnimatedEffectsEnabled.Add(animatedEffectsEnabled); - return Array.Empty(); + return new Array(); } public RichTextEffect? CreateEffect(string key, bool animatedEffectsEnabled)