修复 GameFlow 清理异常测试日志断言
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using FlowScope.Config;
|
||||
@@ -7,6 +8,8 @@ using FlowScope.Flow;
|
||||
using FlowScope.Resources;
|
||||
using FlowScope.Save;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using ContainerType = FlowScope.Container.Container;
|
||||
|
||||
namespace FlowScope.Tests.EditMode.Flow
|
||||
@@ -110,6 +113,8 @@ namespace FlowScope.Tests.EditMode.Flow
|
||||
var flow = new GameFlow();
|
||||
flow.StartupAsync<ThrowingExitAndDisposeFeature>(root, CancellationToken.None).GetAwaiter().GetResult();
|
||||
|
||||
LogAssert.Expect(LogType.Error, new Regex("System\\.InvalidOperationException: exit failed"));
|
||||
LogAssert.Expect(LogType.Error, new Regex("System\\.InvalidOperationException: dispose failed"));
|
||||
flow.ShutdownAsync(CancellationToken.None).GetAwaiter().GetResult();
|
||||
|
||||
Assert.That(flow.State, Is.EqualTo(GameFlowState.Disposed));
|
||||
|
||||
Reference in New Issue
Block a user