From 7c1e566113d59699af1624186c64eca67f063fc6 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Mon, 20 Apr 2020 19:09:33 -0400 Subject: Upgraded Unity --- .../Api/CallbacksDelegator.cs | 136 -------------------- .../Api/CallbacksDelegator.cs.meta | 11 -- .../Api/CallbacksDelegatorListener.cs | 28 ---- .../Api/CallbacksDelegatorListener.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/CallbacksHolder.cs | 69 ---------- .../Api/CallbacksHolder.cs.meta | 11 -- .../Api/ExecutionSettings.cs | 57 --------- .../Api/ExecutionSettings.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/Filter.cs | 81 ------------ .../UnityEditor.TestRunner/Api/Filter.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/ICallbacks.cs | 10 -- .../UnityEditor.TestRunner/Api/ICallbacks.cs.meta | 11 -- .../Api/ICallbacksDelegator.cs | 18 --- .../Api/ICallbacksDelegator.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/ICallbacksHolder.cs | 10 -- .../Api/ICallbacksHolder.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/IErrorCallbacks.cs | 7 - .../Api/IErrorCallbacks.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/ITestAdaptor.cs | 31 ----- .../Api/ITestAdaptor.cs.meta | 11 -- .../Api/ITestAdaptorFactory.cs | 18 --- .../Api/ITestAdaptorFactory.cs.meta | 11 -- .../Api/ITestResultAdaptor.cs | 86 ------------- .../Api/ITestResultAdaptor.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/ITestRunSettings.cs | 9 -- .../Api/ITestRunSettings.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/ITestRunnerApi.cs | 12 -- .../Api/ITestRunnerApi.cs.meta | 11 -- .../Api/ITestTreeRebuildCallbacks.cs | 7 - .../Api/ITestTreeRebuildCallbacks.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/RunState.cs | 11 -- .../UnityEditor.TestRunner/Api/RunState.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/TestAdaptor.cs | 142 --------------------- .../UnityEditor.TestRunner/Api/TestAdaptor.cs.meta | 11 -- .../Api/TestAdaptorFactory.cs | 91 ------------- .../Api/TestAdaptorFactory.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/TestMode.cs | 11 -- .../UnityEditor.TestRunner/Api/TestMode.cs.meta | 11 -- .../Api/TestResultAdaptor.cs | 87 ------------- .../Api/TestResultAdaptor.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/TestRunnerApi.cs | 120 ----------------- .../Api/TestRunnerApi.cs.meta | 11 -- .../UnityEditor.TestRunner/Api/TestStatus.cs | 10 -- .../UnityEditor.TestRunner/Api/TestStatus.cs.meta | 11 -- 44 files changed, 1293 deletions(-) delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegator.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegator.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksHolder.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksHolder.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ExecutionSettings.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ExecutionSettings.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/Filter.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/Filter.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacks.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacks.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksHolder.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksHolder.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/IErrorCallbacks.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/IErrorCallbacks.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptor.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptor.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunSettings.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunSettings.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunnerApi.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunnerApi.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/RunState.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/RunState.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptor.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptor.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestMode.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestMode.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestResultAdaptor.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestResultAdaptor.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestRunnerApi.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestRunnerApi.cs.meta delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestStatus.cs delete mode 100644 Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestStatus.cs.meta (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api') diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegator.cs deleted file mode 100644 index 9418464..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegator.cs +++ /dev/null @@ -1,136 +0,0 @@ -using System; -using System.Linq; -using System.Text; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class CallbacksDelegator : ICallbacksDelegator - { - private static CallbacksDelegator s_instance; - public static CallbacksDelegator instance - { - get - { - if (s_instance == null) - { - s_instance = new CallbacksDelegator(CallbacksHolder.instance.GetAll, new TestAdaptorFactory()); - } - return s_instance; - } - } - - private readonly Func m_CallbacksProvider; - private readonly ITestAdaptorFactory m_AdaptorFactory; - - public CallbacksDelegator(Func callbacksProvider, ITestAdaptorFactory adaptorFactory) - { - m_CallbacksProvider = callbacksProvider; - m_AdaptorFactory = adaptorFactory; - } - - public void RunStarted(ITest testsToRun) - { - m_AdaptorFactory.ClearResultsCache(); - var testRunnerTestsToRun = m_AdaptorFactory.Create(testsToRun); - TryInvokeAllCallbacks(callbacks => callbacks.RunStarted(testRunnerTestsToRun)); - } - - public void RunStartedRemotely(byte[] testsToRunData) - { - var testData = Deserialize(testsToRunData); - var testsToRun = m_AdaptorFactory.BuildTree(testData); - TryInvokeAllCallbacks(callbacks => callbacks.RunStarted(testsToRun)); - } - - public void RunFinished(ITestResult testResults) - { - var testResult = m_AdaptorFactory.Create(testResults); - TryInvokeAllCallbacks(callbacks => callbacks.RunFinished(testResult)); - } - - public void RunFinishedRemotely(byte[] testResultsData) - { - var remoteTestResult = Deserialize(testResultsData); - var testResult = m_AdaptorFactory.Create(remoteTestResult.results.First(), remoteTestResult); - TryInvokeAllCallbacks(callbacks => callbacks.RunFinished(testResult)); - } - - public void RunFailed(string failureMessage) - { - Debug.LogError(failureMessage); - TryInvokeAllCallbacks(callbacks => - { - var errorCallback = callbacks as IErrorCallbacks; - if (errorCallback != null) - { - errorCallback.OnError(failureMessage); - } - }); - } - - public void TestStarted(ITest test) - { - var testRunnerTest = m_AdaptorFactory.Create(test); - TryInvokeAllCallbacks(callbacks => callbacks.TestStarted(testRunnerTest)); - } - - public void TestStartedRemotely(byte[] testStartedData) - { - var testData = Deserialize(testStartedData); - var testsToRun = m_AdaptorFactory.BuildTree(testData); - - TryInvokeAllCallbacks(callbacks => callbacks.TestStarted(testsToRun)); - } - - public void TestFinished(ITestResult result) - { - var testResult = m_AdaptorFactory.Create(result); - TryInvokeAllCallbacks(callbacks => callbacks.TestFinished(testResult)); - } - - public void TestFinishedRemotely(byte[] testResultsData) - { - var remoteTestResult = Deserialize(testResultsData); - var testResult = m_AdaptorFactory.Create(remoteTestResult.results.First(), remoteTestResult); - TryInvokeAllCallbacks(callbacks => callbacks.TestFinished(testResult)); - } - - public void TestTreeRebuild(ITest test) - { - m_AdaptorFactory.ClearTestsCache(); - var testAdaptor = m_AdaptorFactory.Create(test); - TryInvokeAllCallbacks(callbacks => - { - var rebuildCallbacks = callbacks as ITestTreeRebuildCallbacks; - if (rebuildCallbacks != null) - { - rebuildCallbacks.TestTreeRebuild(testAdaptor); - } - }); - } - - private void TryInvokeAllCallbacks(Action callbackAction) - { - foreach (var testRunnerApiCallback in m_CallbacksProvider()) - { - try - { - callbackAction(testRunnerApiCallback); - } - catch (Exception ex) - { - Debug.LogException(ex); - } - } - } - - private static T Deserialize(byte[] data) - { - return JsonUtility.FromJson(Encoding.UTF8.GetString(data)); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegator.cs.meta deleted file mode 100644 index 5225c54..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 0de03ebd74e2b474fa23d05ab42d0cd8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs deleted file mode 100644 index b3cb5b8..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs +++ /dev/null @@ -1,28 +0,0 @@ -using UnityEngine; -using UnityEngine.TestTools.TestRunner; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class CallbacksDelegatorListener : ScriptableObject, ITestRunnerListener - { - public void RunStarted(NUnit.Framework.Interfaces.ITest testsToRun) - { - CallbacksDelegator.instance.RunStarted(testsToRun); - } - - public void RunFinished(NUnit.Framework.Interfaces.ITestResult testResults) - { - CallbacksDelegator.instance.RunFinished(testResults); - } - - public void TestStarted(NUnit.Framework.Interfaces.ITest test) - { - CallbacksDelegator.instance.TestStarted(test); - } - - public void TestFinished(NUnit.Framework.Interfaces.ITestResult result) - { - CallbacksDelegator.instance.TestFinished(result); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs.meta deleted file mode 100644 index 7bed372..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksDelegatorListener.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f3e1b3cbf3fac6a459b1a602167ad311 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksHolder.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksHolder.cs deleted file mode 100644 index 91acb8c..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksHolder.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class CallbacksHolder : ScriptableSingleton, ICallbacksHolder - { - private List m_Callbacks = new List(); - public void Add(ICallbacks callback, int priority) - { - m_Callbacks.Add(new CallbackWithPriority(callback, priority)); - } - - public void Remove(ICallbacks callback) - { - m_Callbacks.RemoveAll(callbackWithPriority => callbackWithPriority.Callback == callback); - } - - public ICallbacks[] GetAll() - { - return m_Callbacks.OrderByDescending(callback => callback.Priority).Select(callback => callback.Callback).ToArray(); - } - - public void Clear() - { - m_Callbacks.Clear(); - } - - private struct CallbackWithPriority - { - public ICallbacks Callback; - public int Priority; - public CallbackWithPriority(ICallbacks callback, int priority) - { - Callback = callback; - Priority = priority; - } - } - - // Sometimes - such as when we want to test the test framework itself - it's necessary to launch a test run from - // inside a test. Because callbacks are registered globally, this can cause a lot of confusion (e.g. the in-test - // run will emit UTP messages, utterly confusing UTR). In such circumstances the safest thing to do is to - // temporarily suppress all registered callbacks for the duration of the in-test run. This method can be called - // to set up a using() block which will suppress the callbacks for the scope. - public IDisposable TemporarilySuppressCallbacks() - { - return new Suppressor(this); - } - - private sealed class Suppressor : IDisposable - { - private readonly CallbacksHolder _instance; - private readonly List _suppressed; - - public Suppressor(CallbacksHolder instance) - { - _instance = instance; - _suppressed = new List(instance.m_Callbacks); - instance.m_Callbacks.Clear(); - } - - public void Dispose() - { - _instance.m_Callbacks.AddRange(_suppressed); - } - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksHolder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksHolder.cs.meta deleted file mode 100644 index 1896ba8..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/CallbacksHolder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4884ccc3528cb2e40a0e6f0a19a2b35b -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ExecutionSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ExecutionSettings.cs deleted file mode 100644 index 2dd115a..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ExecutionSettings.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal.Filters; -using UnityEngine; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - [Serializable] - public class ExecutionSettings - { - public ExecutionSettings(params Filter[] filtersToExecute) - { - filters = filtersToExecute; - } - - [SerializeField] - internal BuildTarget? targetPlatform; - - // Note: Is not available after serialization - public ITestRunSettings overloadTestRunSettings; - - [SerializeField] - internal Filter filter; - [SerializeField] - public Filter[] filters; - [SerializeField] - public bool runSynchronously; - [SerializeField] - public int playerHeartbeatTimeout = 60*10; - - internal bool EditModeIncluded() - { - return filters.Any(f => IncludesTestMode(f.testMode, TestMode.EditMode)); - } - - internal bool PlayModeInEditorIncluded() - { - return filters.Any(f => IncludesTestMode(f.testMode, TestMode.PlayMode) && targetPlatform == null); - } - - internal bool PlayerIncluded() - { - return filters.Any(f => IncludesTestMode(f.testMode, TestMode.PlayMode) && targetPlatform != null); - } - - private static bool IncludesTestMode(TestMode testMode, TestMode modeToCheckFor) - { - return (testMode & modeToCheckFor) == modeToCheckFor; - } - - internal ITestFilter BuildNUnitFilter() - { - return new OrFilter(filters.Select(f => f.BuildNUnitFilter(runSynchronously)).ToArray()); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ExecutionSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ExecutionSettings.cs.meta deleted file mode 100644 index 7036257..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ExecutionSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: eea34a28297f9bc4c9f4c573bc8d5d1c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/Filter.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/Filter.cs deleted file mode 100644 index bc10b01..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/Filter.cs +++ /dev/null @@ -1,81 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using NUnit.Framework.Internal.Filters; -using UnityEngine; -using UnityEngine.TestRunner.NUnitExtensions.Filters; -using UnityEngine.TestTools.TestRunner.GUI; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - [Serializable] - public class Filter - { - [SerializeField] - public TestMode testMode; - [SerializeField] - public string[] testNames; - [SerializeField] - public string[] groupNames; - [SerializeField] - public string[] categoryNames; - [SerializeField] - public string[] assemblyNames; - [SerializeField] - public BuildTarget? targetPlatform; - - internal TestRunnerFilter ToTestRunnerFilter() - { - return new TestRunnerFilter() - { - testNames = testNames, - categoryNames = categoryNames, - groupNames = groupNames, - assemblyNames = assemblyNames - }; - } - - internal ITestFilter BuildNUnitFilter(bool synchronousOnly) - { - var filters = new List(); - - if (testNames != null && testNames.Length != 0) - { - var nameFilter = new OrFilter(testNames.Select(n => new FullNameFilter(n)).ToArray()); - filters.Add(nameFilter); - } - - if (groupNames != null && groupNames.Length != 0) - { - var exactNamesFilter = new OrFilter(groupNames.Select(n => - { - var f = new FullNameFilter(n); - f.IsRegex = true; - return f; - }).ToArray()); - filters.Add(exactNamesFilter); - } - - if (assemblyNames != null && assemblyNames.Length != 0) - { - var assemblyFilter = new OrFilter(assemblyNames.Select(c => new AssemblyNameFilter(c)).ToArray()); - filters.Add(assemblyFilter); - } - - if (categoryNames != null && categoryNames.Length != 0) - { - var categoryFilter = new OrFilter(categoryNames.Select(c => new CategoryFilterExtended(c) {IsRegex = true}).ToArray()); - filters.Add(categoryFilter); - } - - if (synchronousOnly) - { - filters.Add(new SynchronousFilter()); - } - - return filters.Count == 0 ? TestFilter.Empty : new AndFilter(filters.ToArray()); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/Filter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/Filter.cs.meta deleted file mode 100644 index cec8610..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/Filter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 05f92e4a2414cb144a92157752dfa324 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacks.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacks.cs deleted file mode 100644 index 269dbbf..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacks.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface ICallbacks - { - void RunStarted(ITestAdaptor testsToRun); - void RunFinished(ITestResultAdaptor result); - void TestStarted(ITestAdaptor test); - void TestFinished(ITestResultAdaptor result); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacks.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacks.cs.meta deleted file mode 100644 index ab0ac56..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 93eea84e53d0226479c9a584f19427b5 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs deleted file mode 100644 index 5622c82..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs +++ /dev/null @@ -1,18 +0,0 @@ -using NUnit.Framework.Interfaces; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ICallbacksDelegator - { - void RunStarted(ITest testsToRun); - void RunStartedRemotely(byte[] testsToRunData); - void RunFinished(ITestResult testResults); - void RunFinishedRemotely(byte[] testResultsData); - void RunFailed(string failureMessage); - void TestStarted(ITest test); - void TestStartedRemotely(byte[] testStartedData); - void TestFinished(ITestResult result); - void TestFinishedRemotely(byte[] testResultsData); - void TestTreeRebuild(ITest test); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs.meta deleted file mode 100644 index fd5aae8..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksDelegator.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8f8f74fe8e363da42875d9cab025d3b2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksHolder.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksHolder.cs deleted file mode 100644 index 5d3a652..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksHolder.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ICallbacksHolder - { - void Add(ICallbacks callback, int priority); - void Remove(ICallbacks callback); - ICallbacks[] GetAll(); - void Clear(); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksHolder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksHolder.cs.meta deleted file mode 100644 index dd53319..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ICallbacksHolder.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d742f2caefd9f934d9f19dad07a08e6f -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/IErrorCallbacks.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/IErrorCallbacks.cs deleted file mode 100644 index 4599e16..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/IErrorCallbacks.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface IErrorCallbacks : ICallbacks - { - void OnError(string message); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/IErrorCallbacks.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/IErrorCallbacks.cs.meta deleted file mode 100644 index 082ebbd..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/IErrorCallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1a06c562b0c5eb046bcb876a29f93c98 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptor.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptor.cs deleted file mode 100644 index 4fa05fd..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptor.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface ITestAdaptor - { - string Id { get; } - string Name { get; } - string FullName { get; } - int TestCaseCount { get; } - bool HasChildren { get; } - bool IsSuite { get; } - IEnumerable Children { get; } - ITestAdaptor Parent { get; } - int TestCaseTimeout { get; } - ITypeInfo TypeInfo { get; } - IMethodInfo Method { get; } - string[] Categories { get; } - bool IsTestAssembly { get; } - RunState RunState { get; } - string Description { get; } - string SkipReason { get; } - string ParentId { get; } - string ParentFullName { get; } - string UniqueName { get; } - string ParentUniqueName { get; } - int ChildIndex { get; } - TestMode TestMode { get; } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptor.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptor.cs.meta deleted file mode 100644 index a372e43..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 85dd7af03f02aea4aae13a3945e3b313 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs deleted file mode 100644 index 578c053..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections.Generic; -using NUnit.Framework.Interfaces; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ITestAdaptorFactory - { - ITestAdaptor Create(ITest test); - ITestAdaptor Create(RemoteTestData testData); - ITestResultAdaptor Create(ITestResult testResult); - ITestResultAdaptor Create(RemoteTestResultData testResult, RemoteTestResultDataWithTestData allData); - ITestAdaptor BuildTree(RemoteTestResultDataWithTestData data); - IEnumerator BuildTreeAsync(RemoteTestResultDataWithTestData data); - void ClearResultsCache(); - void ClearTestsCache(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs.meta deleted file mode 100644 index b75d48c..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestAdaptorFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 803abab0f7e17044db56f8760186dbd1 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs deleted file mode 100644 index f2249f2..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs +++ /dev/null @@ -1,86 +0,0 @@ -using System; -using System.Collections.Generic; -using NUnit.Framework.Interfaces; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface ITestResultAdaptor - { - ITestAdaptor Test { get; } - string Name { get; } - - /// Gets the full name of the test result - string FullName { get; } - - string ResultState { get; } - - TestStatus TestStatus { get; } - - /// Gets the elapsed time for running the test in seconds - double Duration { get; } - - /// Gets or sets the time the test started running. - DateTime StartTime { get; } - - /// Gets or sets the time the test finished running. - DateTime EndTime { get; } - - /// - /// Gets the message associated with a test - /// failure or with not running the test - /// - string Message { get; } - - /// - /// Gets any stacktrace associated with an - /// error or failure. Not available in - /// the Compact Framework 1.0. - /// - string StackTrace { get; } - - /// - /// Gets the number of asserts executed - /// when running the test and all its children. - /// - int AssertCount { get; } - - /// - /// Gets the number of test cases that failed - /// when running the test and all its children. - /// - int FailCount { get; } - - /// - /// Gets the number of test cases that passed - /// when running the test and all its children. - /// - int PassCount { get; } - - /// - /// Gets the number of test cases that were skipped - /// when running the test and all its children. - /// - int SkipCount { get; } - - /// - /// Gets the number of test cases that were inconclusive - /// when running the test and all its children. - /// - int InconclusiveCount { get; } - - /// - /// Indicates whether this result has any child results. - /// Accessing HasChildren should not force creation of the - /// Children collection in classes implementing this interface. - /// - bool HasChildren { get; } - - /// Gets the the collection of child results. - IEnumerable Children { get; } - - /// Gets any text output written to this result. - string Output { get; } - - TNode ToXml(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs.meta deleted file mode 100644 index 991d6f6..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestResultAdaptor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4f90cfe4bf5cfb44f84a5b11387f2a42 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunSettings.cs deleted file mode 100644 index ea30021..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunSettings.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - public interface ITestRunSettings : IDisposable - { - void Apply(); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunSettings.cs.meta deleted file mode 100644 index 0151bee..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunSettings.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 2ae2ce6274819484fa8747a28cebdf3a -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunnerApi.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunnerApi.cs deleted file mode 100644 index 3a2388d..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunnerApi.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ITestRunnerApi - { - string Execute(ExecutionSettings executionSettings); - void RegisterCallbacks(T testCallbacks, int priority = 0) where T : ICallbacks; - void UnregisterCallbacks(T testCallbacks) where T : ICallbacks; - void RetrieveTestList(TestMode testMode, Action callback); - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunnerApi.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunnerApi.cs.meta deleted file mode 100644 index 7679b0a..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestRunnerApi.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: a7842a837a4b13e41ae16193db753418 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs deleted file mode 100644 index e71d026..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal interface ITestTreeRebuildCallbacks : ICallbacks - { - void TestTreeRebuild(ITestAdaptor test); - } -} \ No newline at end of file diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs.meta deleted file mode 100644 index 1e6ead2..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/ITestTreeRebuildCallbacks.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 4230e406313f1db43a4b548e7a3ad2e2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/RunState.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/RunState.cs deleted file mode 100644 index 937e39e..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/RunState.cs +++ /dev/null @@ -1,11 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - public enum RunState - { - NotRunnable, - Runnable, - Explicit, - Skipped, - Ignored, - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/RunState.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/RunState.cs.meta deleted file mode 100644 index 031239f..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/RunState.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 8bb59cb2f66d156418ca1bd1e2703233 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptor.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptor.cs deleted file mode 100644 index 89274dc..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptor.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework; -using NUnit.Framework.Interfaces; -using NUnit.Framework.Internal; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestRunner.NUnitExtensions.Runner; -using UnityEngine.TestRunner.TestLaunchers; -using UnityEngine.TestTools.Utils; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class TestAdaptor : ITestAdaptor - { - internal TestAdaptor(ITest test, ITestAdaptor[] children = null) - { - Id = test.Id; - Name = test.Name; - var childIndex = -1; - if (test.Properties["childIndex"].Count > 0) - { - childIndex = (int)test.Properties["childIndex"][0]; - } - FullName = childIndex != -1 ? GetIndexedTestCaseName(test.FullName, childIndex) : test.FullName; - TestCaseCount = test.TestCaseCount; - HasChildren = test.HasChildren; - IsSuite = test.IsSuite; - if (UnityTestExecutionContext.CurrentContext != null) - { - TestCaseTimeout = UnityTestExecutionContext.CurrentContext.TestCaseTimeout; - } - else - { - TestCaseTimeout = CoroutineRunner.k_DefaultTimeout; - } - - TypeInfo = test.TypeInfo; - Method = test.Method; - Categories = test.GetAllCategoriesFromTest().Distinct().ToArray(); - IsTestAssembly = test is TestAssembly; - RunState = (RunState)Enum.Parse(typeof(RunState), test.RunState.ToString()); - Description = (string)test.Properties.Get(PropertyNames.Description); - SkipReason = test.GetSkipReason(); - ParentId = test.GetParentId(); - ParentFullName = test.GetParentFullName(); - UniqueName = test.GetUniqueName(); - ParentUniqueName = test.GetParentUniqueName(); - ChildIndex = childIndex; - - if (test.Parent != null) - { - if (test.Parent.Parent == null) // Assembly level - { - TestMode = (TestMode)Enum.Parse(typeof(TestMode),test.Properties.Get("platform").ToString()); - } - } - - Children = children; - } - - public void SetParent(ITestAdaptor parent) - { - Parent = parent; - if (parent != null) - { - TestMode = parent.TestMode; - } - } - - internal TestAdaptor(RemoteTestData test) - { - Id = test.id; - Name = test.name; - FullName = test.ChildIndex != -1 ? GetIndexedTestCaseName(test.fullName, test.ChildIndex) : test.fullName; - TestCaseCount = test.testCaseCount; - HasChildren = test.hasChildren; - IsSuite = test.isSuite; - m_ChildrenIds = test.childrenIds; - TestCaseTimeout = test.testCaseTimeout; - Categories = test.Categories; - IsTestAssembly = test.IsTestAssembly; - RunState = (RunState)Enum.Parse(typeof(RunState), test.RunState.ToString()); - Description = test.Description; - SkipReason = test.SkipReason; - ParentId = test.ParentId; - UniqueName = test.UniqueName; - ParentUniqueName = test.ParentUniqueName; - ParentFullName = test.ParentFullName; - ChildIndex = test.ChildIndex; - TestMode = TestMode.PlayMode; - } - - internal void ApplyChildren(IEnumerable allTests) - { - Children = m_ChildrenIds.Select(id => allTests.First(t => t.Id == id)).ToArray(); - if (!string.IsNullOrEmpty(ParentId)) - { - Parent = allTests.FirstOrDefault(t => t.Id == ParentId); - } - } - - public string Id { get; private set; } - public string Name { get; private set; } - public string FullName { get; private set; } - public int TestCaseCount { get; private set; } - public bool HasChildren { get; private set; } - public bool IsSuite { get; private set; } - public IEnumerable Children { get; private set; } - public ITestAdaptor Parent { get; private set; } - public int TestCaseTimeout { get; private set; } - public ITypeInfo TypeInfo { get; private set; } - public IMethodInfo Method { get; private set; } - private string[] m_ChildrenIds; - public string[] Categories { get; private set; } - public bool IsTestAssembly { get; private set; } - public RunState RunState { get; } - public string Description { get; } - public string SkipReason { get; } - public string ParentId { get; } - public string ParentFullName { get; } - public string UniqueName { get; } - public string ParentUniqueName { get; } - public int ChildIndex { get; } - public TestMode TestMode { get; private set; } - - private static string GetIndexedTestCaseName(string fullName, int index) - { - var generatedTestSuffix = " GeneratedTestCase" + index; - if (fullName.EndsWith(")")) - { - // Test names from generated TestCaseSource look like Test(TestCaseSourceType) - // This inserts a unique test case index in the name, so that it becomes Test(TestCaseSourceType GeneratedTestCase0) - return fullName.Substring(0, fullName.Length - 1) + generatedTestSuffix + fullName[fullName.Length - 1]; - } - - // In some cases there can be tests with duplicate names generated in other ways and they won't have () in their name - // We just append a suffix at the end of the name in that case - return fullName + generatedTestSuffix; - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptor.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptor.cs.meta deleted file mode 100644 index 273c463..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 6e0e62db88935c74288c97c907243bd0 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs deleted file mode 100644 index 9c747f9..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs +++ /dev/null @@ -1,91 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine.TestRunner.NUnitExtensions; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class TestAdaptorFactory : ITestAdaptorFactory - { - private Dictionary m_TestAdaptorCache = new Dictionary(); - private Dictionary m_TestResultAdaptorCache = new Dictionary(); - public ITestAdaptor Create(ITest test) - { - var uniqueName = test.GetUniqueName(); - if (m_TestAdaptorCache.ContainsKey(uniqueName)) - { - return m_TestAdaptorCache[uniqueName]; - } - - var adaptor = new TestAdaptor(test, test.Tests.Select(Create).ToArray()); - foreach (var child in adaptor.Children) - { - (child as TestAdaptor).SetParent(adaptor); - } - m_TestAdaptorCache[uniqueName] = adaptor; - return adaptor; - } - - public ITestAdaptor Create(RemoteTestData testData) - { - return new TestAdaptor(testData); - } - - public ITestResultAdaptor Create(ITestResult testResult) - { - var uniqueName = testResult.Test.GetUniqueName(); - if (m_TestResultAdaptorCache.ContainsKey(uniqueName)) - { - return m_TestResultAdaptorCache[uniqueName]; - } - var adaptor = new TestResultAdaptor(testResult, Create(testResult.Test), testResult.Children.Select(Create).ToArray()); - m_TestResultAdaptorCache[uniqueName] = adaptor; - return adaptor; - } - - public ITestResultAdaptor Create(RemoteTestResultData testResult, RemoteTestResultDataWithTestData allData) - { - return new TestResultAdaptor(testResult, allData); - } - - public ITestAdaptor BuildTree(RemoteTestResultDataWithTestData data) - { - var tests = data.tests.Select(remoteTestData => new TestAdaptor(remoteTestData)).ToList(); - - foreach (var test in tests) - { - test.ApplyChildren(tests); - } - - return tests.First(); - } - - public IEnumerator BuildTreeAsync(RemoteTestResultDataWithTestData data) - { - var tests = data.tests.Select(remoteTestData => new TestAdaptor(remoteTestData)).ToList(); - - for (var index = 0; index < tests.Count; index++) - { - var test = tests[index]; - test.ApplyChildren(tests); - if (index % 100 == 0) - { - yield return null; - } - } - - yield return tests.First(); - } - - public void ClearResultsCache() - { - m_TestResultAdaptorCache.Clear(); - } - - public void ClearTestsCache() - { - m_TestAdaptorCache.Clear(); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs.meta deleted file mode 100644 index 65e4da7..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestAdaptorFactory.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d0663d520c26b7c48a4135599e66acf8 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestMode.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestMode.cs deleted file mode 100644 index d22b732..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestMode.cs +++ /dev/null @@ -1,11 +0,0 @@ -using System; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - [Flags] - public enum TestMode - { - EditMode = 1 << 0, - PlayMode = 1 << 1 - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestMode.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestMode.cs.meta deleted file mode 100644 index 5812ce3..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestMode.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cad095eccea17b741bc4cd264e7441cd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestResultAdaptor.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestResultAdaptor.cs deleted file mode 100644 index 61501ac..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestResultAdaptor.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using NUnit.Framework.Interfaces; -using UnityEngine.TestRunner.TestLaunchers; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - internal class TestResultAdaptor : ITestResultAdaptor - { - private TNode m_Node; - - internal TestResultAdaptor(ITestResult result, ITestAdaptor test, ITestResultAdaptor[] children = null) - { - Test = test; - Name = result.Name; - FullName = result.FullName; - ResultState = result.ResultState.ToString(); - TestStatus = ParseTestStatus(result.ResultState.Status); - Duration = result.Duration; - StartTime = result.StartTime; - EndTime = result.EndTime; - Message = result.Message; - StackTrace = result.StackTrace; - AssertCount = result.AssertCount; - FailCount = result.FailCount; - PassCount = result.PassCount; - SkipCount = result.SkipCount; - InconclusiveCount = result.InconclusiveCount; - HasChildren = result.HasChildren; - Output = result.Output; - Children = children; - m_Node = result.ToXml(true); - } - - internal TestResultAdaptor(RemoteTestResultData result, RemoteTestResultDataWithTestData allData) - { - Test = new TestAdaptor(allData.tests.First(t => t.id == result.testId)); - Name = result.name; - FullName = result.fullName; - ResultState = result.resultState; - TestStatus = ParseTestStatus(result.testStatus); - Duration = result.duration; - StartTime = result.startTime; - EndTime = result.endTime; - Message = result.message; - StackTrace = result.stackTrace; - AssertCount = result.assertCount; - FailCount = result.failCount; - PassCount = result.passCount; - SkipCount = result.skipCount; - InconclusiveCount = result.inconclusiveCount; - HasChildren = result.hasChildren; - Output = result.output; - Children = result.childrenIds.Select(childId => new TestResultAdaptor(allData.results.First(r => r.testId == childId), allData)).ToArray(); - m_Node = TNode.FromXml(result.xml); - } - - public ITestAdaptor Test { get; private set; } - public string Name { get; private set; } - public string FullName { get; private set; } - public string ResultState { get; private set; } - public TestStatus TestStatus { get; private set; } - public double Duration { get; private set; } - public DateTime StartTime { get; private set; } - public DateTime EndTime { get; private set; } - public string Message { get; private set; } - public string StackTrace { get; private set; } - public int AssertCount { get; private set; } - public int FailCount { get; private set; } - public int PassCount { get; private set; } - public int SkipCount { get; private set; } - public int InconclusiveCount { get; private set; } - public bool HasChildren { get; private set; } - public IEnumerable Children { get; private set; } - public string Output { get; private set; } - public TNode ToXml() - { - return m_Node; - } - - private static TestStatus ParseTestStatus(NUnit.Framework.Interfaces.TestStatus testStatus) - { - return (TestStatus)Enum.Parse(typeof(TestStatus), testStatus.ToString()); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestResultAdaptor.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestResultAdaptor.cs.meta deleted file mode 100644 index aafad45..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestResultAdaptor.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: d061ada5d3169454daf54243390b5fdb -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestRunnerApi.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestRunnerApi.cs deleted file mode 100644 index 6b14d38..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestRunnerApi.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Linq; -using System.Threading; -using UnityEditor.TestTools.TestRunner.CommandLineTest; -using UnityEditor.TestTools.TestRunner.TestRun; -using UnityEngine; -using UnityEngine.TestRunner.TestLaunchers; -using UnityEngine.TestTools; -using UnityEngine.TestTools.NUnitExtensions; - -namespace UnityEditor.TestTools.TestRunner.Api -{ - public class TestRunnerApi : ScriptableObject, ITestRunnerApi - { - internal ICallbacksHolder callbacksHolder; - - private ICallbacksHolder m_CallbacksHolder - { - get - { - if (callbacksHolder == null) - { - return CallbacksHolder.instance; - } - - return callbacksHolder; - } - } - - internal Func ScheduleJob = (executionSettings) => - { - var runner = new TestJobRunner(); - return runner.RunJob(new TestJobData(executionSettings)); - }; - - public string Execute(ExecutionSettings executionSettings) - { - if (executionSettings == null) - { - throw new ArgumentNullException(nameof(executionSettings)); - } - - if ((executionSettings.filters == null || executionSettings.filters.Length == 0) && executionSettings.filter != null) - { - // Map filter (singular) to filters (plural), for backwards compatibility. - executionSettings.filters = new [] {executionSettings.filter}; - } - - if (executionSettings.targetPlatform == null && executionSettings.filters != null && - executionSettings.filters.Length > 0) - { - executionSettings.targetPlatform = executionSettings.filters[0].targetPlatform; - } - - return ScheduleJob(executionSettings); - } - - public void RegisterCallbacks(T testCallbacks, int priority = 0) where T : ICallbacks - { - if (testCallbacks == null) - { - throw new ArgumentNullException(nameof(testCallbacks)); - } - - m_CallbacksHolder.Add(testCallbacks, priority); - } - - public void UnregisterCallbacks(T testCallbacks) where T : ICallbacks - { - if (testCallbacks == null) - { - throw new ArgumentNullException(nameof(testCallbacks)); - } - - m_CallbacksHolder.Remove(testCallbacks); - } - - internal void RetrieveTestList(ExecutionSettings executionSettings, Action callback) - { - if (executionSettings == null) - { - throw new ArgumentNullException(nameof(executionSettings)); - } - - var firstFilter = executionSettings.filters?.FirstOrDefault() ?? executionSettings.filter; - RetrieveTestList(firstFilter.testMode, callback); - } - - public void RetrieveTestList(TestMode testMode, Action callback) - { - if (callback == null) - { - throw new ArgumentNullException(nameof(callback)); - } - - var platform = ParseTestMode(testMode); - var testAssemblyProvider = new EditorLoadedTestAssemblyProvider(new EditorCompilationInterfaceProxy(), new EditorAssembliesProxy()); - var testAdaptorFactory = new TestAdaptorFactory(); - var testListCache = new TestListCache(testAdaptorFactory, new RemoteTestResultDataFactory(), TestListCacheData.instance); - var testListProvider = new TestListProvider(testAssemblyProvider, new UnityTestAssemblyBuilder()); - var cachedTestListProvider = new CachingTestListProvider(testListProvider, testListCache, testAdaptorFactory); - - var job = new TestListJob(cachedTestListProvider, platform, (testRoot) => - { - callback(testRoot); - }); - job.Start(); - } - - internal static bool IsRunActive() - { - return RunData.instance.isRunning; - } - - private static TestPlatform ParseTestMode(TestMode testMode) - { - return (((testMode & TestMode.EditMode) == TestMode.EditMode) ? TestPlatform.EditMode : 0) | (((testMode & TestMode.PlayMode) == TestMode.PlayMode) ? TestPlatform.PlayMode : 0); - } - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestRunnerApi.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestRunnerApi.cs.meta deleted file mode 100644 index 5bac273..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestRunnerApi.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 68993ba529ae04440916cb7c23bf3279 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestStatus.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestStatus.cs deleted file mode 100644 index 53eb81b..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestStatus.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace UnityEditor.TestTools.TestRunner.Api -{ - public enum TestStatus - { - Inconclusive, - Skipped, - Passed, - Failed - } -} diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestStatus.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestStatus.cs.meta deleted file mode 100644 index 6828582..0000000 --- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEditor.TestRunner/Api/TestStatus.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 9ec94545c5b00344c9bd8e691f15d799 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: -- cgit v1.2.3