From 1f46639740cf661d79958103460d723347aa5e8a Mon Sep 17 00:00:00 2001 From: Filip Henningsson Date: Thu, 5 Dec 2024 14:25:25 +0100 Subject: [PATCH] Fix test namespaces --- Tests/Editor/EditorMetadataTests.cs | 2 +- Tests/Editor/SetupPlaymodeTestPlayer.cs | 6 +----- Tests/Editor/TerrainGetSetTests.cs | 2 +- Tests/Runtime/TerrainGetSetTests.cs | 3 ++- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Tests/Editor/EditorMetadataTests.cs b/Tests/Editor/EditorMetadataTests.cs index 6c1dd75e..61e31f57 100644 --- a/Tests/Editor/EditorMetadataTests.cs +++ b/Tests/Editor/EditorMetadataTests.cs @@ -8,7 +8,7 @@ using Assembly = System.Reflection.Assembly; -namespace AGXUnityTesting +namespace AGXUnityTesting.Editor { public class EditorMetadataTests { diff --git a/Tests/Editor/SetupPlaymodeTestPlayer.cs b/Tests/Editor/SetupPlaymodeTestPlayer.cs index cad00eb2..b4efd528 100644 --- a/Tests/Editor/SetupPlaymodeTestPlayer.cs +++ b/Tests/Editor/SetupPlaymodeTestPlayer.cs @@ -11,7 +11,6 @@ public class SetupPlaymodeTestPlayer : ITestPlayerBuildModifier, IPostBuildCleanup { const string CLI_ARG = "onlyBuildTestsTo"; - private static bool s_RunningPlayerTests; public BuildPlayerOptions ModifyOptions( BuildPlayerOptions playerOptions ) { @@ -24,8 +23,6 @@ public BuildPlayerOptions ModifyOptions( BuildPlayerOptions playerOptions ) if ( !string.IsNullOrEmpty( fileName ) ) buildLocation = Path.Combine( buildLocation, fileName ); playerOptions.locationPathName = buildLocation; - - s_RunningPlayerTests = true; } var scenes = playerOptions.scenes.Where( s => s.StartsWith("Assets/InitTestScene")); @@ -36,8 +33,7 @@ public BuildPlayerOptions ModifyOptions( BuildPlayerOptions playerOptions ) public void Cleanup() { - if ( Environment.CommandLine.HasArg( CLI_ARG ) ) { + if ( Environment.CommandLine.HasArg( CLI_ARG ) ) EditorApplication.Exit( 0 ); - } } } diff --git a/Tests/Editor/TerrainGetSetTests.cs b/Tests/Editor/TerrainGetSetTests.cs index 5b773c71..cb3b49e0 100644 --- a/Tests/Editor/TerrainGetSetTests.cs +++ b/Tests/Editor/TerrainGetSetTests.cs @@ -2,7 +2,7 @@ using NUnit.Framework; using UnityEngine; -namespace AGXUnityTesting +namespace AGXUnityTesting.Editor { public class TerrainGetSetTests { diff --git a/Tests/Runtime/TerrainGetSetTests.cs b/Tests/Runtime/TerrainGetSetTests.cs index b44ea4b5..9e9468e9 100644 --- a/Tests/Runtime/TerrainGetSetTests.cs +++ b/Tests/Runtime/TerrainGetSetTests.cs @@ -1,10 +1,11 @@ using AGXUnity.Model; + using NUnit.Framework; using System.Collections; using UnityEngine; using UnityEngine.TestTools; -namespace AGXUnityTesting +namespace AGXUnityTesting.Runtime { public class TerrainGetSetTests {