summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-04-20 19:09:33 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-04-20 19:09:33 -0400
commit7c1e566113d59699af1624186c64eca67f063fc6 (patch)
tree5a6850a695986872d5d0b09d7dab8421628fe33e /Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs
parentdd117b77aae1d8be7563b360d05b842a73b7dab2 (diff)
downloadProject-Sandbox-7c1e566113d59699af1624186c64eca67f063fc6.tar.gz
Project-Sandbox-7c1e566113d59699af1624186c64eca67f063fc6.tar.bz2
Project-Sandbox-7c1e566113d59699af1624186c64eca67f063fc6.zip
Upgraded Unity
Diffstat (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs')
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs58
1 files changed, 0 insertions, 58 deletions
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs
deleted file mode 100644
index 596c000..0000000
--- a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-using System.Threading;
-using NUnit.Framework.Internal;
-
-namespace UnityEngine.TestTools.NUnitExtensions
-{
- internal abstract class BaseDelegator
- {
- protected ManualResetEvent m_Signal = new ManualResetEvent(false);
-
- protected object m_Result;
- protected Exception m_Exception;
- protected ITestExecutionContext m_Context;
-
- protected bool m_Aborted;
-
- protected object HandleResult()
- {
- SetCurrentTestContext();
- if (m_Exception != null)
- {
- var temp = m_Exception;
- m_Exception = null;
- throw temp;
- }
- var tempResult = m_Result;
- m_Result = null;
- return tempResult;
- }
-
- protected void WaitForSignal()
- {
- while (!m_Signal.WaitOne(100))
- {
- if (m_Aborted)
- {
- m_Aborted = false;
- Reflect.MethodCallWrapper = null;
- throw new Exception();
- }
- }
- }
-
- public void Abort()
- {
- m_Aborted = true;
- }
-
- protected void SetCurrentTestContext()
- {
- var prop = typeof(TestExecutionContext).GetProperty("CurrentContext");
- if (prop != null)
- {
- prop.SetValue(null, m_Context, null);
- }
- }
- }
-}