refactor(tests): 更新测试代码中的命名空间引用

- 将 RichTextEffectsControllerTests 中的 GFramework.Godot.Text 引用替换为 Godot 相关命名空间
- 使用 Godot.Collections.Array 替代系统数组类型
- 在 GlobalUsings 中添加 GFramework.Godot.Text 的全局引用
- 修复返回类型以使用新的 Array<RichTextEffect> 结构
This commit is contained in:
GeWuYou 2026-04-18 14:59:21 +08:00
parent 1c2a813a52
commit f3d50c6361
2 changed files with 4 additions and 2 deletions

View File

@ -22,3 +22,4 @@ global using System.Globalization;
global using System.IO; global using System.IO;
global using System.Text; global using System.Text;
global using System.Text.Json; global using System.Text.Json;
global using GFramework.Godot.Text;

View File

@ -1,4 +1,5 @@
using GFramework.Godot.Text; using Godot;
using Godot.Collections;
using Array = Godot.Collections.Array; using Array = Godot.Collections.Array;
namespace GFramework.Godot.Tests.Text; namespace GFramework.Godot.Tests.Text;
@ -115,7 +116,7 @@ public sealed class RichTextEffectsControllerTests
{ {
CapturedProfiles.Add(profile); CapturedProfiles.Add(profile);
CapturedAnimatedEffectsEnabled.Add(animatedEffectsEnabled); CapturedAnimatedEffectsEnabled.Add(animatedEffectsEnabled);
return Array.Empty<RichTextEffect>(); return new Array<RichTextEffect>();
} }
public RichTextEffect? CreateEffect(string key, bool animatedEffectsEnabled) public RichTextEffect? CreateEffect(string key, bool animatedEffectsEnabled)