From 32e950be608eeecf8908b956c9dbae5b6bf2b0d3 Mon Sep 17 00:00:00 2001
From: Sasha Volokh <61521182+svolokh@users.noreply.github.com>
Date: Tue, 6 Aug 2024 09:39:55 -0700
Subject: [PATCH] [REG-1888] Move RGTestUtils into its own test assembly (#243)

---
 .../Tests/Runtime/RegressionGames.Tests.asmdef   |  1 +
 .../Editor/Scripts/RGEditorUtils.cs              |  3 ++-
 src/gg.regression.unity.bots/Tests.meta          |  3 +++
 .../Tests/TestFramework.meta                     |  3 +++
 .../Tests/TestFramework/Scripts.meta             |  3 +++
 .../TestFramework}/Scripts/RGTestUtils.cs        |  0
 .../TestFramework}/Scripts/RGTestUtils.cs.meta   |  0
 .../Scripts/RegressionGames.TestFramework.asmdef | 16 ++++++++++++++++
 .../RegressionGames.TestFramework.asmdef.meta    |  3 +++
 9 files changed, 31 insertions(+), 1 deletion(-)
 create mode 100644 src/gg.regression.unity.bots/Tests.meta
 create mode 100644 src/gg.regression.unity.bots/Tests/TestFramework.meta
 create mode 100644 src/gg.regression.unity.bots/Tests/TestFramework/Scripts.meta
 rename src/gg.regression.unity.bots/{Runtime => Tests/TestFramework}/Scripts/RGTestUtils.cs (100%)
 rename src/gg.regression.unity.bots/{Runtime => Tests/TestFramework}/Scripts/RGTestUtils.cs.meta (100%)
 create mode 100644 src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RegressionGames.TestFramework.asmdef
 create mode 100644 src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RegressionGames.TestFramework.asmdef.meta

diff --git a/src/RGUnityBots/Assets/Tests/Runtime/RegressionGames.Tests.asmdef b/src/RGUnityBots/Assets/Tests/Runtime/RegressionGames.Tests.asmdef
index a6d00879c..a03485a01 100644
--- a/src/RGUnityBots/Assets/Tests/Runtime/RegressionGames.Tests.asmdef
+++ b/src/RGUnityBots/Assets/Tests/Runtime/RegressionGames.Tests.asmdef
@@ -5,6 +5,7 @@
     ],
     "references": [
         "RegressionGames",
+        "RegressionGames.TestFramework",
         "Unity.InputSystem",
         "Unity.InputSystem.TestFramework"
     ],
diff --git a/src/gg.regression.unity.bots/Editor/Scripts/RGEditorUtils.cs b/src/gg.regression.unity.bots/Editor/Scripts/RGEditorUtils.cs
index 72331ab93..28a273c3d 100644
--- a/src/gg.regression.unity.bots/Editor/Scripts/RGEditorUtils.cs
+++ b/src/gg.regression.unity.bots/Editor/Scripts/RGEditorUtils.cs
@@ -1,9 +1,10 @@
 using System;
 using System.IO;
 using RegressionGames.StateRecorder;
-using UnityEditor.Compilation;
+
 #if UNITY_EDITOR
 using UnityEditor;
+using UnityEditor.Compilation;
 #endif
 
 namespace RegressionGames.Editor
diff --git a/src/gg.regression.unity.bots/Tests.meta b/src/gg.regression.unity.bots/Tests.meta
new file mode 100644
index 000000000..8600dbb55
--- /dev/null
+++ b/src/gg.regression.unity.bots/Tests.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 20478a3704dd4735b9e8eb9614f90e1c
+timeCreated: 1722892252
\ No newline at end of file
diff --git a/src/gg.regression.unity.bots/Tests/TestFramework.meta b/src/gg.regression.unity.bots/Tests/TestFramework.meta
new file mode 100644
index 000000000..476785902
--- /dev/null
+++ b/src/gg.regression.unity.bots/Tests/TestFramework.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: cefcafa9b21344a78fd42268825648a6
+timeCreated: 1722892287
\ No newline at end of file
diff --git a/src/gg.regression.unity.bots/Tests/TestFramework/Scripts.meta b/src/gg.regression.unity.bots/Tests/TestFramework/Scripts.meta
new file mode 100644
index 000000000..da6d675af
--- /dev/null
+++ b/src/gg.regression.unity.bots/Tests/TestFramework/Scripts.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: ab0055f282374bc3804917b8b2217b60
+timeCreated: 1722892379
\ No newline at end of file
diff --git a/src/gg.regression.unity.bots/Runtime/Scripts/RGTestUtils.cs b/src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RGTestUtils.cs
similarity index 100%
rename from src/gg.regression.unity.bots/Runtime/Scripts/RGTestUtils.cs
rename to src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RGTestUtils.cs
diff --git a/src/gg.regression.unity.bots/Runtime/Scripts/RGTestUtils.cs.meta b/src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RGTestUtils.cs.meta
similarity index 100%
rename from src/gg.regression.unity.bots/Runtime/Scripts/RGTestUtils.cs.meta
rename to src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RGTestUtils.cs.meta
diff --git a/src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RegressionGames.TestFramework.asmdef b/src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RegressionGames.TestFramework.asmdef
new file mode 100644
index 000000000..9485178c5
--- /dev/null
+++ b/src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RegressionGames.TestFramework.asmdef
@@ -0,0 +1,16 @@
+{
+  "name": "RegressionGames.TestFramework",
+  "references": [
+    "RegressionGames",
+    "UnityEngine.TestRunner",
+    "UnityEditor.TestRunner"
+  ],
+  "includePlatforms": [],
+  "excludePlatforms": [],
+  "allowUnsafeCode": true,
+  "overrideReferences": true,
+  "precompiledReferences": [
+    "nunit.framework.dll"
+  ],
+  "autoReferenced": false
+}
diff --git a/src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RegressionGames.TestFramework.asmdef.meta b/src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RegressionGames.TestFramework.asmdef.meta
new file mode 100644
index 000000000..0941b8fdb
--- /dev/null
+++ b/src/gg.regression.unity.bots/Tests/TestFramework/Scripts/RegressionGames.TestFramework.asmdef.meta
@@ -0,0 +1,3 @@
+fileFormatVersion: 2
+guid: 47cc6bdf97c642e3bbe01be7fef2caf2
+timeCreated: 1722892302
\ No newline at end of file