Skip to content

Commit

Permalink
Refactor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nowsprinting committed Nov 1, 2023
1 parent 1730efb commit 3799762
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Tests/Runtime/Attributes/FocusGameViewAttributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ namespace TestHelper.Attributes
public class FocusGameViewAttributeTest
{
[Test]
[FocusGameView]
[IgnoreBatchMode("Open GameView in batchmode but can not get window.")]
[FocusGameView]
public void Attach_GameViewHasFocus()
{
const string GameView = "UnityEditor.GameView";
Expand All @@ -31,8 +31,8 @@ public void Attach_GameViewHasFocus()
}

[Test]
[FocusGameView]
[IgnoreWindowMode("For batchmode test.")]
[FocusGameView]
public void Attach_KeepBatchmode()
{
Assert.That(Application.isBatchMode, Is.True);
Expand Down
7 changes: 5 additions & 2 deletions Tests/Runtime/Attributes/GizmosShowOnGameViewAttributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace TestHelper.Attributes
{
[TestFixture]
[UnityPlatform(RuntimePlatform.OSXEditor, RuntimePlatform.WindowsEditor, RuntimePlatform.LinuxEditor)]
public class GizmosShowOnGameViewAttributeTest
{
private class GizmoDemo : MonoBehaviour
Expand Down Expand Up @@ -54,18 +55,20 @@ public void Attach_False_HideGizmos()

[Test]
[CreateScene(camera: true, light: true)]
[GizmosShowOnGameView()]
[GizmosShowOnGameView]
public async Task AttachToAsyncTest_ShowGizmos()
{
await Task.Yield();
// verify screenshot.
}

[UnityTest]
[CreateScene(camera: true, light: true)]
[GizmosShowOnGameView()]
[GizmosShowOnGameView]
public IEnumerator AttachToUnityTest_ShowGizmos()
{
yield return null;
// verify screenshot.
}
}
}

0 comments on commit 3799762

Please sign in to comment.