akaaafk commited on
Commit
63ac0ea
·
verified ·
1 Parent(s): a46b070

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs +58 -0
  2. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs.meta +11 -0
  3. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/Commands.meta +8 -0
  4. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs +141 -0
  5. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs.meta +11 -0
  6. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/Filters.meta +8 -0
  7. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs +12 -0
  8. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs.meta +11 -0
  9. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs +12 -0
  10. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs.meta +11 -0
  11. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/Runner.meta +8 -0
  12. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs +153 -0
  13. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs.meta +11 -0
  14. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs +77 -0
  15. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs.meta +11 -0
  16. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs +58 -0
  17. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs.meta +11 -0
  18. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks.meta +8 -0
  19. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs +26 -0
  20. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs.meta +11 -0
  21. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Messages.meta +8 -0
  22. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs +129 -0
  23. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs.meta +11 -0
  24. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs +36 -0
  25. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs.meta +11 -0
  26. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/RemoteHelpers.meta +8 -0
  27. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/RuntimeTestRunnerFilter.cs +62 -0
  28. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/RuntimeTestRunnerFilter.cs.meta +11 -0
  29. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs +51 -0
  30. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs.meta +11 -0
  31. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs +51 -0
  32. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs.meta +11 -0
  33. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs +30 -0
  34. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs.meta +11 -0
  35. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs +12 -0
  36. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs.meta +11 -0
  37. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs +33 -0
  38. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs.meta +11 -0
  39. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs +7 -0
  40. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs.meta +11 -0
  41. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs +12 -0
  42. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs.meta +11 -0
  43. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs +7 -0
  44. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs.meta +11 -0
  45. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs +10 -0
  46. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs.meta +11 -0
  47. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs +66 -0
  48. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs.meta +11 -0
  49. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs +10 -0
  50. benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs +23 -0
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Threading;
3
+ using NUnit.Framework.Internal;
4
+
5
+ namespace UnityEngine.TestTools.NUnitExtensions
6
+ {
7
+ internal abstract class BaseDelegator
8
+ {
9
+ protected ManualResetEvent m_Signal = new ManualResetEvent(false);
10
+
11
+ protected object m_Result;
12
+ protected Exception m_Exception;
13
+ protected ITestExecutionContext m_Context;
14
+
15
+ protected bool m_Aborted;
16
+
17
+ protected object HandleResult()
18
+ {
19
+ SetCurrentTestContext();
20
+ if (m_Exception != null)
21
+ {
22
+ var temp = m_Exception;
23
+ m_Exception = null;
24
+ throw temp;
25
+ }
26
+ var tempResult = m_Result;
27
+ m_Result = null;
28
+ return tempResult;
29
+ }
30
+
31
+ protected void WaitForSignal()
32
+ {
33
+ while (!m_Signal.WaitOne(100))
34
+ {
35
+ if (m_Aborted)
36
+ {
37
+ m_Aborted = false;
38
+ Reflect.MethodCallWrapper = null;
39
+ throw new Exception();
40
+ }
41
+ }
42
+ }
43
+
44
+ public void Abort()
45
+ {
46
+ m_Aborted = true;
47
+ }
48
+
49
+ protected void SetCurrentTestContext()
50
+ {
51
+ var prop = typeof(TestExecutionContext).GetProperty("CurrentContext");
52
+ if (prop != null)
53
+ {
54
+ prop.SetValue(null, m_Context, null);
55
+ }
56
+ }
57
+ }
58
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 37cea569bfefafe49a1513c4d7f0e9eb
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/Commands.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 6b72875690e0f7343911e06af3145bd5
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs ADDED
@@ -0,0 +1,141 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Linq;
3
+ using NUnit.Framework.Internal;
4
+ using UnityEngine.TestRunner.NUnitExtensions.Runner;
5
+ using UnityEngine.TestTools.Logging;
6
+ using UnityEngine.TestTools.TestRunner;
7
+
8
+ namespace UnityEngine.TestTools.NUnitExtensions
9
+ {
10
+ /// <summary>
11
+ /// Specialization of BaseDelegator that makes sure objects are created on the MainThread.
12
+ /// It also deals with ScriptableObjects so that tests can survive assembly reload.
13
+ /// </summary>
14
+ internal class ConstructDelegator
15
+ {
16
+ private Type m_RequestedType;
17
+ private object[] m_Arguments;
18
+
19
+ private ScriptableObject m_CurrentRunningTest;
20
+ private readonly IStateSerializer m_StateSerializer;
21
+
22
+ protected Exception m_Exception;
23
+ protected object m_Result;
24
+ protected ITestExecutionContext m_Context;
25
+
26
+ public ConstructDelegator(IStateSerializer stateSerializer)
27
+ {
28
+ m_StateSerializer = stateSerializer;
29
+ }
30
+
31
+ protected object HandleResult()
32
+ {
33
+ SetCurrentTestContext();
34
+ if (m_Exception != null)
35
+ {
36
+ var temp = m_Exception;
37
+ m_Exception = null;
38
+ throw temp;
39
+ }
40
+ var tempResult = m_Result;
41
+ m_Result = null;
42
+ return tempResult;
43
+ }
44
+
45
+ protected void SetCurrentTestContext()
46
+ {
47
+ var prop = typeof(UnityTestExecutionContext).GetProperty("CurrentContext");
48
+ if (prop != null)
49
+ {
50
+ prop.SetValue(null, m_Context, null);
51
+ }
52
+ }
53
+
54
+ public object Delegate(Type type, object[] arguments)
55
+ {
56
+ AssertState();
57
+ m_Context = UnityTestExecutionContext.CurrentContext;
58
+
59
+ m_RequestedType = type;
60
+ m_Arguments = arguments;
61
+
62
+ using (var logScope = new LogScope())
63
+ {
64
+ Execute(logScope);
65
+ }
66
+
67
+ return HandleResult();
68
+ }
69
+
70
+ private void AssertState()
71
+ {
72
+ if (m_RequestedType != null)
73
+ {
74
+ throw new Exception("Constructor not executed yet");
75
+ }
76
+ }
77
+
78
+ public bool HasAction()
79
+ {
80
+ return m_RequestedType != null;
81
+ }
82
+
83
+ public void Execute(LogScope logScope)
84
+ {
85
+ try
86
+ {
87
+ if (typeof(ScriptableObject).IsAssignableFrom(m_RequestedType))
88
+ {
89
+ if (m_CurrentRunningTest != null && m_RequestedType != m_CurrentRunningTest.GetType())
90
+ {
91
+ DestroyCurrentTestObjectIfExists();
92
+ }
93
+ if (m_CurrentRunningTest == null)
94
+ {
95
+ if (m_StateSerializer.CanRestoreFromScriptableObject(m_RequestedType))
96
+ {
97
+ m_CurrentRunningTest = m_StateSerializer.RestoreScriptableObjectInstance();
98
+ }
99
+ else
100
+ {
101
+ m_CurrentRunningTest = ScriptableObject.CreateInstance(m_RequestedType);
102
+ }
103
+ }
104
+ m_Result = m_CurrentRunningTest;
105
+ }
106
+ else
107
+ {
108
+ DestroyCurrentTestObjectIfExists();
109
+ m_Result = Activator.CreateInstance(m_RequestedType, m_Arguments);
110
+ if (m_StateSerializer.CanRestoreFromJson(m_RequestedType))
111
+ {
112
+ m_StateSerializer.RestoreClassFromJson(ref m_Result);
113
+ }
114
+ }
115
+ if (logScope.AnyFailingLogs())
116
+ {
117
+ var failingLog = logScope.FailingLogs.First();
118
+ throw new UnhandledLogMessageException(failingLog);
119
+ }
120
+ if (logScope.ExpectedLogs.Any())
121
+ throw new UnexpectedLogMessageException(LogScope.Current.ExpectedLogs.Peek());
122
+ }
123
+ catch (Exception e)
124
+ {
125
+ m_Exception = e;
126
+ }
127
+ finally
128
+ {
129
+ m_RequestedType = null;
130
+ m_Arguments = null;
131
+ }
132
+ }
133
+
134
+ public void DestroyCurrentTestObjectIfExists()
135
+ {
136
+ if (m_CurrentRunningTest == null)
137
+ return;
138
+ Object.DestroyImmediate(m_CurrentRunningTest);
139
+ }
140
+ }
141
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: b42e1db66fe9c634798674cb9e1df2ca
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/Filters.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: c3de99f9efc582a48995bc8e8c2df418
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections.Generic;
2
+ using System.Reflection;
3
+ using NUnit.Framework.Api;
4
+ using NUnit.Framework.Interfaces;
5
+
6
+ namespace UnityEngine.TestTools.NUnitExtensions
7
+ {
8
+ internal interface IAsyncTestAssemblyBuilder : ITestAssemblyBuilder
9
+ {
10
+ IEnumerator<ITest> BuildAsync(Assembly[] assemblies, TestPlatform[] testPlatforms, IDictionary<string, object> options);
11
+ }
12
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: c3aa5c3d59b94854e843f10b75b3ad63
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+
3
+ namespace UnityEngine.TestTools.NUnitExtensions
4
+ {
5
+ internal interface IStateSerializer
6
+ {
7
+ ScriptableObject RestoreScriptableObjectInstance();
8
+ void RestoreClassFromJson(ref object instance);
9
+ bool CanRestoreFromJson(Type requestedType);
10
+ bool CanRestoreFromScriptableObject(Type requestedType);
11
+ }
12
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 5f875a14565308a40a5262d2504da705
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/Runner.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 37888acc09d9ee848bf9559f06645c45
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs ADDED
@@ -0,0 +1,153 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections.Generic;
2
+ using System.Linq;
3
+ using NUnit.Framework.Interfaces;
4
+ using NUnit.Framework.Internal;
5
+ using UnityEngine.TestRunner.NUnitExtensions.Filters;
6
+
7
+ namespace UnityEngine.TestRunner.NUnitExtensions
8
+ {
9
+ internal static class TestExtensions
10
+ {
11
+ private static IEnumerable<string> GetTestCategories(this ITest test)
12
+ {
13
+ var categories = test.Properties[PropertyNames.Category].Cast<string>().ToList();
14
+ if (categories.Count == 0 && test is TestMethod)
15
+ {
16
+ // only mark tests as Uncategorized if the test fixture doesn't have a category,
17
+ // otherwise the test inherits the Fixture category
18
+ var fixtureCategories = test.Parent.Properties[PropertyNames.Category].Cast<string>().ToList();
19
+ if (fixtureCategories.Count == 0)
20
+ categories.Add(CategoryFilterExtended.k_DefaultCategory);
21
+ }
22
+ return categories;
23
+ }
24
+
25
+ public static bool HasCategory(this ITest test, string[] categoryFilter)
26
+ {
27
+ var categories = test.GetAllCategoriesFromTest().Distinct();
28
+ return categoryFilter.Any(c => categories.Any(r => r == c));
29
+ }
30
+
31
+ public static List<string> GetAllCategoriesFromTest(this ITest test)
32
+ {
33
+ if (test.Parent == null)
34
+ return test.GetTestCategories().ToList();
35
+
36
+ var categories = GetAllCategoriesFromTest(test.Parent);
37
+ categories.AddRange(test.GetTestCategories());
38
+ return categories;
39
+ }
40
+
41
+ public static void ParseForNameDuplicates(this ITest test)
42
+ {
43
+ var duplicates = new Dictionary<string, int>();
44
+ for (var i = 0; i < test.Tests.Count; i++)
45
+ {
46
+ var child = test.Tests[i];
47
+ int count;
48
+ if (duplicates.TryGetValue(child.FullName, out count))
49
+ {
50
+ count++;
51
+ child.Properties.Add("childIndex", count);
52
+ duplicates[child.FullName] = count;
53
+ }
54
+ else
55
+ {
56
+ duplicates.Add(child.FullName, 1);
57
+ }
58
+ ParseForNameDuplicates(child);
59
+ }
60
+ }
61
+
62
+ public static int GetChildIndex(this ITest test)
63
+ {
64
+ var index = test.Properties["childIndex"];
65
+ return (int)index[0];
66
+ }
67
+
68
+ public static bool HasChildIndex(this ITest test)
69
+ {
70
+ var index = test.Properties["childIndex"];
71
+ return index.Count > 0;
72
+ }
73
+
74
+ static string GetAncestorPath(ITest test)
75
+ {
76
+ var path = "";
77
+ var testParent = test.Parent;
78
+
79
+ while (testParent != null && testParent.Parent != null && !string.IsNullOrEmpty(testParent.Name))
80
+ {
81
+ path = testParent.Name + "/" + path;
82
+ testParent = testParent.Parent;
83
+ }
84
+
85
+ return path;
86
+ }
87
+
88
+ public static string GetUniqueName(this ITest test)
89
+ {
90
+ var id = GetAncestorPath(test) + GetFullName(test);
91
+ if (test.HasChildIndex())
92
+ {
93
+ var index = test.GetChildIndex();
94
+ if (index >= 0)
95
+ id += index;
96
+ }
97
+ if (test.IsSuite)
98
+ {
99
+ id += "[suite]";
100
+ }
101
+ return id;
102
+ }
103
+
104
+ public static string GetFullName(ITest test)
105
+ {
106
+ var typeInfo = test.TypeInfo ?? test.Parent?.TypeInfo ?? test.Tests.FirstOrDefault()?.TypeInfo;
107
+ if (typeInfo == null)
108
+ {
109
+ return "[" + test.Name + "]";
110
+ }
111
+
112
+ var assemblyId = typeInfo.Assembly.GetName().Name;
113
+ if (assemblyId == test.Name)
114
+ {
115
+ return $"[{test.Name}]";
116
+ }
117
+
118
+ return string.Format("[{0}][{1}]", assemblyId, test.FullName);
119
+ }
120
+
121
+ public static string GetSkipReason(this ITest test)
122
+ {
123
+ if (test.Properties.ContainsKey(PropertyNames.SkipReason))
124
+ return (string)test.Properties.Get(PropertyNames.SkipReason);
125
+
126
+ return null;
127
+ }
128
+
129
+ public static string GetParentId(this ITest test)
130
+ {
131
+ if (test.Parent != null)
132
+ return test.Parent.Id;
133
+
134
+ return null;
135
+ }
136
+
137
+ public static string GetParentFullName(this ITest test)
138
+ {
139
+ if (test.Parent != null)
140
+ return test.Parent.FullName;
141
+
142
+ return null;
143
+ }
144
+
145
+ public static string GetParentUniqueName(this ITest test)
146
+ {
147
+ if (test.Parent != null)
148
+ return GetUniqueName(test.Parent);
149
+
150
+ return null;
151
+ }
152
+ }
153
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 8bc74398aa3944646ade4ee78cd57484
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using NUnit.Framework;
3
+ using NUnit.Framework.Interfaces;
4
+ using NUnit.Framework.Internal;
5
+
6
+ namespace UnityEngine.TestRunner.NUnitExtensions
7
+ {
8
+ internal static class TestResultExtensions
9
+ {
10
+ public static void RecordPrefixedException(this TestResult testResult, string prefix, Exception ex, ResultState resultState = null)
11
+
12
+ {
13
+ if (ex is NUnitException)
14
+ {
15
+ ex = ex.InnerException;
16
+ }
17
+
18
+ if (resultState == null)
19
+ {
20
+ resultState = testResult.ResultState == ResultState.Cancelled
21
+ ? ResultState.Cancelled
22
+ : ResultState.Error;
23
+ }
24
+
25
+ var exceptionMessage = ExceptionHelper.BuildMessage(ex);
26
+ string stackTrace = "--" + prefix + NUnit.Env.NewLine + ExceptionHelper.BuildStackTrace(ex);
27
+ if (testResult.StackTrace != null)
28
+ {
29
+ stackTrace = testResult.StackTrace + NUnit.Env.NewLine + stackTrace;
30
+ }
31
+
32
+ if (testResult.Test.IsSuite)
33
+ {
34
+ resultState = resultState.WithSite(FailureSite.TearDown);
35
+ }
36
+
37
+ if (ex is ResultStateException)
38
+ {
39
+ exceptionMessage = ex.Message;
40
+ resultState = ((ResultStateException)ex).ResultState;
41
+ stackTrace = StackFilter.Filter(ex.StackTrace);
42
+ }
43
+
44
+ string message = (string.IsNullOrEmpty(prefix) ? "" : (prefix + " : ")) + exceptionMessage;
45
+ if (testResult.Message != null)
46
+ {
47
+ message = testResult.Message + NUnit.Env.NewLine + message;
48
+ }
49
+
50
+ testResult.SetResult(resultState, message, stackTrace);
51
+ }
52
+
53
+ public static void RecordPrefixedError(this TestResult testResult, string prefix, string error, ResultState resultState = null)
54
+
55
+ {
56
+ if (resultState == null)
57
+ {
58
+ resultState = testResult.ResultState == ResultState.Cancelled
59
+ ? ResultState.Cancelled
60
+ : ResultState.Error;
61
+ }
62
+
63
+ if (testResult.Test.IsSuite)
64
+ {
65
+ resultState = resultState.WithSite(FailureSite.TearDown);
66
+ }
67
+
68
+ string message = (string.IsNullOrEmpty(prefix) ? "" : (prefix + " : ")) + error;
69
+ if (testResult.Message != null)
70
+ {
71
+ message = testResult.Message + NUnit.Env.NewLine + message;
72
+ }
73
+
74
+ testResult.SetResult(resultState, message);
75
+ }
76
+ }
77
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 65fb6da362a78334ab360a125cfafdaf
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections.Generic;
2
+ using System.IO;
3
+ using System.Reflection;
4
+ using NUnit;
5
+ using NUnit.Framework.Api;
6
+ using NUnit.Framework.Interfaces;
7
+ using NUnit.Framework.Internal;
8
+
9
+ namespace UnityEngine.TestTools.NUnitExtensions
10
+ {
11
+ internal class UnityTestAssemblyBuilder : DefaultTestAssemblyBuilder, IAsyncTestAssemblyBuilder
12
+ {
13
+ private readonly string m_ProductName;
14
+ public UnityTestAssemblyBuilder()
15
+ {
16
+ m_ProductName = Application.productName;
17
+ }
18
+
19
+ public ITest Build(Assembly[] assemblies, TestPlatform[] testPlatforms, IDictionary<string, object> options)
20
+ {
21
+ var test = BuildAsync(assemblies, testPlatforms, options);
22
+ while (test.MoveNext())
23
+ {
24
+ }
25
+
26
+ return test.Current;
27
+ }
28
+
29
+ public IEnumerator<ITest> BuildAsync(Assembly[] assemblies, TestPlatform[] testPlatforms, IDictionary<string, object> options)
30
+ {
31
+ var productName = string.Join("_", m_ProductName.Split(Path.GetInvalidFileNameChars()));
32
+ var suite = new TestSuite(productName);
33
+ for (var index = 0; index < assemblies.Length; index++)
34
+ {
35
+ var assembly = assemblies[index];
36
+ var platform = testPlatforms[index];
37
+
38
+ var assemblySuite = Build(assembly, options) as TestSuite;
39
+ if (assemblySuite != null && assemblySuite.HasChildren)
40
+ {
41
+ assemblySuite.Properties.Set("platform", platform);
42
+ suite.Add(assemblySuite);
43
+ }
44
+
45
+ yield return null;
46
+ }
47
+
48
+ yield return suite;
49
+ }
50
+
51
+ public static Dictionary<string, object> GetNUnitTestBuilderSettings(TestPlatform testPlatform)
52
+ {
53
+ var emptySettings = new Dictionary<string, object>();
54
+ emptySettings.Add(FrameworkPackageSettings.TestParameters, "platform=" + testPlatform);
55
+ return emptySettings;
56
+ }
57
+ }
58
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 98ba0396e4b4ee8498a8f097affcfddf
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Callbacks.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 61e236e8570a95e4eb754fb291e102e0
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using NUnit.Framework.Interfaces;
3
+ using UnityEngine.Events;
4
+
5
+ namespace UnityEngine.TestTools.TestRunner
6
+ {
7
+ internal interface ITestRunnerListener
8
+ {
9
+ void RunStarted(ITest testsToRun);
10
+ void RunFinished(ITestResult testResults);
11
+ void TestStarted(ITest test);
12
+ void TestFinished(ITestResult result);
13
+ }
14
+
15
+ [Serializable]
16
+ internal class TestFinishedEvent : UnityEvent<ITestResult> {}
17
+
18
+ [Serializable]
19
+ internal class TestStartedEvent : UnityEvent<ITest> {}
20
+
21
+ [Serializable]
22
+ internal class RunFinishedEvent : UnityEvent<ITestResult> {}
23
+
24
+ [Serializable]
25
+ internal class RunStartedEvent : UnityEvent<ITest> {}
26
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: d1b534518943030499685344fd1d476d
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/Messages.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 256a0ca37fa972840bce7fca446e75e7
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs ADDED
@@ -0,0 +1,129 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Collections;
3
+ using System.Collections.Generic;
4
+ using System.Linq;
5
+ using UnityEngine.SceneManagement;
6
+ using UnityEngine.TestRunner.NUnitExtensions;
7
+ using UnityEngine.TestRunner.NUnitExtensions.Runner;
8
+ using UnityEngine.TestTools.NUnitExtensions;
9
+ using UnityEngine.TestTools.Utils;
10
+
11
+ namespace UnityEngine.TestTools.TestRunner
12
+ {
13
+ [Serializable]
14
+ [AddComponentMenu("")]
15
+ internal class PlaymodeTestsController : MonoBehaviour
16
+ {
17
+ private IEnumerator m_TestSteps;
18
+
19
+ [SerializeField]
20
+ private List<string> m_AssembliesWithTests;
21
+ public List<string> AssembliesWithTests
22
+ {
23
+ get
24
+ {
25
+ return m_AssembliesWithTests;
26
+ }
27
+ set
28
+ {
29
+ m_AssembliesWithTests = value;
30
+ }
31
+ }
32
+
33
+ [SerializeField]
34
+ internal TestStartedEvent testStartedEvent = new TestStartedEvent();
35
+ [SerializeField]
36
+ internal TestFinishedEvent testFinishedEvent = new TestFinishedEvent();
37
+ [SerializeField]
38
+ internal RunStartedEvent runStartedEvent = new RunStartedEvent();
39
+ [SerializeField]
40
+ internal RunFinishedEvent runFinishedEvent = new RunFinishedEvent();
41
+
42
+ internal const string kPlaymodeTestControllerName = "Code-based tests runner";
43
+
44
+ [SerializeField]
45
+ public PlaymodeTestsControllerSettings settings = new PlaymodeTestsControllerSettings();
46
+
47
+ internal UnityTestAssemblyRunner m_Runner;
48
+
49
+ public IEnumerator Start()
50
+ {
51
+ //Skip 2 frame because Unity.
52
+ yield return null;
53
+ yield return null;
54
+ StartCoroutine(Run());
55
+ }
56
+
57
+ internal static bool IsControllerOnScene()
58
+ {
59
+ return GameObject.Find(kPlaymodeTestControllerName) != null;
60
+ }
61
+
62
+ internal static PlaymodeTestsController GetController()
63
+ {
64
+ return GameObject.Find(kPlaymodeTestControllerName).GetComponent<PlaymodeTestsController>();
65
+ }
66
+
67
+ public IEnumerator TestRunnerCoroutine()
68
+ {
69
+ while (m_TestSteps.MoveNext())
70
+ {
71
+ yield return m_TestSteps.Current;
72
+ }
73
+
74
+ if (m_Runner.IsTestComplete)
75
+ {
76
+ runFinishedEvent.Invoke(m_Runner.Result);
77
+ Cleanup();
78
+
79
+ yield return null;
80
+ }
81
+ }
82
+
83
+ public IEnumerator Run()
84
+ {
85
+ CoroutineTestWorkItem.monoBehaviourCoroutineRunner = this;
86
+ gameObject.hideFlags |= HideFlags.DontSave;
87
+
88
+ if (settings.sceneBased)
89
+ {
90
+ SceneManager.LoadScene(1, LoadSceneMode.Additive);
91
+ yield return null;
92
+ }
93
+
94
+ var testListUtil = new PlayerTestAssemblyProvider(new AssemblyLoadProxy(), m_AssembliesWithTests);
95
+ m_Runner = new UnityTestAssemblyRunner(new UnityTestAssemblyBuilder(), new PlaymodeWorkItemFactory());
96
+
97
+ var loadedTests = m_Runner.Load(testListUtil.GetUserAssemblies().Select(a => a.Assembly).ToArray(), TestPlatform.PlayMode, UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(TestPlatform.PlayMode));
98
+ loadedTests.ParseForNameDuplicates();
99
+ runStartedEvent.Invoke(m_Runner.LoadedTest);
100
+
101
+ var testListenerWrapper = new TestListenerWrapper(testStartedEvent, testFinishedEvent);
102
+ m_TestSteps = m_Runner.Run(testListenerWrapper, settings.BuildNUnitFilter()).GetEnumerator();
103
+
104
+ yield return TestRunnerCoroutine();
105
+ }
106
+
107
+ public void Cleanup()
108
+ {
109
+ if (m_Runner != null)
110
+ {
111
+ m_Runner.StopRun();
112
+ m_Runner = null;
113
+ }
114
+ if (Application.isEditor)
115
+ {
116
+ Destroy(gameObject);
117
+ }
118
+ }
119
+
120
+ public static void TryCleanup()
121
+ {
122
+ var controller = GetController();
123
+ if (controller != null)
124
+ {
125
+ controller.Cleanup();
126
+ }
127
+ }
128
+ }
129
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 102e512f651ee834f951a2516c1ea3b8
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Linq;
3
+ using NUnit.Framework.Interfaces;
4
+ using NUnit.Framework.Internal.Filters;
5
+ using UnityEngine.SceneManagement;
6
+ using UnityEngine.TestTools.TestRunner.GUI;
7
+
8
+ namespace UnityEngine.TestTools.TestRunner
9
+ {
10
+ [Serializable]
11
+ internal class PlaymodeTestsControllerSettings
12
+ {
13
+ [SerializeField]
14
+ public RuntimeTestRunnerFilter[] filters;
15
+ public bool sceneBased;
16
+ public string originalScene;
17
+ public string bootstrapScene;
18
+
19
+ public static PlaymodeTestsControllerSettings CreateRunnerSettings(RuntimeTestRunnerFilter[] filters)
20
+ {
21
+ var settings = new PlaymodeTestsControllerSettings
22
+ {
23
+ filters = filters,
24
+ sceneBased = false,
25
+ originalScene = SceneManager.GetActiveScene().path,
26
+ bootstrapScene = null
27
+ };
28
+ return settings;
29
+ }
30
+
31
+ internal ITestFilter BuildNUnitFilter()
32
+ {
33
+ return new OrFilter(filters.Select(f => f.BuildNUnitFilter()).ToArray());
34
+ }
35
+ }
36
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 2799eb4c84e72e54092a292cf626936b
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/RemoteHelpers.meta ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 91c20d2c22b8b3a4cb6c816bd225591a
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/RuntimeTestRunnerFilter.cs ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Collections.Generic;
3
+ using System.Linq;
4
+ using NUnit.Framework.Interfaces;
5
+ using NUnit.Framework.Internal;
6
+ using NUnit.Framework.Internal.Filters;
7
+ using UnityEngine.TestRunner.NUnitExtensions.Filters;
8
+
9
+ namespace UnityEngine.TestTools.TestRunner.GUI
10
+ {
11
+ [Serializable]
12
+ internal class RuntimeTestRunnerFilter
13
+ {
14
+ public string[] assemblyNames;
15
+ public string[] groupNames;
16
+ public string[] categoryNames;
17
+ public string[] testNames;
18
+ public bool synchronousOnly = false;
19
+
20
+ public ITestFilter BuildNUnitFilter()
21
+ {
22
+ var filters = new List<ITestFilter>();
23
+
24
+ AddFilters(filters, testNames, (s) => new FullNameFilter(s));
25
+ AddFilters(filters, groupNames, (s) => new FullNameFilter(s) {IsRegex = true});
26
+ AddFilters(filters, assemblyNames, (s) => new AssemblyNameFilter(s));
27
+ AddFilters(filters, categoryNames, (s) => new CategoryFilterExtended(s) {IsRegex = true});
28
+
29
+ if (synchronousOnly)
30
+ {
31
+ filters.Add(new SynchronousFilter());
32
+ }
33
+
34
+ return filters.Count == 0 ? TestFilter.Empty : new AndFilter(filters.ToArray());
35
+ }
36
+
37
+ private static void AddFilters(List<ITestFilter> filters, string[] values, Func<string, TestFilter> builder)
38
+ {
39
+ if (values == null || values.Length == 0)
40
+ {
41
+ return;
42
+ }
43
+
44
+ var inclusionFilters = values.Where(v => !v.StartsWith("!")).Select(v => builder(v) as ITestFilter).ToArray();
45
+ var exclusionFilters = values.Where(v => v.StartsWith("!"))
46
+ .Select(v => new NotFilter(builder(v.Substring(1))) as ITestFilter)
47
+ .ToArray();
48
+ if (inclusionFilters.Length > 0 && exclusionFilters.Length > 0)
49
+ {
50
+ filters.Add(new AndFilter(new OrFilter(inclusionFilters), new AndFilter(exclusionFilters)));
51
+ }
52
+ else if (inclusionFilters.Length > 0)
53
+ {
54
+ filters.Add(new OrFilter(inclusionFilters));
55
+ }
56
+ else // Only exclusionFilters
57
+ {
58
+ filters.Add(new AndFilter(exclusionFilters));
59
+ }
60
+ }
61
+ }
62
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/RuntimeTestRunnerFilter.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: a025ba7ee40d0104db8d08b1d9eabb0d
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections;
2
+ using System.Linq;
3
+ using System.Reflection;
4
+ using NUnit.Framework.Interfaces;
5
+ using NUnit.Framework.Internal;
6
+
7
+ namespace UnityEngine.TestTools.TestRunner.GUI
8
+ {
9
+ class SynchronousFilter : ITestFilter
10
+ {
11
+ public TNode ToXml(bool recursive)
12
+ {
13
+ return new TNode("synchronousOnly");
14
+ }
15
+
16
+ public TNode AddToXml(TNode parentNode, bool recursive)
17
+ {
18
+ return parentNode.AddElement("synchronousOnly");
19
+ }
20
+
21
+ public bool Pass(ITest test)
22
+ {
23
+ if (test.Method == null)
24
+ return true;
25
+
26
+ if (test.Method.ReturnType.Type == typeof(IEnumerator))
27
+ return false;
28
+
29
+ if (test.Method.GetCustomAttributes<IOuterUnityTestAction>(true).Any())
30
+ return false;
31
+
32
+ if (test.TypeInfo?.Type != null)
33
+ {
34
+ if (Reflect.GetMethodsWithAttribute(test.TypeInfo.Type, typeof(UnitySetUpAttribute), true)
35
+ .Any(mi => mi.ReturnType == typeof(System.Collections.IEnumerator)))
36
+ return false;
37
+
38
+ if (Reflect.GetMethodsWithAttribute(test.TypeInfo.Type, typeof(UnityTearDownAttribute), true)
39
+ .Any(mi => mi.ReturnType == typeof(System.Collections.IEnumerator)))
40
+ return false;
41
+ }
42
+
43
+ return true;
44
+ }
45
+
46
+ public bool IsExplicitMatch(ITest test)
47
+ {
48
+ return Pass(test);
49
+ }
50
+ }
51
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: b9aec9d3b0a86466ab4647d01e8fc87d
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Collections;
3
+ using System.Reflection;
4
+ using NUnit.Framework;
5
+ using NUnit.Framework.Interfaces;
6
+ using NUnit.Framework.Internal;
7
+
8
+ namespace UnityEngine.TestTools.TestRunner
9
+ {
10
+ internal class TestEnumeratorWrapper
11
+ {
12
+ private readonly TestMethod m_TestMethod;
13
+
14
+ public TestEnumeratorWrapper(TestMethod testMethod)
15
+ {
16
+ m_TestMethod = testMethod;
17
+ }
18
+
19
+ public IEnumerator GetEnumerator(ITestExecutionContext context)
20
+ {
21
+ if (m_TestMethod.Method.ReturnType.Type == typeof(IEnumerator))
22
+ {
23
+ return HandleEnumerableTest(context);
24
+ }
25
+ var message = string.Format("Return type {0} of {1} in {2} is not supported.",
26
+ m_TestMethod.Method.ReturnType, m_TestMethod.Method.Name, m_TestMethod.Method.TypeInfo.FullName);
27
+ if (m_TestMethod.Method.ReturnType.Type == typeof(IEnumerable))
28
+ {
29
+ message += "\nDid you mean IEnumerator?";
30
+ }
31
+ throw new InvalidSignatureException(message);
32
+ }
33
+
34
+ private IEnumerator HandleEnumerableTest(ITestExecutionContext context)
35
+ {
36
+ try
37
+ {
38
+ return m_TestMethod.Method.MethodInfo.Invoke(context.TestObject, m_TestMethod.parms != null ? m_TestMethod.parms.OriginalArguments : null) as IEnumerator;
39
+ }
40
+ catch (TargetInvocationException e)
41
+ {
42
+ if (e.InnerException is IgnoreException)
43
+ {
44
+ context.CurrentResult.SetResult(ResultState.Ignored, e.InnerException.Message);
45
+ return null;
46
+ }
47
+ throw;
48
+ }
49
+ }
50
+ }
51
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 9ad0b0c865b01af4ca1b414689e71259
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using NUnit.Framework.Interfaces;
2
+
3
+ namespace UnityEngine.TestTools.TestRunner
4
+ {
5
+ internal class TestListenerWrapper : ITestListener
6
+ {
7
+ private readonly TestFinishedEvent m_TestFinishedEvent;
8
+ private readonly TestStartedEvent m_TestStartedEvent;
9
+
10
+ public TestListenerWrapper(TestStartedEvent testStartedEvent, TestFinishedEvent testFinishedEvent)
11
+ {
12
+ m_TestStartedEvent = testStartedEvent;
13
+ m_TestFinishedEvent = testFinishedEvent;
14
+ }
15
+
16
+ public void TestStarted(ITest test)
17
+ {
18
+ m_TestStartedEvent.Invoke(test);
19
+ }
20
+
21
+ public void TestFinished(ITestResult result)
22
+ {
23
+ m_TestFinishedEvent.Invoke(result);
24
+ }
25
+
26
+ public void TestOutput(TestOutput output)
27
+ {
28
+ }
29
+ }
30
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 73deb9b8722aa284eab27c4dc90956c6
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Reflection;
2
+
3
+ namespace UnityEngine.TestTools.Utils
4
+ {
5
+ internal class AssemblyLoadProxy : IAssemblyLoadProxy
6
+ {
7
+ public IAssemblyWrapper Load(string assemblyString)
8
+ {
9
+ return new AssemblyWrapper(Assembly.Load(assemblyString));
10
+ }
11
+ }
12
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: fb593906b7b6d824087dcaebf6c082e0
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+ using System.Reflection;
3
+
4
+ namespace UnityEngine.TestTools.Utils
5
+ {
6
+ internal class AssemblyWrapper : IAssemblyWrapper
7
+ {
8
+ public AssemblyWrapper(Assembly assembly)
9
+ {
10
+ Assembly = assembly;
11
+ Name = assembly.GetName();
12
+ }
13
+
14
+ public Assembly Assembly { get; }
15
+
16
+ public AssemblyName Name { get; }
17
+
18
+ public virtual string Location
19
+ {
20
+ get
21
+ {
22
+ //Some platforms dont support this
23
+ throw new NotImplementedException();
24
+ }
25
+ }
26
+
27
+ public virtual AssemblyName[] GetReferencedAssemblies()
28
+ {
29
+ //Some platforms dont support this
30
+ throw new NotImplementedException();
31
+ }
32
+ }
33
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 2e3b9bbf2c1a3cd4f88883ca32882ec6
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ namespace UnityEngine.TestTools.Utils
2
+ {
3
+ internal interface IAssemblyLoadProxy
4
+ {
5
+ IAssemblyWrapper Load(string assemblyString);
6
+ }
7
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 12dfd4bdbb5c8e6419432fbc54ef25d9
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Reflection;
2
+
3
+ namespace UnityEngine.TestTools.Utils
4
+ {
5
+ internal interface IAssemblyWrapper
6
+ {
7
+ Assembly Assembly { get; }
8
+ AssemblyName Name { get; }
9
+ string Location { get; }
10
+ AssemblyName[] GetReferencedAssemblies();
11
+ }
12
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 1c5afe945b715e149a70113a4be7b32a
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ namespace UnityEngine.TestTools.Utils
2
+ {
3
+ internal interface IScriptingRuntimeProxy
4
+ {
5
+ string[] GetAllUserAssemblies();
6
+ }
7
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: fe4aef60e4ace544c8430da8ef8acba2
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ using NUnit.Framework.Interfaces;
2
+
3
+ namespace UnityEngine.TestTools.Utils
4
+ {
5
+ internal interface ITestAssemblyProvider
6
+ {
7
+ ITest GetTestsWithNUnit();
8
+ IAssemblyWrapper[] GetUserAssemblies();
9
+ }
10
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: c5acba6181d845c4e92146009bd4480f
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs ADDED
@@ -0,0 +1,66 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System.Collections.Generic;
2
+ using System.IO;
3
+ using System.Linq;
4
+ using NUnit.Framework.Interfaces;
5
+ using UnityEngine.TestTools.NUnitExtensions;
6
+
7
+ namespace UnityEngine.TestTools.Utils
8
+ {
9
+ internal class PlayerTestAssemblyProvider
10
+ {
11
+ private IAssemblyLoadProxy m_AssemblyLoadProxy;
12
+ private readonly List<string> m_AssembliesToLoad;
13
+
14
+ //Cached until domain reload
15
+ private static List<IAssemblyWrapper> m_LoadedAssemblies;
16
+
17
+ internal PlayerTestAssemblyProvider(IAssemblyLoadProxy assemblyLoadProxy, List<string> assembliesToLoad)
18
+ {
19
+ m_AssemblyLoadProxy = assemblyLoadProxy;
20
+ m_AssembliesToLoad = assembliesToLoad;
21
+ LoadAssemblies();
22
+ }
23
+
24
+ public ITest GetTestsWithNUnit()
25
+ {
26
+ return BuildTests(TestPlatform.PlayMode, m_LoadedAssemblies.ToArray());
27
+ }
28
+
29
+ public List<IAssemblyWrapper> GetUserAssemblies()
30
+ {
31
+ return m_LoadedAssemblies;
32
+ }
33
+
34
+ protected static ITest BuildTests(TestPlatform testPlatform, IAssemblyWrapper[] assemblies)
35
+ {
36
+ var settings = UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(testPlatform);
37
+ var builder = new UnityTestAssemblyBuilder();
38
+ return builder.Build(assemblies.Select(a => a.Assembly).ToArray(), Enumerable.Repeat(testPlatform, assemblies.Length).ToArray(), settings);
39
+ }
40
+
41
+ private void LoadAssemblies()
42
+ {
43
+ if (m_LoadedAssemblies != null)
44
+ {
45
+ return;
46
+ }
47
+
48
+ m_LoadedAssemblies = new List<IAssemblyWrapper>();
49
+
50
+ foreach (var userAssembly in m_AssembliesToLoad)
51
+ {
52
+ IAssemblyWrapper a;
53
+ try
54
+ {
55
+ a = m_AssemblyLoadProxy.Load(userAssembly);
56
+ }
57
+ catch (FileNotFoundException)
58
+ {
59
+ continue;
60
+ }
61
+ if (a != null)
62
+ m_LoadedAssemblies.Add(a);
63
+ }
64
+ }
65
+ }
66
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs.meta ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ fileFormatVersion: 2
2
+ guid: 43a3aec217baa9644a7cf34b5f93fed9
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ namespace UnityEngine.TestTools.Utils
2
+ {
3
+ internal class ScriptingRuntimeProxy : IScriptingRuntimeProxy
4
+ {
5
+ public string[] GetAllUserAssemblies()
6
+ {
7
+ return ScriptingRuntime.GetAllUserAssemblies();
8
+ }
9
+ }
10
+ }
benchmark/NYU_CTF_Bench/test/2022/CSAW-Quals/rev/AnyaGacha/src/client/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ using System;
2
+
3
+ namespace UnityEngine.TestTools
4
+ {
5
+ /// <summary>
6
+ /// PostBuildCleanup attributes run if the respective test or test class is in the current test run. The test is included either by running all tests or setting a [filter](https://docs.unity3d.com/Packages/com.unity.test-framework@1.1/manual/workflow-create-test.html#filters) that includes the test. If multiple tests reference the same pre-built setup or post-build cleanup, then it only runs once.
7
+ /// </summary>
8
+ [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
9
+ public class PostBuildCleanupAttribute : Attribute
10
+ {
11
+ public PostBuildCleanupAttribute(Type targetClass)
12
+ {
13
+ TargetClass = targetClass;
14
+ }
15
+
16
+ public PostBuildCleanupAttribute(string targetClassName)
17
+ {
18
+ TargetClass = AttributeHelper.GetTargetClassFromName(targetClassName, typeof(IPostBuildCleanup));
19
+ }
20
+
21
+ internal Type TargetClass { get; private set; }
22
+ }
23
+ }