mirror of
https://github.com/GeWuYou/GFramework.git
synced 2026-05-07 17:21:16 +08:00
- 新增 GfRichTextLabel 组件作为富文本标签宿主 - 实现 IRichTextEffectHost 接口用于效果控制器驱动 - 创建 RichTextEffectsController 处理效果装配逻辑 - 添加 RichTextProfile 配置资源类型 - 引入 RichTextEffectPlan 和 RichTextEffectPlanEntry 类型 - 在 CI 工作流中添加 GFramework.Godot.Tests 项目 - 优化 Godot 测试诊断条件判断逻辑 - 添加富文本效果控制器相关单元测试
30 lines
759 B
C#
30 lines
759 B
C#
namespace GFramework.Godot.Tests.Text;
|
|
|
|
/// <summary>
|
|
/// <see cref="RichTextEffectPlan" /> 的纯托管测试。
|
|
/// </summary>
|
|
[TestFixture]
|
|
public sealed class RichTextEffectPlanTests
|
|
{
|
|
/// <summary>
|
|
/// 验证默认内置计划会暴露完整的第一阶段效果键集合。
|
|
/// </summary>
|
|
[Test]
|
|
public void CreateBuiltInDefault_Should_Contain_The_First_Phase_Effect_Keys()
|
|
{
|
|
var plan = RichTextEffectPlan.CreateBuiltInDefault();
|
|
|
|
Assert.That(plan.Effects.Select(static entry => entry.Key), Is.EqualTo(new[]
|
|
{
|
|
"green",
|
|
"red",
|
|
"gold",
|
|
"blue",
|
|
"fade_in",
|
|
"sine",
|
|
"jitter",
|
|
"fly_in"
|
|
}));
|
|
}
|
|
}
|