summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner
diff options
context:
space:
mode:
Diffstat (limited to 'Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner')
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/AssemblyInfo.cs16
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/AssemblyInfo.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs83
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs14
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs18
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/Is.cs10
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/Is.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogAssert.cs39
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogAssert.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs22
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs18
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs103
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs223
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs29
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs35
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs28
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs79
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs36
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs52
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs28
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs20
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs56
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs10
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs10
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs33
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs58
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs196
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs49
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs34
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs60
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs60
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs44
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs86
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs32
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs49
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs48
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs53
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs18
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs141
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs25
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs36
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs12
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs12
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs342
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs75
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs96
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs34
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs10
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs13
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs4
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs127
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs143
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs98
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs130
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs113
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs10
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs28
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs146
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs77
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs58
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs47
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs151
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs97
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs36
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs26
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs12
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs129
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs36
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs14
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs56
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs54
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs51
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs15
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs51
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs51
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs30
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestPlatform.cs21
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestPlatform.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs203
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef13
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef.meta7
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs12
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs30
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs7
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs7
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs10
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs66
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs10
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AttributeHelper.cs45
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AttributeHelper.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs36
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/CoroutineRunner.cs103
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/CoroutineRunner.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs30
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs19
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs7
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs7
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ITestRunCallback.cs12
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ITestRunCallback.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest.meta8
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs7
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs23
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs20
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs20
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs31
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/StacktraceFilter.cs43
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/StacktraceFilter.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs24
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs63
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Utils.cs40
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Utils.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs22
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs33
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs22
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs32
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs22
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs.meta11
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs32
-rw-r--r--Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs.meta11
230 files changed, 6725 insertions, 0 deletions
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/AssemblyInfo.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/AssemblyInfo.cs
new file mode 100644
index 0000000..8c3afaa
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/AssemblyInfo.cs
@@ -0,0 +1,16 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+[assembly: AssemblyTitle("UnityEngine.TestRunner")]
+
+[assembly: InternalsVisibleTo("UnityEditor.TestRunner")]
+[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
+[assembly: InternalsVisibleTo("Unity.PerformanceTesting")]
+[assembly: InternalsVisibleTo("Unity.PerformanceTesting.Editor")]
+[assembly: InternalsVisibleTo("Assembly-CSharp-testable")]
+[assembly: InternalsVisibleTo("Assembly-CSharp-Editor-testable")]
+[assembly: InternalsVisibleTo("UnityEngine.TestRunner.Tests")]
+[assembly: InternalsVisibleTo("UnityEditor.TestRunner.Tests")]
+[assembly: InternalsVisibleTo("Unity.PackageManagerUI.Editor")]
+
+[assembly: AssemblyVersion("1.0.0")]
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/AssemblyInfo.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/AssemblyInfo.cs.meta
new file mode 100644
index 0000000..47de243
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/AssemblyInfo.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cc22cc13b69c1094c85e176c008b9ef8
+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/UnityEngine.TestRunner/Assertions.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions.meta
new file mode 100644
index 0000000..c1fd9d7
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1ad55f5ad04d1d045a1f287409c650dd
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs
new file mode 100644
index 0000000..d765cdb
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs
@@ -0,0 +1,83 @@
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Constraints;
+using UnityEngine.Profiling;
+
+namespace UnityEngine.TestTools.Constraints
+{
+ public class AllocatingGCMemoryConstraint : Constraint
+ {
+ private class AllocatingGCMemoryResult : ConstraintResult
+ {
+ private readonly int diff;
+ public AllocatingGCMemoryResult(IConstraint constraint, object actualValue, int diff) : base(constraint, actualValue, diff > 0)
+ {
+ this.diff = diff;
+ }
+
+ public override void WriteMessageTo(MessageWriter writer)
+ {
+ if (diff == 0)
+ writer.WriteMessageLine("The provided delegate did not make any GC allocations.");
+ else
+ writer.WriteMessageLine("The provided delegate made {0} GC allocation(s).", diff);
+ }
+ }
+
+ private ConstraintResult ApplyTo(Action action, object original)
+ {
+ var recorder = Recorder.Get("GC.Alloc");
+
+ // The recorder was created enabled, which means it captured the creation of the Recorder object itself, etc.
+ // Disabling it flushes its data, so that we can retrieve the sample block count and have it correctly account
+ // for these initial allocations.
+ recorder.enabled = false;
+
+#if !UNITY_WEBGL
+ recorder.FilterToCurrentThread();
+#endif
+
+ recorder.enabled = true;
+
+ try
+ {
+ action();
+ }
+ finally
+ {
+ recorder.enabled = false;
+#if !UNITY_WEBGL
+ recorder.CollectFromAllThreads();
+#endif
+ }
+
+ return new AllocatingGCMemoryResult(this, original, recorder.sampleBlockCount);
+ }
+
+ public override ConstraintResult ApplyTo(object obj)
+ {
+ if (obj == null)
+ throw new ArgumentNullException();
+
+ TestDelegate d = obj as TestDelegate;
+ if (d == null)
+ throw new ArgumentException(string.Format("The actual value must be a TestDelegate but was {0}",
+ obj.GetType()));
+
+ return ApplyTo(() => d.Invoke(), obj);
+ }
+
+ public override ConstraintResult ApplyTo<TActual>(ActualValueDelegate<TActual> del)
+ {
+ if (del == null)
+ throw new ArgumentNullException();
+
+ return ApplyTo(() => del.Invoke(), del);
+ }
+
+ public override string Description
+ {
+ get { return "allocates GC memory"; }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs.meta
new file mode 100644
index 0000000..e38d0b4
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/AllocatingGCMemoryConstraint.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d09858396dd7adb4bbdb22ea0c8c3a37
+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/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs
new file mode 100644
index 0000000..54b8e64
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs
@@ -0,0 +1,14 @@
+using NUnit.Framework.Constraints;
+
+namespace UnityEngine.TestTools.Constraints
+{
+ public static class ConstraintExtensions
+ {
+ public static AllocatingGCMemoryConstraint AllocatingGCMemory(this ConstraintExpression chain)
+ {
+ var constraint = new AllocatingGCMemoryConstraint();
+ chain.Append(constraint);
+ return constraint;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs.meta
new file mode 100644
index 0000000..b0fc061
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/ConstraintsExtensions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 68a48d1900320ed458e118415857faf6
+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/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs
new file mode 100644
index 0000000..b9c132b
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs
@@ -0,0 +1,18 @@
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestTools.TestRunner
+{
+ internal class InvalidSignatureException : ResultStateException
+ {
+ public InvalidSignatureException(string message)
+ : base(message)
+ {
+ }
+
+ public override ResultState ResultState
+ {
+ get { return ResultState.NotRunnable; }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs.meta
new file mode 100644
index 0000000..a995fcf
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/InvalidSignatureException.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9650d910fcaefb34cb45f121c1993892
+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/UnityEngine.TestRunner/Assertions/Is.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/Is.cs
new file mode 100644
index 0000000..4cdc715
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/Is.cs
@@ -0,0 +1,10 @@
+namespace UnityEngine.TestTools.Constraints
+{
+ public class Is : NUnit.Framework.Is
+ {
+ public static AllocatingGCMemoryConstraint AllocatingGCMemory()
+ {
+ return new AllocatingGCMemoryConstraint();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/Is.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/Is.cs.meta
new file mode 100644
index 0000000..636110b
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/Is.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6d5833966abeadb429de247e4316eef4
+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/UnityEngine.TestRunner/Assertions/LogAssert.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogAssert.cs
new file mode 100644
index 0000000..32900eb
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogAssert.cs
@@ -0,0 +1,39 @@
+using System.Text.RegularExpressions;
+using UnityEngine.TestTools.Logging;
+
+namespace UnityEngine.TestTools
+{
+ public static class LogAssert
+ {
+ public static void Expect(LogType type, string message)
+ {
+ LogScope.Current.ExpectedLogs.Enqueue(new LogMatch() { LogType = type, Message = message });
+ }
+
+ public static void Expect(LogType type, Regex message)
+ {
+ LogScope.Current.ExpectedLogs.Enqueue(new LogMatch() { LogType = type, MessageRegex = message });
+ }
+
+ public static void NoUnexpectedReceived()
+ {
+ LogScope.Current.NoUnexpectedReceived();
+ }
+
+ public static bool ignoreFailingMessages
+ {
+ get
+ {
+ return LogScope.Current.IgnoreFailingMessages;
+ }
+ set
+ {
+ if (value != LogScope.Current.IgnoreFailingMessages)
+ {
+ Debug.LogFormat(LogType.Log, LogOption.NoStacktrace, null, "\nIgnoreFailingMessages:" + (value? "true":"false"));
+ }
+ LogScope.Current.IgnoreFailingMessages = value;
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogAssert.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogAssert.cs.meta
new file mode 100644
index 0000000..222bb52
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogAssert.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c97b794b51780d349a16826a4c7898d7
+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/UnityEngine.TestRunner/Assertions/LogScope.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope.meta
new file mode 100644
index 0000000..a225ac0
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b1d8465ba1376b148bdab58965101f47
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs
new file mode 100644
index 0000000..efd00f7
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+
+namespace UnityEngine.TestTools.Logging
+{
+ internal interface ILogScope : IDisposable
+ {
+ Queue<LogMatch> ExpectedLogs { get; set; }
+ List<LogEvent> AllLogs { get; }
+ List<LogEvent> FailingLogs { get; }
+ bool IgnoreFailingMessages { get; set; }
+ bool IsNUnitException { get; }
+ bool IsNUnitSuccessException { get; }
+ bool IsNUnitInconclusiveException { get; }
+ bool IsNUnitIgnoreException { get; }
+ string NUnitExceptionMessage { get; }
+ void AddLog(string message, string stacktrace, LogType type);
+ bool AnyFailingLogs();
+ void ProcessExpectedLogs();
+ void NoUnexpectedReceived();
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs.meta
new file mode 100644
index 0000000..97b0e2c
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/ILogScope.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3504aa04cda851b44a65973f9aead6f7
+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/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs
new file mode 100644
index 0000000..49f58cb
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs
@@ -0,0 +1,18 @@
+namespace UnityEngine.TestTools.Logging
+{
+ internal class LogEvent
+ {
+ public string Message { get; set; }
+
+ public string StackTrace { get; set; }
+
+ public LogType LogType { get; set; }
+
+ public bool IsHandled { get; set; }
+
+ public override string ToString()
+ {
+ return string.Format("[{0}] {1}", LogType, Message);
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs.meta
new file mode 100644
index 0000000..1609325
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogEvent.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0c56471f08a0f6846afc792f0b4205b9
+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/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs
new file mode 100644
index 0000000..05df048
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Text.RegularExpressions;
+
+namespace UnityEngine.TestTools.Logging
+{
+ [Serializable]
+ internal class LogMatch
+ {
+ [SerializeField]
+ private bool m_UseRegex;
+ [SerializeField]
+ private string m_Message;
+ [SerializeField]
+ private string m_MessageRegex;
+ [SerializeField]
+ private string m_LogType;
+
+ public string Message
+ {
+ get { return m_Message; }
+ set
+ {
+ m_Message = value;
+ m_UseRegex = false;
+ }
+ }
+
+ public Regex MessageRegex
+ {
+ get
+ {
+ if (!m_UseRegex)
+ {
+ return null;
+ }
+
+ return new Regex(m_MessageRegex);
+ }
+ set
+ {
+ if (value != null)
+ {
+ m_MessageRegex = value.ToString();
+ m_UseRegex = true;
+ }
+ else
+ {
+ m_MessageRegex = null;
+ m_UseRegex = false;
+ }
+ }
+ }
+
+ public LogType? LogType
+ {
+ get
+ {
+ if (!string.IsNullOrEmpty(m_LogType))
+ {
+ return Enum.Parse(typeof(LogType), m_LogType) as LogType ? ;
+ }
+
+ return null;
+ }
+ set
+ {
+ if (value != null)
+ {
+ m_LogType = value.Value.ToString();
+ }
+ else
+ {
+ m_LogType = null;
+ }
+ }
+ }
+
+ public bool Matches(LogEvent log)
+ {
+ if (LogType != null && LogType != log.LogType)
+ {
+ return false;
+ }
+
+ if (m_UseRegex)
+ {
+ return MessageRegex.IsMatch(log.Message);
+ }
+ else
+ {
+ return Message.Equals(log.Message);
+ }
+ }
+
+ public override string ToString()
+ {
+ if (m_UseRegex)
+ return string.Format("[{0}] Regex: {1}", LogType, MessageRegex);
+ else
+ return string.Format("[{0}] {1}", LogType, Message);
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs.meta
new file mode 100644
index 0000000..12f2cf8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogMatch.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9945ffed4692c6044b6d3acf81efd694
+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/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs
new file mode 100644
index 0000000..6f429c9
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs
@@ -0,0 +1,223 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine.TestTools.TestRunner;
+
+namespace UnityEngine.TestTools.Logging
+{
+ sealed class LogScope : ILogScope
+ {
+ static List<LogScope> s_ActiveScopes = new List<LogScope>();
+
+ readonly object m_Lock = new object();
+ bool m_Disposed;
+ bool m_NeedToProcessLogs;
+
+ public Queue<LogMatch> ExpectedLogs { get; set; }
+ public List<LogEvent> AllLogs { get; }
+ public List<LogEvent> FailingLogs { get; }
+ public bool IgnoreFailingMessages { get; set; }
+ public bool IsNUnitException { get; private set; }
+ public bool IsNUnitSuccessException { get; private set; }
+ public bool IsNUnitInconclusiveException { get; private set; }
+ public bool IsNUnitIgnoreException { get; private set; }
+ public string NUnitExceptionMessage { get; private set; }
+
+ public static LogScope Current
+ {
+ get
+ {
+ if (s_ActiveScopes.Count == 0)
+ throw new InvalidOperationException("No log scope is available");
+ return s_ActiveScopes[0];
+ }
+ }
+
+ public static bool HasCurrentLogScope()
+ {
+ return s_ActiveScopes.Count > 0;
+ }
+
+ public LogScope()
+ {
+ AllLogs = new List<LogEvent>();
+ FailingLogs = new List<LogEvent>();
+ ExpectedLogs = new Queue<LogMatch>();
+ IgnoreFailingMessages = false;
+ Activate();
+ }
+
+ void Activate()
+ {
+ s_ActiveScopes.Insert(0, this);
+ RegisterScope(this);
+ Application.logMessageReceivedThreaded -= AddLog;
+ Application.logMessageReceivedThreaded += AddLog;
+ }
+
+ void Deactivate()
+ {
+ Application.logMessageReceivedThreaded -= AddLog;
+ s_ActiveScopes.Remove(this);
+ UnregisterScope(this);
+ }
+
+ static void RegisterScope(LogScope logScope)
+ {
+ Application.logMessageReceivedThreaded += logScope.AddLog;
+ }
+
+ static void UnregisterScope(LogScope logScope)
+ {
+ Application.logMessageReceivedThreaded -= logScope.AddLog;
+ }
+
+ public void AddLog(string message, string stacktrace, LogType type)
+ {
+ lock (m_Lock)
+ {
+ m_NeedToProcessLogs = true;
+ var log = new LogEvent
+ {
+ LogType = type,
+ Message = message,
+ StackTrace = stacktrace,
+ };
+
+ AllLogs.Add(log);
+
+ if (IsNUnitResultStateException(stacktrace, type))
+ {
+ if (message.StartsWith("SuccessException"))
+ {
+ IsNUnitException = true;
+ IsNUnitSuccessException = true;
+ if (message.StartsWith("SuccessException: "))
+ {
+ NUnitExceptionMessage = message.Substring("SuccessException: ".Length);
+ return;
+ }
+ }
+ else if (message.StartsWith("InconclusiveException"))
+ {
+ IsNUnitException = true;
+ IsNUnitInconclusiveException = true;
+ if (message.StartsWith("InconclusiveException: "))
+ {
+ NUnitExceptionMessage = message.Substring("InconclusiveException: ".Length);
+ return;
+ }
+ }
+ else if (message.StartsWith("IgnoreException"))
+ {
+ IsNUnitException = true;
+ IsNUnitIgnoreException = true;
+ if (message.StartsWith("IgnoreException: "))
+ {
+ NUnitExceptionMessage = message.Substring("IgnoreException: ".Length);
+ return;
+ }
+ }
+ }
+
+ if (IsFailingLog(type) && !IgnoreFailingMessages)
+ {
+ FailingLogs.Add(log);
+ }
+ }
+ }
+
+ static bool IsNUnitResultStateException(string stacktrace, LogType logType)
+ {
+ if (logType != LogType.Exception)
+ return false;
+
+ return string.IsNullOrEmpty(stacktrace) || stacktrace.StartsWith("NUnit.Framework.Assert.");
+ }
+
+ static bool IsFailingLog(LogType type)
+ {
+ switch (type)
+ {
+ case LogType.Assert:
+ case LogType.Error:
+ case LogType.Exception:
+ return true;
+ default:
+ return false;
+ }
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ void Dispose(bool disposing)
+ {
+ if (m_Disposed)
+ {
+ return;
+ }
+
+ m_Disposed = true;
+
+ if (disposing)
+ {
+ Deactivate();
+ }
+ }
+
+ public bool AnyFailingLogs()
+ {
+ ProcessExpectedLogs();
+ return FailingLogs.Any();
+ }
+
+ public void ProcessExpectedLogs()
+ {
+ lock (m_Lock)
+ {
+ if (!m_NeedToProcessLogs || !ExpectedLogs.Any())
+ return;
+
+ LogMatch expectedLog = null;
+ foreach (var logEvent in AllLogs)
+ {
+ if (!ExpectedLogs.Any())
+ break;
+ if (expectedLog == null && ExpectedLogs.Any())
+ expectedLog = ExpectedLogs.Peek();
+
+ if (expectedLog != null && expectedLog.Matches(logEvent))
+ {
+ ExpectedLogs.Dequeue();
+ logEvent.IsHandled = true;
+ if (FailingLogs.Any(expectedLog.Matches))
+ {
+ var failingLog = FailingLogs.First(expectedLog.Matches);
+ FailingLogs.Remove(failingLog);
+ }
+ expectedLog = null;
+ }
+ }
+ m_NeedToProcessLogs = false;
+ }
+ }
+
+ public void NoUnexpectedReceived()
+ {
+ lock (m_Lock)
+ {
+ ProcessExpectedLogs();
+
+ var unhandledLog = AllLogs.FirstOrDefault(x => !x.IsHandled);
+ if (unhandledLog != null)
+ {
+ throw new UnhandledLogMessageException(unhandledLog);
+ }
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs.meta
new file mode 100644
index 0000000..876c080
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/LogScope/LogScope.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4bbc17b35884fdf468e4b52ae4222882
+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/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs
new file mode 100644
index 0000000..4a491be
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs
@@ -0,0 +1,29 @@
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using UnityEngine.TestTools.Logging;
+
+namespace UnityEngine.TestTools.TestRunner
+{
+ internal class UnexpectedLogMessageException : ResultStateException
+ {
+ public LogMatch LogEvent;
+
+ public UnexpectedLogMessageException(LogMatch log)
+ : base(BuildMessage(log))
+ {
+ LogEvent = log;
+ }
+
+ private static string BuildMessage(LogMatch log)
+ {
+ return string.Format("Expected log did not appear: {0}", log);
+ }
+
+ public override ResultState ResultState
+ {
+ get { return ResultState.Failure; }
+ }
+
+ public override string StackTrace { get { return null; } }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs.meta
new file mode 100644
index 0000000..57673e2
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5b2eeca598284bd4abb4a15c30df1576
+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/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs
new file mode 100644
index 0000000..5a7ab33
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs
@@ -0,0 +1,35 @@
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using UnityEngine.TestTools.Logging;
+using UnityEngine.TestTools.Utils;
+
+namespace UnityEngine.TestTools.TestRunner
+{
+ internal class UnhandledLogMessageException : ResultStateException
+ {
+ public LogEvent LogEvent;
+ private readonly string m_CustomStackTrace;
+
+ public UnhandledLogMessageException(LogEvent log)
+ : base(BuildMessage(log))
+ {
+ LogEvent = log;
+ m_CustomStackTrace = StackTraceFilter.Filter(log.StackTrace);
+ }
+
+ private static string BuildMessage(LogEvent log)
+ {
+ return string.Format("Unhandled log message: '{0}'. Use UnityEngine.TestTools.LogAssert.Expect", log);
+ }
+
+ public override ResultState ResultState
+ {
+ get { return ResultState.Failure; }
+ }
+
+ public override string StackTrace
+ {
+ get { return m_CustomStackTrace; }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs.meta
new file mode 100644
index 0000000..6394a8d
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnhandledLogMessageException.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a8ed4063f2beecd41a234a582202f3c4
+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/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs
new file mode 100644
index 0000000..56566d7
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs
@@ -0,0 +1,28 @@
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestTools.TestRunner
+{
+ internal class UnityTestTimeoutException : ResultStateException
+ {
+ public UnityTestTimeoutException(int timeout)
+ : base(BuildMessage(timeout))
+ {
+ }
+
+ private static string BuildMessage(int timeout)
+ {
+ return string.Format("UnityTest exceeded Timeout value of {0}ms", timeout);
+ }
+
+ public override ResultState ResultState
+ {
+ get { return ResultState.Failure; }
+ }
+
+ public override string StackTrace
+ {
+ get { return ""; }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs.meta
new file mode 100644
index 0000000..188de19
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Assertions/UnityTestTimeoutException.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ffb335140c799c4408411d81789fb05c
+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/UnityEngine.TestRunner/NUnitExtensions.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions.meta
new file mode 100644
index 0000000..ac6f127
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 3e8d6af343b383544ba5743d119f4062
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs
new file mode 100644
index 0000000..d13a7e0
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs
@@ -0,0 +1,79 @@
+using System;
+using System.Linq;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+using UnityEngine.TestTools.Logging;
+using UnityEngine.TestTools.TestRunner;
+
+namespace UnityEngine.TestTools.NUnitExtensions
+{
+ /// <summary>
+ /// This class delegates actions from the NUnit thread that should be executed on the main thread.
+ /// NUnit thread calls Delegate which blocks the execution on the thread until the action is executed.
+ /// The main thread will poll for awaiting actions (HasAction) and invoke them (Execute).
+ /// Once the action is executed, the main thread releases the lock and executino on the NUnit thread is continued.
+ /// </summary>
+ internal class ActionDelegator : BaseDelegator
+ {
+ private Func<object> m_Action;
+ public object Delegate(Action action)
+ {
+ return Delegate(() => { action(); return null; });
+ }
+
+ public object Delegate(Func<object> action)
+ {
+ if (m_Aborted)
+ {
+ return null;
+ }
+
+ AssertState();
+ m_Context = UnityTestExecutionContext.CurrentContext;
+
+ m_Signal.Reset();
+ m_Action = action;
+
+ WaitForSignal();
+
+ return HandleResult();
+ }
+
+ private void AssertState()
+ {
+ if (m_Action != null)
+ {
+ throw new Exception("Action not executed yet");
+ }
+ }
+
+ public bool HasAction()
+ {
+ return m_Action != null;
+ }
+
+ public void Execute(LogScope logScope)
+ {
+ try
+ {
+ SetCurrentTestContext();
+ m_Result = m_Action();
+ if (logScope.AnyFailingLogs())
+ {
+ var failingLog = logScope.FailingLogs.First();
+ throw new UnhandledLogMessageException(failingLog);
+ }
+ if (logScope.ExpectedLogs.Any())
+ throw new UnexpectedLogMessageException(LogScope.Current.ExpectedLogs.Peek());
+ }
+ catch (Exception e)
+ {
+ m_Exception = e;
+ }
+ finally
+ {
+ m_Action = null;
+ m_Signal.Set();
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs.meta
new file mode 100644
index 0000000..4800886
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ActionDelegator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4f939b9e23a0946439b812551e07ac81
+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/UnityEngine.TestRunner/NUnitExtensions/Attributes.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes.meta
new file mode 100644
index 0000000..d2d34f6
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0cb14878543cf3d4f8472b15f7ecf0e3
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs
new file mode 100644
index 0000000..3cf9714
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs
@@ -0,0 +1,36 @@
+using System.Collections.Generic;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestTools
+{
+ public class ConditionalIgnoreAttribute : NUnitAttribute, IApplyToTest
+ {
+ string m_ConditionKey;
+ string m_IgnoreReason;
+
+ public ConditionalIgnoreAttribute(string conditionKey, string ignoreReason)
+ {
+ m_ConditionKey = conditionKey;
+ m_IgnoreReason = ignoreReason;
+ }
+
+ public void ApplyToTest(Test test)
+ {
+ var key = m_ConditionKey.ToLowerInvariant();
+ if (m_ConditionMap.ContainsKey(key) && m_ConditionMap[key])
+ {
+ test.RunState = RunState.Ignored;
+ string skipReason = string.Format(m_IgnoreReason);
+ test.Properties.Add(PropertyNames.SkipReason, skipReason);
+ }
+ }
+
+ static Dictionary<string, bool> m_ConditionMap = new Dictionary<string, bool>();
+ public static void AddConditionalIgnoreMapping(string key, bool value)
+ {
+ m_ConditionMap.Add(key.ToLowerInvariant(), value);
+ }
+ }
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs.meta
new file mode 100644
index 0000000..b1601ee
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/ConditionalIgnoreAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c82a8473f4a8f7b42a004c91e06d2f2b
+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/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs
new file mode 100644
index 0000000..18bb46c
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Collections;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestTools
+{
+ internal class TestEnumerator
+ {
+ private readonly ITestExecutionContext m_Context;
+ private static IEnumerator m_TestEnumerator;
+
+ public static IEnumerator Enumerator { get { return m_TestEnumerator; } }
+
+ public TestEnumerator(ITestExecutionContext context, IEnumerator testEnumerator)
+ {
+ m_Context = context;
+ m_TestEnumerator = testEnumerator;
+ }
+
+ public IEnumerator Execute()
+ {
+ m_Context.CurrentResult.SetResult(ResultState.Success);
+
+ while (true)
+ {
+ object current = null;
+ try
+ {
+ if (!m_TestEnumerator.MoveNext())
+ {
+ yield break;
+ }
+
+ if (!m_Context.CurrentResult.ResultState.Equals(ResultState.Success))
+ {
+ yield break;
+ }
+
+ current = m_TestEnumerator.Current;
+ }
+ catch (Exception exception)
+ {
+ m_Context.CurrentResult.RecordException(exception);
+ yield break;
+ }
+ yield return current;
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs.meta
new file mode 100644
index 0000000..3a6022e
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestEnumerator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 750aad009559b814dbc27001341fc1c3
+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/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs
new file mode 100644
index 0000000..8f2ea0f
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs
@@ -0,0 +1,28 @@
+using System;
+
+namespace UnityEngine.TestTools
+{
+ /// <summary>
+ /// The presence of this attribute will cause the test runner to require that every single log is expected. By
+ /// default, the runner will only automatically fail on any error logs, so this adds warnings and infos as well.
+ /// It is the same as calling `LogAssert.NoUnexpectedReceived()` at the bottom of every affected test.
+ ///
+ /// This attribute can be applied to test assemblies (will affect every test in the assembly), fixtures (will
+ /// affect every test in the fixture), or on individual test methods. It is also automatically inherited from base
+ /// fixtures.
+ ///
+ /// The MustExpect property (on by default) lets you selectively enable or disable the higher level value. For
+ /// example when migrating an assembly to this more strict checking method, you might attach
+ /// `[assembly:TestMustExpectAllLogs]` to the assembly itself, but then whitelist failing fixtures and test methods
+ /// with `[TestMustExpectAllLogs(MustExpect=false)]` until they can be migrated. This also means new tests in that
+ /// assembly would be required to have the more strict checking.
+ /// </summary>
+ [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
+ public class TestMustExpectAllLogsAttribute : Attribute
+ {
+ public TestMustExpectAllLogsAttribute(bool mustExpect = true)
+ => MustExpect = mustExpect;
+
+ public bool MustExpect { get; }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs.meta
new file mode 100644
index 0000000..6ae8514
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/TestMustExpectAllLogsAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3803f736886e77842995ddbc3531afaa
+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/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs
new file mode 100644
index 0000000..144f78c
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs
@@ -0,0 +1,20 @@
+using System.Collections;
+using System.Collections.Generic;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal.Builders;
+
+namespace UnityEngine.TestTools
+{
+ internal class UnityCombinatorialStrategy : CombinatorialStrategy, ICombiningStrategy
+ {
+ public new IEnumerable<ITestCaseData> GetTestCases(IEnumerable[] sources)
+ {
+ var testCases = base.GetTestCases(sources);
+ foreach (var testCase in testCases)
+ {
+ testCase.GetType().GetProperty("ExpectedResult").SetValue(testCase, new object(), null);
+ }
+ return testCases;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs.meta
new file mode 100644
index 0000000..422dd17
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityCombinatorialStrategy.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7af6ac3e6b51b8d4aab04adc85b8de2f
+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/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs
new file mode 100644
index 0000000..68f7816
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestTools
+{
+ [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = false)]
+ public class UnityPlatformAttribute : NUnitAttribute, IApplyToTest
+ {
+ public RuntimePlatform[] include { get; set; }
+ public RuntimePlatform[] exclude { get; set; }
+
+ private string m_skippedReason;
+
+ public UnityPlatformAttribute()
+ {
+ include = new List<RuntimePlatform>().ToArray();
+ exclude = new List<RuntimePlatform>().ToArray();
+ }
+
+ public UnityPlatformAttribute(params RuntimePlatform[] include)
+ : this()
+ {
+ this.include = include;
+ }
+
+ public void ApplyToTest(Test test)
+ {
+ if (test.RunState == RunState.NotRunnable || test.RunState == RunState.Ignored || IsPlatformSupported(Application.platform))
+ {
+ return;
+ }
+ test.RunState = RunState.Skipped;
+ test.Properties.Add("_SKIPREASON", m_skippedReason);
+ }
+
+ internal bool IsPlatformSupported(RuntimePlatform testTargetPlatform)
+ {
+ if (include.Any() && !include.Any(x => x == testTargetPlatform))
+ {
+ m_skippedReason = string.Format("Only supported on {0}", string.Join(", ", include.Select(x => x.ToString()).ToArray()));
+ return false;
+ }
+
+ if (exclude.Any(x => x == testTargetPlatform))
+ {
+ m_skippedReason = string.Format("Not supported on {0}", string.Join(", ", include.Select(x => x.ToString()).ToArray()));
+ return false;
+ }
+ return true;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs.meta
new file mode 100644
index 0000000..bb41d89
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityPlatformAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5440c1153b397e14c9c7b1d6eb83b9f9
+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/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs
new file mode 100644
index 0000000..cdb8a82
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs
@@ -0,0 +1,10 @@
+using System;
+using NUnit.Framework;
+
+namespace UnityEngine.TestTools
+{
+ [AttributeUsage(AttributeTargets.Method)]
+ public class UnitySetUpAttribute : NUnitAttribute
+ {
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs.meta
new file mode 100644
index 0000000..1668931
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnitySetUpAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cc6401f13df54ba44bfd7cdc93c7d64d
+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/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs
new file mode 100644
index 0000000..d159d39
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs
@@ -0,0 +1,10 @@
+using System;
+using NUnit.Framework;
+
+namespace UnityEngine.TestTools
+{
+ [AttributeUsage(AttributeTargets.Method)]
+ public class UnityTearDownAttribute : NUnitAttribute
+ {
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs.meta
new file mode 100644
index 0000000..169eefb
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTearDownAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 600f4b74746dbf944901257f81a8af6d
+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/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs
new file mode 100644
index 0000000..5d2b5f1
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs
@@ -0,0 +1,33 @@
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Builders;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools
+{
+ [AttributeUsage(AttributeTargets.Method)]
+ public class UnityTestAttribute : CombiningStrategyAttribute, ISimpleTestBuilder, IImplyFixture
+ {
+ public UnityTestAttribute() : base(new UnityCombinatorialStrategy(), new ParameterDataSourceProvider()) {}
+
+ private readonly NUnitTestCaseBuilder _builder = new NUnitTestCaseBuilder();
+
+ TestMethod ISimpleTestBuilder.BuildFrom(IMethodInfo method, Test suite)
+ {
+ TestCaseParameters parms = new TestCaseParameters
+ {
+ ExpectedResult = new object(),
+ HasExpectedResult = true
+ };
+
+ var t = _builder.BuildTestMethod(method, suite, parms);
+
+ if (t.parms != null)
+ t.parms.HasExpectedResult = false;
+ return t;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs.meta
new file mode 100644
index 0000000..a7572d4
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Attributes/UnityTestAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fedb0f9e5006b1943abae52f52f08a1a
+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/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs
new file mode 100644
index 0000000..596c000
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs
@@ -0,0 +1,58 @@
+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);
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs.meta
new file mode 100644
index 0000000..3c1a81a
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/BaseDelegator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 37cea569bfefafe49a1513c4d7f0e9eb
+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/UnityEngine.TestRunner/NUnitExtensions/Commands.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands.meta
new file mode 100644
index 0000000..3d3cf4a
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 6b72875690e0f7343911e06af3145bd5
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs
new file mode 100644
index 0000000..aef740a
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs
@@ -0,0 +1,196 @@
+using System;
+using System.Collections;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestRunner.NUnitExtensions;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+using UnityEngine.TestTools.Logging;
+using UnityEngine.TestTools.TestRunner;
+
+namespace UnityEngine.TestTools
+{
+ internal abstract class BeforeAfterTestCommandBase<T> : DelegatingTestCommand, IEnumerableTestMethodCommand
+ {
+ private string m_BeforeErrorPrefix;
+ private string m_AfterErrorPrefix;
+ private bool m_SkipYieldAfterActions;
+ protected BeforeAfterTestCommandBase(TestCommand innerCommand, string beforeErrorPrefix, string afterErrorPrefix, bool skipYieldAfterActions = false)
+ : base(innerCommand)
+ {
+ m_BeforeErrorPrefix = beforeErrorPrefix;
+ m_AfterErrorPrefix = afterErrorPrefix;
+ m_SkipYieldAfterActions = skipYieldAfterActions;
+ }
+
+ protected T[] BeforeActions = new T[0];
+
+ protected T[] AfterActions = new T[0];
+
+ protected abstract IEnumerator InvokeBefore(T action, Test test, UnityTestExecutionContext context);
+
+ protected abstract IEnumerator InvokeAfter(T action, Test test, UnityTestExecutionContext context);
+
+ protected abstract BeforeAfterTestCommandState GetState(UnityTestExecutionContext context);
+
+ public IEnumerable ExecuteEnumerable(ITestExecutionContext context)
+ {
+ var unityContext = (UnityTestExecutionContext)context;
+ var state = GetState(unityContext);
+
+ if (state == null)
+ {
+ // We do not expect a state to exist in playmode
+ state = ScriptableObject.CreateInstance<BeforeAfterTestCommandState>();
+ }
+
+ state.ApplyTestResult(context.CurrentResult);
+
+ while (state.NextBeforeStepIndex < BeforeActions.Length)
+ {
+ var action = BeforeActions[state.NextBeforeStepIndex];
+ var enumerator = InvokeBefore(action, Test, unityContext);
+ ActivePcHelper.SetEnumeratorPC(enumerator, state.NextBeforeStepPc);
+
+ using (var logScope = new LogScope())
+ {
+ while (true)
+ {
+ try
+ {
+ if (!enumerator.MoveNext())
+ {
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ state.TestHasRun = true;
+ context.CurrentResult.RecordPrefixedException(m_BeforeErrorPrefix, ex);
+ state.StoreTestResult(context.CurrentResult);
+ break;
+ }
+
+ state.NextBeforeStepPc = ActivePcHelper.GetEnumeratorPC(enumerator);
+ state.StoreTestResult(context.CurrentResult);
+ if (m_SkipYieldAfterActions)
+ {
+ break;
+ }
+ else
+ {
+ yield return enumerator.Current;
+ }
+ }
+
+ if (logScope.AnyFailingLogs())
+ {
+ state.TestHasRun = true;
+ context.CurrentResult.RecordPrefixedError(m_BeforeErrorPrefix, new UnhandledLogMessageException(logScope.FailingLogs.First()).Message);
+ state.StoreTestResult(context.CurrentResult);
+ }
+ }
+
+ state.NextBeforeStepIndex++;
+ state.NextBeforeStepPc = 0;
+ }
+
+ if (!state.TestHasRun)
+ {
+ if (innerCommand is IEnumerableTestMethodCommand)
+ {
+ var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context);
+ foreach (var iterator in executeEnumerable)
+ {
+ state.StoreTestResult(context.CurrentResult);
+ yield return iterator;
+ }
+ }
+ else
+ {
+ context.CurrentResult = innerCommand.Execute(context);
+ state.StoreTestResult(context.CurrentResult);
+ }
+
+ state.TestHasRun = true;
+ }
+
+ while (state.NextAfterStepIndex < AfterActions.Length)
+ {
+ state.TestAfterStarted = true;
+ var action = AfterActions[state.NextAfterStepIndex];
+ var enumerator = InvokeAfter(action, Test, unityContext);
+ ActivePcHelper.SetEnumeratorPC(enumerator, state.NextAfterStepPc);
+
+ using (var logScope = new LogScope())
+ {
+ while (true)
+ {
+ try
+ {
+ if (!enumerator.MoveNext())
+ {
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ context.CurrentResult.RecordPrefixedException(m_AfterErrorPrefix, ex);
+ state.StoreTestResult(context.CurrentResult);
+ break;
+ }
+
+ state.NextAfterStepPc = ActivePcHelper.GetEnumeratorPC(enumerator);
+ state.StoreTestResult(context.CurrentResult);
+
+ if (m_SkipYieldAfterActions)
+ {
+ break;
+ }
+ else
+ {
+ yield return enumerator.Current;
+ }
+ }
+
+ if (logScope.AnyFailingLogs())
+ {
+ state.TestHasRun = true;
+ context.CurrentResult.RecordPrefixedError(m_AfterErrorPrefix, new UnhandledLogMessageException(logScope.FailingLogs.First()).Message);
+ state.StoreTestResult(context.CurrentResult);
+ }
+ }
+
+ state.NextAfterStepIndex++;
+ state.NextAfterStepPc = 0;
+ }
+
+ state.Reset();
+ }
+
+ public override TestResult Execute(ITestExecutionContext context)
+ {
+ throw new NotImplementedException("Use ExecuteEnumerable");
+ }
+
+ private static TestCommandPcHelper pcHelper;
+
+ internal static TestCommandPcHelper ActivePcHelper
+ {
+ get
+ {
+ if (pcHelper == null)
+ {
+ pcHelper = new TestCommandPcHelper();
+ }
+
+ return pcHelper;
+ }
+ set
+ {
+ pcHelper = value;
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs.meta
new file mode 100644
index 0000000..21b2681
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: cbbca1d8a0434be4bbc7f165523763ac
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs
new file mode 100644
index 0000000..daed396
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs
@@ -0,0 +1,49 @@
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestTools
+{
+ internal class BeforeAfterTestCommandState : ScriptableObject
+ {
+ public int NextBeforeStepIndex;
+ public int NextBeforeStepPc;
+ public int NextAfterStepIndex;
+ public int NextAfterStepPc;
+ public bool TestHasRun;
+ public TestStatus CurrentTestResultStatus;
+ public string CurrentTestResultLabel;
+ public FailureSite CurrentTestResultSite;
+ public string CurrentTestMessage;
+ public string CurrentTestStrackTrace;
+ public bool TestAfterStarted;
+
+ public void Reset()
+ {
+ NextBeforeStepIndex = 0;
+ NextBeforeStepPc = 0;
+ NextAfterStepIndex = 0;
+ NextAfterStepPc = 0;
+ TestHasRun = false;
+ CurrentTestResultStatus = TestStatus.Inconclusive;
+ CurrentTestResultLabel = null;
+ CurrentTestResultSite = default(FailureSite);
+ CurrentTestMessage = null;
+ CurrentTestStrackTrace = null;
+ TestAfterStarted = false;
+ }
+
+ public void StoreTestResult(TestResult result)
+ {
+ CurrentTestResultStatus = result.ResultState.Status;
+ CurrentTestResultLabel = result.ResultState.Label;
+ CurrentTestResultSite = result.ResultState.Site;
+ CurrentTestMessage = result.Message;
+ CurrentTestStrackTrace = result.StackTrace;
+ }
+
+ public void ApplyTestResult(TestResult result)
+ {
+ result.SetResult(new ResultState(CurrentTestResultStatus, CurrentTestResultLabel, CurrentTestResultSite), CurrentTestMessage, CurrentTestStrackTrace);
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs.meta
new file mode 100644
index 0000000..8e304ac
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandState.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7f65567c9026afb4db5de3355accc636
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs
new file mode 100644
index 0000000..81a672a
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs
@@ -0,0 +1,34 @@
+
+using System.Collections;
+using System.Collections.Generic;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools
+{
+ internal class EnumerableApplyChangesToContextCommand : ApplyChangesToContextCommand, IEnumerableTestMethodCommand
+ {
+ public EnumerableApplyChangesToContextCommand(TestCommand innerCommand, IEnumerable<IApplyToContext> changes)
+ : base(innerCommand, changes) { }
+
+ public IEnumerable ExecuteEnumerable(ITestExecutionContext context)
+ {
+ ApplyChanges(context);
+
+ if (innerCommand is IEnumerableTestMethodCommand)
+ {
+ var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context);
+ foreach (var iterator in executeEnumerable)
+ {
+ yield return iterator;
+ }
+ }
+ else
+ {
+ context.CurrentResult = innerCommand.Execute(context);
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs.meta
new file mode 100644
index 0000000..f652088
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableApplyChangesToContextCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3b4429eff9fcffb48b006e8edcc90338
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs
new file mode 100644
index 0000000..a692d78
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Collections;
+using System.Reflection;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools
+{
+ internal class EnumerableRepeatedTestCommand : DelegatingTestCommand, IEnumerableTestMethodCommand
+ {
+ private int repeatCount;
+
+ public EnumerableRepeatedTestCommand(RepeatAttribute.RepeatedTestCommand commandToReplace) : base(commandToReplace.GetInnerCommand())
+ {
+ repeatCount = (int) typeof(RepeatAttribute.RepeatedTestCommand)
+ .GetField("repeatCount", BindingFlags.NonPublic | BindingFlags.Instance)
+ .GetValue(commandToReplace);
+ }
+
+ public override TestResult Execute(ITestExecutionContext context)
+ {
+ throw new NotImplementedException("Use ExecuteEnumerable");
+ }
+
+ public IEnumerable ExecuteEnumerable(ITestExecutionContext context)
+ {
+ var unityContext = (UnityTestExecutionContext)context;
+ int count = unityContext.EnumerableRepeatedTestState;
+
+ while (count < repeatCount)
+ {
+ count++;
+ unityContext.EnumerableRepeatedTestState = count;
+
+ if (innerCommand is IEnumerableTestMethodCommand)
+ {
+ var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context);
+ foreach (var iterator in executeEnumerable)
+ {
+ yield return iterator;
+ }
+ }
+ else
+ {
+ context.CurrentResult = innerCommand.Execute(context);
+ }
+
+ if (context.CurrentResult.ResultState != ResultState.Success)
+ {
+ break;
+ }
+ }
+
+ unityContext.EnumerableRepeatedTestState = 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs.meta
new file mode 100644
index 0000000..121fb18
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRepeatedTestCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e273462feb9a65948826739f683cc9a9
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs
new file mode 100644
index 0000000..2dbe145
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs
@@ -0,0 +1,60 @@
+using System;
+using System.Collections;
+using System.Reflection;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools
+{
+ internal class EnumerableRetryTestCommand : DelegatingTestCommand, IEnumerableTestMethodCommand
+ {
+ private int retryCount;
+
+ public EnumerableRetryTestCommand(RetryAttribute.RetryCommand commandToReplace) : base(commandToReplace.GetInnerCommand())
+ {
+ retryCount = (int) typeof(RetryAttribute.RetryCommand)
+ .GetField("_retryCount", BindingFlags.NonPublic | BindingFlags.Instance)
+ .GetValue(commandToReplace);
+ }
+
+ public override TestResult Execute(ITestExecutionContext context)
+ {
+ throw new NotImplementedException("Use ExecuteEnumerable");
+ }
+
+ public IEnumerable ExecuteEnumerable(ITestExecutionContext context)
+ {
+ var unityContext = (UnityTestExecutionContext)context;
+ int count = unityContext.EnumerableRetryTestState;
+
+ while (count < retryCount)
+ {
+ count++;
+ unityContext.EnumerableRetryTestState = count;
+
+ if (innerCommand is IEnumerableTestMethodCommand)
+ {
+ var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context);
+ foreach (var iterator in executeEnumerable)
+ {
+ yield return iterator;
+ }
+ }
+ else
+ {
+ context.CurrentResult = innerCommand.Execute(context);
+ }
+
+ if (context.CurrentResult.ResultState != ResultState.Failure)
+ {
+ break;
+ }
+ }
+
+ unityContext.EnumerableRetryTestState = 0;
+ }
+ }
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs.meta
new file mode 100644
index 0000000..da1781c
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableRetryTestCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6de2f178a24cd2e48a0816cacd9a0583
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs
new file mode 100644
index 0000000..e4010c0
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections;
+using System.Linq;
+using System.Reflection;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools
+{
+ internal class EnumerableSetUpTearDownCommand : BeforeAfterTestCommandBase<MethodInfo>
+ {
+ public EnumerableSetUpTearDownCommand(TestCommand innerCommand)
+ : base(innerCommand, "SetUp", "TearDown")
+ {
+ if (Test.TypeInfo.Type != null)
+ {
+ BeforeActions = GetMethodsWithAttributeFromFixture(Test.TypeInfo.Type, typeof(UnitySetUpAttribute));
+ AfterActions = GetMethodsWithAttributeFromFixture(Test.TypeInfo.Type, typeof(UnityTearDownAttribute)).Reverse().ToArray();
+ }
+ }
+
+ private static MethodInfo[] GetMethodsWithAttributeFromFixture(Type fixtureType, Type setUpType)
+ {
+ MethodInfo[] methodsWithAttribute = Reflect.GetMethodsWithAttribute(fixtureType, setUpType, true);
+ return methodsWithAttribute.Where(x => x.ReturnType == typeof(IEnumerator)).ToArray();
+ }
+
+ protected override IEnumerator InvokeBefore(MethodInfo action, Test test, UnityTestExecutionContext context)
+ {
+ return (IEnumerator)Reflect.InvokeMethod(action, context.TestObject);
+ }
+
+ protected override IEnumerator InvokeAfter(MethodInfo action, Test test, UnityTestExecutionContext context)
+ {
+ return (IEnumerator)Reflect.InvokeMethod(action, context.TestObject);
+ }
+
+ protected override BeforeAfterTestCommandState GetState(UnityTestExecutionContext context)
+ {
+ return context.SetUpTearDownState;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs.meta
new file mode 100644
index 0000000..2d1f6b7
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableSetUpTearDownCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dd85a35169d313840a0874aea1a28629
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs
new file mode 100644
index 0000000..17be307
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs
@@ -0,0 +1,86 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Internal.Execution;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+using UnityEngine.TestTools.TestRunner;
+
+namespace UnityEngine.TestTools
+{
+ internal class EnumerableTestMethodCommand : TestCommand, IEnumerableTestMethodCommand
+ {
+ private readonly TestMethod testMethod;
+
+ public EnumerableTestMethodCommand(TestMethod testMethod)
+ : base(testMethod)
+ {
+ this.testMethod = testMethod;
+ }
+
+ public IEnumerable ExecuteEnumerable(ITestExecutionContext context)
+ {
+ yield return null;
+
+ var currentExecutingTestEnumerator = new TestEnumeratorWrapper(testMethod).GetEnumerator(context);
+ if (currentExecutingTestEnumerator != null)
+ {
+ var testEnumeraterYieldInstruction = new TestEnumerator(context, currentExecutingTestEnumerator);
+
+ yield return testEnumeraterYieldInstruction;
+
+ var enumerator = testEnumeraterYieldInstruction.Execute();
+
+ var executingEnumerator = ExecuteEnumerableAndRecordExceptions(enumerator, context);
+ while (executingEnumerator.MoveNext())
+ {
+ yield return executingEnumerator.Current;
+ }
+ }
+ else
+ {
+ if (context.CurrentResult.ResultState != ResultState.Ignored)
+ {
+ context.CurrentResult.SetResult(ResultState.Success);
+ }
+ }
+ }
+
+ private static IEnumerator ExecuteEnumerableAndRecordExceptions(IEnumerator enumerator, ITestExecutionContext context)
+ {
+ while (true)
+ {
+ try
+ {
+ if (!enumerator.MoveNext())
+ {
+ break;
+ }
+ }
+ catch (Exception ex)
+ {
+ context.CurrentResult.RecordException(ex);
+ break;
+ }
+
+ if (enumerator.Current is IEnumerator)
+ {
+ var current = (IEnumerator)enumerator.Current;
+ yield return ExecuteEnumerableAndRecordExceptions(current, context);
+ }
+ else
+ {
+ yield return enumerator.Current;
+ }
+ }
+ }
+
+ public override TestResult Execute(ITestExecutionContext context)
+ {
+ throw new NotImplementedException("Use ExecuteEnumerable");
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs.meta
new file mode 100644
index 0000000..d9b61f0
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/EnumerableTestMethodCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 19a6f000f81e24c4a826c1abd43e77c7
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs
new file mode 100644
index 0000000..a50a95e
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs
@@ -0,0 +1,32 @@
+using System;
+using System.Collections;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools
+{
+ internal class ImmediateEnumerableCommand : DelegatingTestCommand
+ {
+ public ImmediateEnumerableCommand(TestCommand innerCommand)
+ : base(innerCommand) { }
+
+ public override TestResult Execute(ITestExecutionContext context)
+ {
+ if (innerCommand is IEnumerableTestMethodCommand)
+ {
+ var executeEnumerable = ((IEnumerableTestMethodCommand)innerCommand).ExecuteEnumerable(context);
+ foreach (var iterator in executeEnumerable)
+ {
+ if (iterator != null)
+ {
+ throw new Exception("Only null can be yielded at this point.");
+ }
+ }
+ return context.CurrentResult;
+ }
+
+ return innerCommand.Execute(context);
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs.meta
new file mode 100644
index 0000000..ec993f6
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/ImmediateEnumerableCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8349e42a2b30c7a4abd8678c203428ba
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs
new file mode 100644
index 0000000..34c2d21
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs
@@ -0,0 +1,49 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Reflection;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools
+{
+ internal class OuterUnityTestActionCommand : BeforeAfterTestCommandBase<IOuterUnityTestAction>
+ {
+ public OuterUnityTestActionCommand(TestCommand innerCommand)
+ : base(innerCommand, "BeforeTest", "AfterTest")
+ {
+ if (Test.TypeInfo.Type != null)
+ {
+ BeforeActions = GetUnityTestActionsFromMethod(Test.Method.MethodInfo);
+ AfterActions = BeforeActions;
+ }
+ }
+
+ private static IOuterUnityTestAction[] GetUnityTestActionsFromMethod(MethodInfo method)
+ {
+ var attributes = method.GetCustomAttributes(false);
+ List<IOuterUnityTestAction> actions = new List<IOuterUnityTestAction>();
+ foreach (var attribute in attributes)
+ {
+ if (attribute is IOuterUnityTestAction)
+ actions.Add(attribute as IOuterUnityTestAction);
+ }
+ return actions.ToArray();
+ }
+
+ protected override IEnumerator InvokeBefore(IOuterUnityTestAction action, Test test, UnityTestExecutionContext context)
+ {
+ return action.BeforeTest(test);
+ }
+
+ protected override IEnumerator InvokeAfter(IOuterUnityTestAction action, Test test, UnityTestExecutionContext context)
+ {
+ return action.AfterTest(test);
+ }
+
+ protected override BeforeAfterTestCommandState GetState(UnityTestExecutionContext context)
+ {
+ return context.OuterUnityTestActionState;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs.meta
new file mode 100644
index 0000000..321a388
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/OuterUnityTestActionCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 0d4fc309a0784294c8ab658b53b12320
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs
new file mode 100644
index 0000000..b0f96cc
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs
@@ -0,0 +1,48 @@
+using System;
+using System.Collections;
+using System.Linq;
+using System.Reflection;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Internal.Execution;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools
+{
+ internal class SetUpTearDownCommand : BeforeAfterTestCommandBase<MethodInfo>
+ {
+ public SetUpTearDownCommand(TestCommand innerCommand)
+ : base(innerCommand, "SetUp", "TearDown", true)
+ {
+ if (Test.TypeInfo.Type != null)
+ {
+ BeforeActions = GetMethodsWithAttributeFromFixture(Test.TypeInfo.Type, typeof(SetUpAttribute));
+ AfterActions = GetMethodsWithAttributeFromFixture(Test.TypeInfo.Type, typeof(TearDownAttribute)).Reverse().ToArray();
+ }
+ }
+
+ private static MethodInfo[] GetMethodsWithAttributeFromFixture(Type fixtureType, Type setUpType)
+ {
+ MethodInfo[] methodsWithAttribute = Reflect.GetMethodsWithAttribute(fixtureType, setUpType, true);
+ return methodsWithAttribute.Where(x => x.ReturnType == typeof(void)).ToArray();
+ }
+
+ protected override IEnumerator InvokeBefore(MethodInfo action, Test test, UnityTestExecutionContext context)
+ {
+ Reflect.InvokeMethod(action, context.TestObject);
+ yield return null;
+ }
+
+ protected override IEnumerator InvokeAfter(MethodInfo action, Test test, UnityTestExecutionContext context)
+ {
+ Reflect.InvokeMethod(action, context.TestObject);
+ yield return null;
+ }
+
+ protected override BeforeAfterTestCommandState GetState(UnityTestExecutionContext context)
+ {
+ return null;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs.meta
new file mode 100644
index 0000000..fbcea8b
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/SetUpTearDownCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: e0db3f3921670cd4ca2e925737c3fba4
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs
new file mode 100644
index 0000000..2b08fe1
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs
@@ -0,0 +1,53 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Reflection;
+using NUnit.Framework;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools
+{
+ internal class TestActionCommand : BeforeAfterTestCommandBase<ITestAction>
+ {
+ public TestActionCommand(TestCommand innerCommand)
+ : base(innerCommand, "BeforeTest", "AfterTest", true)
+ {
+ if (Test.TypeInfo.Type != null)
+ {
+ BeforeActions = GetTestActionsFromMethod(Test.Method.MethodInfo);
+ AfterActions = BeforeActions;
+ }
+ }
+
+ private static ITestAction[] GetTestActionsFromMethod(MethodInfo method)
+ {
+ var attributes = method.GetCustomAttributes(false);
+ List<ITestAction> actions = new List<ITestAction>();
+ foreach (var attribute in attributes)
+ {
+ if (attribute is ITestAction)
+ actions.Add(attribute as ITestAction);
+ }
+ return actions.ToArray();
+ }
+
+ protected override IEnumerator InvokeBefore(ITestAction action, Test test, UnityTestExecutionContext context)
+ {
+ action.BeforeTest(test);
+ yield return null;
+ }
+
+ protected override IEnumerator InvokeAfter(ITestAction action, Test test, UnityTestExecutionContext context)
+ {
+ action.AfterTest(test);
+ yield return null;
+ }
+
+ protected override BeforeAfterTestCommandState GetState(UnityTestExecutionContext context)
+ {
+ return null;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs.meta
new file mode 100644
index 0000000..0349788
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestActionCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2de8ba3b840049641897e0da7ce1d5cd
+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/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs
new file mode 100644
index 0000000..62dc806
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections;
+
+namespace UnityEngine.TestTools
+{
+ internal class TestCommandPcHelper
+ {
+ public virtual void SetEnumeratorPC(IEnumerator enumerator, int pc)
+ {
+ // Noop implementation used in playmode.
+ }
+
+ public virtual int GetEnumeratorPC(IEnumerator enumerator)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs.meta
new file mode 100644
index 0000000..6f8f8f8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Commands/TestCommandPcHelper.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 33e6b78c96bb0694e96383e3c56b7b54
+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/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs
new file mode 100644
index 0000000..1a6dd61
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs
@@ -0,0 +1,141 @@
+using System;
+using System.Linq;
+using NUnit.Framework.Internal;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+using UnityEngine.TestTools.Logging;
+using UnityEngine.TestTools.TestRunner;
+
+namespace UnityEngine.TestTools.NUnitExtensions
+{
+ /// <summary>
+ /// Specialization of BaseDelegator that makes sure objects are created on the MainThread.
+ /// It also deals with ScriptableObjects so that tests can survive assembly reload.
+ /// </summary>
+ internal class ConstructDelegator
+ {
+ private Type m_RequestedType;
+ private object[] m_Arguments;
+
+ private ScriptableObject m_CurrentRunningTest;
+ private readonly IStateSerializer m_StateSerializer;
+
+ protected Exception m_Exception;
+ protected object m_Result;
+ protected ITestExecutionContext m_Context;
+
+ public ConstructDelegator(IStateSerializer stateSerializer)
+ {
+ m_StateSerializer = stateSerializer;
+ }
+
+ 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 SetCurrentTestContext()
+ {
+ var prop = typeof(UnityTestExecutionContext).GetProperty("CurrentContext");
+ if (prop != null)
+ {
+ prop.SetValue(null, m_Context, null);
+ }
+ }
+
+ public object Delegate(Type type, object[] arguments)
+ {
+ AssertState();
+ m_Context = UnityTestExecutionContext.CurrentContext;
+
+ m_RequestedType = type;
+ m_Arguments = arguments;
+
+ using (var logScope = new LogScope())
+ {
+ Execute(logScope);
+ }
+
+ return HandleResult();
+ }
+
+ private void AssertState()
+ {
+ if (m_RequestedType != null)
+ {
+ throw new Exception("Constructor not executed yet");
+ }
+ }
+
+ public bool HasAction()
+ {
+ return m_RequestedType != null;
+ }
+
+ public void Execute(LogScope logScope)
+ {
+ try
+ {
+ if (typeof(ScriptableObject).IsAssignableFrom(m_RequestedType))
+ {
+ if (m_CurrentRunningTest != null && m_RequestedType != m_CurrentRunningTest.GetType())
+ {
+ DestroyCurrentTestObjectIfExists();
+ }
+ if (m_CurrentRunningTest == null)
+ {
+ if (m_StateSerializer.CanRestoreFromScriptableObject(m_RequestedType))
+ {
+ m_CurrentRunningTest = m_StateSerializer.RestoreScriptableObjectInstance();
+ }
+ else
+ {
+ m_CurrentRunningTest = ScriptableObject.CreateInstance(m_RequestedType);
+ }
+ }
+ m_Result = m_CurrentRunningTest;
+ }
+ else
+ {
+ DestroyCurrentTestObjectIfExists();
+ m_Result = Activator.CreateInstance(m_RequestedType, m_Arguments);
+ if (m_StateSerializer.CanRestoreFromJson(m_RequestedType))
+ {
+ m_StateSerializer.RestoreClassFromJson(ref m_Result);
+ }
+ }
+ if (logScope.AnyFailingLogs())
+ {
+ var failingLog = logScope.FailingLogs.First();
+ throw new UnhandledLogMessageException(failingLog);
+ }
+ if (logScope.ExpectedLogs.Any())
+ throw new UnexpectedLogMessageException(LogScope.Current.ExpectedLogs.Peek());
+ }
+ catch (Exception e)
+ {
+ m_Exception = e;
+ }
+ finally
+ {
+ m_RequestedType = null;
+ m_Arguments = null;
+ }
+ }
+
+ public void DestroyCurrentTestObjectIfExists()
+ {
+ if (m_CurrentRunningTest == null)
+ return;
+ Object.DestroyImmediate(m_CurrentRunningTest);
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs.meta
new file mode 100644
index 0000000..dbd68a8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/ConstructDelegator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b42e1db66fe9c634798674cb9e1df2ca
+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/UnityEngine.TestRunner/NUnitExtensions/Filters.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters.meta
new file mode 100644
index 0000000..7cad26c
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c3de99f9efc582a48995bc8e8c2df418
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs
new file mode 100644
index 0000000..a1f6803
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs
@@ -0,0 +1,25 @@
+using System;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal.Filters;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Filters
+{
+ internal class AssemblyNameFilter : ValueMatchFilter
+ {
+ public AssemblyNameFilter(string assemblyName) : base(assemblyName) {}
+
+ public override bool Match(ITest test)
+ {
+ string assemblyName = string.Empty;
+ //Assembly fullname is in the format "Assembly-name, meta data ...", so extract the name by looking for the comma
+ if (test.TypeInfo != null && test.TypeInfo.Assembly != null && test.TypeInfo.FullName != null)
+ assemblyName = test.TypeInfo.Assembly.FullName.Substring(0, test.TypeInfo.Assembly.FullName.IndexOf(',')).TrimEnd(',');
+ return ExpectedValue.Equals(assemblyName, StringComparison.OrdinalIgnoreCase);
+ }
+
+ protected override string ElementName
+ {
+ get { return "id"; }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs.meta
new file mode 100644
index 0000000..bee56e6
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/AssemblyNameFilter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 91319408591cec1478efd3c62f9f418a
+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/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs
new file mode 100644
index 0000000..f060d47
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs
@@ -0,0 +1,36 @@
+using System.Collections;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Filters;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Filters
+{
+ internal class CategoryFilterExtended : CategoryFilter
+ {
+ public static string k_DefaultCategory = "Uncategorized";
+
+ public CategoryFilterExtended(string name) : base(name)
+ {
+ }
+
+ public override bool Match(ITest test)
+ {
+ IList testCategories = test.Properties[PropertyNames.Category].Cast<string>().ToList();
+
+ if (test is TestMethod)
+ {
+ // Do not count tests with no attribute as Uncategorized if test fixture class has at least one attribute
+ // The test inherits the attribute from the test fixture
+ IList fixtureCategories = test.Parent.Properties[PropertyNames.Category].Cast<string>().ToList();
+ if (fixtureCategories.Count > 0)
+ return false;
+ }
+
+ if (testCategories.Count == 0 && ExpectedValue == k_DefaultCategory && test is TestMethod)
+ return true;
+
+ return base.Match(test);
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs.meta
new file mode 100644
index 0000000..8ff1134
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Filters/CategoryFilterExtended.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ebeedaa04bb53e24ba2e7fb6745e3fd3
+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/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs
new file mode 100644
index 0000000..9058d9f
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs
@@ -0,0 +1,12 @@
+using System.Collections.Generic;
+using System.Reflection;
+using NUnit.Framework.Api;
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestTools.NUnitExtensions
+{
+ internal interface IAsyncTestAssemblyBuilder : ITestAssemblyBuilder
+ {
+ IEnumerator<ITest> BuildAsync(Assembly[] assemblies, TestPlatform[] testPlatforms, IDictionary<string, object> options);
+ }
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs.meta
new file mode 100644
index 0000000..e22e4e8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IAsyncTestAssemblyBuilder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c3aa5c3d59b94854e843f10b75b3ad63
+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/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs
new file mode 100644
index 0000000..d4a3338
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs
@@ -0,0 +1,12 @@
+using System;
+
+namespace UnityEngine.TestTools.NUnitExtensions
+{
+ internal interface IStateSerializer
+ {
+ ScriptableObject RestoreScriptableObjectInstance();
+ void RestoreClassFromJson(ref object instance);
+ bool CanRestoreFromJson(Type requestedType);
+ bool CanRestoreFromScriptableObject(Type requestedType);
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs.meta
new file mode 100644
index 0000000..350aa38
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/IStateSerializer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5f875a14565308a40a5262d2504da705
+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/UnityEngine.TestRunner/NUnitExtensions/Runner.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner.meta
new file mode 100644
index 0000000..718bce8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 37888acc09d9ee848bf9559f06645c45
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs
new file mode 100644
index 0000000..2efbd86
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs
@@ -0,0 +1,342 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Internal.Execution;
+using UnityEngine.TestTools.Logging;
+using UnityEngine.TestTools.TestRunner;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal class CompositeWorkItem : UnityWorkItem
+ {
+ private readonly TestSuite _suite;
+ private readonly TestSuiteResult _suiteResult;
+ private readonly ITestFilter _childFilter;
+ private TestCommand _setupCommand;
+ private TestCommand _teardownCommand;
+
+ public List<UnityWorkItem> Children { get; private set; }
+
+ private int _countOrder;
+
+ private CountdownEvent _childTestCountdown;
+
+ public CompositeWorkItem(TestSuite suite, ITestFilter childFilter, WorkItemFactory factory)
+ : base(suite, factory)
+ {
+ _suite = suite;
+ _suiteResult = Result as TestSuiteResult;
+ _childFilter = childFilter;
+ _countOrder = 0;
+ }
+
+ protected override IEnumerable PerformWork()
+ {
+ InitializeSetUpAndTearDownCommands();
+
+ if (UnityTestExecutionContext.CurrentContext != null && m_DontRunRestoringResult && EditModeTestCallbacks.RestoringTestContext != null)
+ {
+ EditModeTestCallbacks.RestoringTestContext();
+ }
+
+ if (!CheckForCancellation())
+ if (Test.RunState == RunState.Explicit && !_childFilter.IsExplicitMatch(Test))
+ SkipFixture(ResultState.Explicit, GetSkipReason(), null);
+ else
+ switch (Test.RunState)
+ {
+ default:
+ case RunState.Runnable:
+ case RunState.Explicit:
+ Result.SetResult(ResultState.Success);
+
+ CreateChildWorkItems();
+
+ if (Children.Count > 0)
+ {
+ if (!m_DontRunRestoringResult)
+ {
+ //This is needed to give the editor a chance to go out of playmode if needed before creating objects.
+ //If we do not, the objects could be automatically destroyed when exiting playmode and could result in errors later on
+ yield return null;
+ PerformOneTimeSetUp();
+ }
+
+ if (!CheckForCancellation())
+ {
+ switch (Result.ResultState.Status)
+ {
+ case TestStatus.Passed:
+ foreach (var child in RunChildren())
+ {
+ if (CheckForCancellation())
+ {
+ yield break;
+ }
+
+ yield return child;
+ }
+ break;
+ case TestStatus.Skipped:
+ case TestStatus.Inconclusive:
+ case TestStatus.Failed:
+ SkipChildren(_suite, Result.ResultState.WithSite(FailureSite.Parent), "OneTimeSetUp: " + Result.Message);
+ break;
+ }
+ }
+
+ if (Context.ExecutionStatus != TestExecutionStatus.AbortRequested && !m_DontRunRestoringResult)
+ {
+ PerformOneTimeTearDown();
+ }
+ }
+ break;
+
+ case RunState.Skipped:
+ SkipFixture(ResultState.Skipped, GetSkipReason(), null);
+ break;
+
+ case RunState.Ignored:
+ SkipFixture(ResultState.Ignored, GetSkipReason(), null);
+ break;
+
+ case RunState.NotRunnable:
+ SkipFixture(ResultState.NotRunnable, GetSkipReason(), GetProviderStackTrace());
+ break;
+ }
+ if (!ResultedInDomainReload)
+ {
+ WorkItemComplete();
+ }
+ }
+
+ private bool CheckForCancellation()
+ {
+ if (Context.ExecutionStatus != TestExecutionStatus.Running)
+ {
+ Result.SetResult(ResultState.Cancelled, "Test cancelled by user");
+ return true;
+ }
+
+ return false;
+ }
+
+ private void InitializeSetUpAndTearDownCommands()
+ {
+ List<SetUpTearDownItem> setUpTearDownItems = _suite.TypeInfo != null
+ ? CommandBuilder.BuildSetUpTearDownList(_suite.TypeInfo.Type, typeof(OneTimeSetUpAttribute), typeof(OneTimeTearDownAttribute))
+ : new List<SetUpTearDownItem>();
+
+ var actionItems = new List<TestActionItem>();
+ foreach (ITestAction action in Actions)
+ {
+ bool applyToSuite = (action.Targets & ActionTargets.Suite) == ActionTargets.Suite
+ || action.Targets == ActionTargets.Default && !(Test is ParameterizedMethodSuite);
+
+ bool applyToTest = (action.Targets & ActionTargets.Test) == ActionTargets.Test
+ && !(Test is ParameterizedMethodSuite);
+
+ if (applyToSuite)
+ actionItems.Add(new TestActionItem(action));
+
+ if (applyToTest)
+ Context.UpstreamActions.Add(action);
+ }
+
+ _setupCommand = CommandBuilder.MakeOneTimeSetUpCommand(_suite, setUpTearDownItems, actionItems);
+ _teardownCommand = CommandBuilder.MakeOneTimeTearDownCommand(_suite, setUpTearDownItems, actionItems);
+ }
+
+ private void PerformOneTimeSetUp()
+ {
+ var logScope = new LogScope();
+ try
+ {
+ _setupCommand.Execute(Context);
+ }
+ catch (Exception ex)
+ {
+ if (ex is NUnitException || ex is TargetInvocationException)
+ ex = ex.InnerException;
+
+ Result.RecordException(ex, FailureSite.SetUp);
+ }
+
+ if (logScope.AnyFailingLogs())
+ {
+ Result.RecordException(new UnhandledLogMessageException(logScope.FailingLogs.First()));
+ }
+ logScope.Dispose();
+ }
+
+ private IEnumerable RunChildren()
+ {
+ int childCount = Children.Count;
+ if (childCount == 0)
+ throw new InvalidOperationException("RunChildren called but item has no children");
+
+ _childTestCountdown = new CountdownEvent(childCount);
+
+ foreach (UnityWorkItem child in Children)
+ {
+ if (CheckForCancellation())
+ {
+ yield break;
+ }
+
+ var unityTestExecutionContext = new UnityTestExecutionContext(Context);
+ child.InitializeContext(unityTestExecutionContext);
+
+ var enumerable = child.Execute().GetEnumerator();
+
+ while (true)
+ {
+ if (!enumerable.MoveNext())
+ {
+ break;
+ }
+ ResultedInDomainReload |= child.ResultedInDomainReload;
+ yield return enumerable.Current;
+ }
+
+ _suiteResult.AddResult(child.Result);
+ childCount--;
+ }
+
+ if (childCount > 0)
+ {
+ while (childCount-- > 0)
+ CountDownChildTest();
+ }
+ }
+
+ private void CreateChildWorkItems()
+ {
+ Children = new List<UnityWorkItem>();
+ var testSuite = _suite;
+
+ foreach (ITest test in testSuite.Tests)
+ {
+ if (_childFilter.Pass(test))
+ {
+ var child = m_Factory.Create(test, _childFilter);
+
+ if (test.Properties.ContainsKey(PropertyNames.Order))
+ {
+ Children.Insert(0, child);
+ _countOrder++;
+ }
+ else
+ {
+ Children.Add(child);
+ }
+ }
+ }
+
+ if (_countOrder != 0) SortChildren();
+ }
+
+ private class UnityWorkItemOrderComparer : IComparer<UnityWorkItem>
+ {
+ public int Compare(UnityWorkItem x, UnityWorkItem y)
+ {
+ var xKey = int.MaxValue;
+ var yKey = int.MaxValue;
+
+ if (x.Test.Properties.ContainsKey(PropertyNames.Order))
+ xKey = (int)x.Test.Properties[PropertyNames.Order][0];
+
+ if (y.Test.Properties.ContainsKey(PropertyNames.Order))
+ yKey = (int)y.Test.Properties[PropertyNames.Order][0];
+
+ return xKey.CompareTo(yKey);
+ }
+ }
+
+ private void SortChildren()
+ {
+ Children.Sort(0, _countOrder, new UnityWorkItemOrderComparer());
+ }
+
+ private void SkipFixture(ResultState resultState, string message, string stackTrace)
+ {
+ Result.SetResult(resultState.WithSite(FailureSite.SetUp), message, StackFilter.Filter(stackTrace));
+ SkipChildren(_suite, resultState.WithSite(FailureSite.Parent), "OneTimeSetUp: " + message);
+ }
+
+ private void SkipChildren(TestSuite suite, ResultState resultState, string message)
+ {
+ foreach (Test child in suite.Tests)
+ {
+ if (_childFilter.Pass(child))
+ {
+ Context.Listener.TestStarted(child);
+ TestResult childResult = child.MakeTestResult();
+ childResult.SetResult(resultState, message);
+ _suiteResult.AddResult(childResult);
+
+ if (child.IsSuite)
+ SkipChildren((TestSuite)child, resultState, message);
+
+ Context.Listener.TestFinished(childResult);
+ }
+ }
+ }
+
+ private void PerformOneTimeTearDown()
+ {
+ _teardownCommand.Execute(Context);
+ }
+
+ private string GetSkipReason()
+ {
+ return (string)Test.Properties.Get(PropertyNames.SkipReason);
+ }
+
+ private string GetProviderStackTrace()
+ {
+ return (string)Test.Properties.Get(PropertyNames.ProviderStackTrace);
+ }
+
+ private void CountDownChildTest()
+ {
+ _childTestCountdown.Signal();
+ if (_childTestCountdown.CurrentCount == 0)
+ {
+ if (Context.ExecutionStatus != TestExecutionStatus.AbortRequested)
+ PerformOneTimeTearDown();
+
+ foreach (var childResult in _suiteResult.Children)
+ if (childResult.ResultState == ResultState.Cancelled)
+ {
+ this.Result.SetResult(ResultState.Cancelled, "Cancelled by user");
+ break;
+ }
+
+ WorkItemComplete();
+ }
+ }
+
+ public override void Cancel(bool force)
+ {
+ if (Children == null)
+ return;
+
+ foreach (var child in Children)
+ {
+ var ctx = child.Context;
+ if (ctx != null)
+ ctx.ExecutionStatus = force ? TestExecutionStatus.AbortRequested : TestExecutionStatus.StopRequested;
+
+ if (child.State == WorkItemState.Running)
+ child.Cancel(force);
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs.meta
new file mode 100644
index 0000000..148e65b
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CompositeWorkItem.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 110d5035a36a6a34580fb65bb40cd78f
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs
new file mode 100644
index 0000000..2574e77
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Collections;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Internal.Execution;
+using UnityEngine.TestTools.Utils;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal class CoroutineTestWorkItem : UnityWorkItem
+ {
+ private static MonoBehaviour m_MonoBehaviourCoroutineRunner;
+ private TestCommand m_Command;
+
+ public static MonoBehaviour monoBehaviourCoroutineRunner
+ {
+ get
+ {
+ if (m_MonoBehaviourCoroutineRunner == null)
+ {
+ throw new NullReferenceException("MonoBehaviour coroutine runner not set");
+ }
+ return m_MonoBehaviourCoroutineRunner;
+ }
+ set { m_MonoBehaviourCoroutineRunner = value; }
+ }
+
+ public CoroutineTestWorkItem(TestMethod test, ITestFilter filter)
+ : base(test, null)
+ {
+ m_Command = m_Command = TestCommandBuilder.BuildTestCommand(test, filter);
+ }
+
+ protected override IEnumerable PerformWork()
+ {
+ if (m_Command is SkipCommand)
+ {
+ m_Command.Execute(Context);
+ Result = Context.CurrentResult;
+ WorkItemComplete();
+ yield break;
+ }
+
+ if (m_Command is ApplyChangesToContextCommand)
+ {
+ var applyChangesToContextCommand = (ApplyChangesToContextCommand)m_Command;
+ applyChangesToContextCommand.ApplyChanges(Context);
+ m_Command = applyChangesToContextCommand.GetInnerCommand();
+ }
+
+ var enumerableTestMethodCommand = (IEnumerableTestMethodCommand)m_Command;
+ try
+ {
+ var executeEnumerable = enumerableTestMethodCommand.ExecuteEnumerable(Context).GetEnumerator();
+
+ var coroutineRunner = new CoroutineRunner(monoBehaviourCoroutineRunner, Context);
+ yield return coroutineRunner.HandleEnumerableTest(executeEnumerable);
+
+ if (coroutineRunner.HasFailedWithTimeout())
+ {
+ Context.CurrentResult.SetResult(ResultState.Failure, string.Format("Test exceeded Timeout value of {0}ms", Context.TestCaseTimeout));
+ }
+
+ while (executeEnumerable.MoveNext()) {}
+
+ Result = Context.CurrentResult;
+ }
+ finally
+ {
+ WorkItemComplete();
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs.meta
new file mode 100644
index 0000000..dabb0f2
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/CoroutineTestWorkItem.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b557515fff172984e8c4400b43f1c631
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs
new file mode 100644
index 0000000..5acf8bc
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs
@@ -0,0 +1,96 @@
+using System;
+using System.Collections;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using NUnit.Framework.Internal.Execution;
+using UnityEngine.TestTools;
+using SetUpTearDownCommand = NUnit.Framework.Internal.Commands.SetUpTearDownCommand;
+using TestActionCommand = NUnit.Framework.Internal.Commands.TestActionCommand;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal class EditModeTestCallbacks
+ {
+ public static Action RestoringTestContext { get; set; }
+ }
+
+ internal class DefaultTestWorkItem : UnityWorkItem
+ {
+ private TestCommand _command;
+
+ public DefaultTestWorkItem(TestMethod test, ITestFilter filter)
+ : base(test, null)
+ {
+ _command = TestCommandBuilder.BuildTestCommand(test, filter);
+ }
+
+ protected override IEnumerable PerformWork()
+ {
+ if (m_DontRunRestoringResult && EditModeTestCallbacks.RestoringTestContext != null)
+ {
+ EditModeTestCallbacks.RestoringTestContext();
+ Result = Context.CurrentResult;
+ yield break;
+ }
+
+ try
+ {
+ if (_command is SkipCommand || _command is FailCommand)
+ {
+ Result = _command.Execute(Context);
+ yield break;
+ }
+
+ if (!(_command is IEnumerableTestMethodCommand))
+ {
+ Debug.LogError("Cannot perform work on " + _command.GetType().Name);
+ yield break;
+ }
+
+ foreach (var workItemStep in ((IEnumerableTestMethodCommand)_command).ExecuteEnumerable(Context))
+ {
+ ResultedInDomainReload = false;
+
+ if (workItemStep is IEditModeTestYieldInstruction)
+ {
+ var editModeTestYieldInstruction = (IEditModeTestYieldInstruction)workItemStep;
+ yield return editModeTestYieldInstruction;
+ var enumerator = editModeTestYieldInstruction.Perform();
+ while (true)
+ {
+ bool moveNext;
+ try
+ {
+ moveNext = enumerator.MoveNext();
+ }
+ catch (Exception e)
+ {
+ Context.CurrentResult.RecordException(e);
+ break;
+ }
+
+ if (!moveNext)
+ {
+ break;
+ }
+
+ yield return null;
+ }
+ }
+ else
+ {
+ yield return workItemStep;
+ }
+ }
+
+ Result = Context.CurrentResult;
+ }
+ finally
+ {
+ WorkItemComplete();
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs.meta
new file mode 100644
index 0000000..a880ec1
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/DefaultTestWorkItem.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c7cfda246e604b945b12b7afedb094ce
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs
new file mode 100644
index 0000000..0c31ded
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs
@@ -0,0 +1,34 @@
+
+using System.Collections;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal class FailCommand : TestCommand, IEnumerableTestMethodCommand
+ {
+ private ResultState m_ResultState;
+ private string m_Message;
+
+ public FailCommand(Test test, ResultState resultState, string message)
+ : base(test)
+ {
+ m_ResultState = resultState;
+ m_Message = message;
+ }
+
+ public override TestResult Execute(ITestExecutionContext context)
+ {
+ context.CurrentResult.SetResult(m_ResultState, m_Message);
+ return context.CurrentResult;
+ }
+
+ public IEnumerable ExecuteEnumerable(ITestExecutionContext context)
+ {
+ context.CurrentResult.SetResult(m_ResultState, m_Message);
+ yield return null;
+ }
+ }
+
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs.meta
new file mode 100644
index 0000000..b0f7840
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 68e5dc8bfd5d72647a93b7f2e1da831a
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs
new file mode 100644
index 0000000..d62979a
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs
@@ -0,0 +1,10 @@
+using System.Collections;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal interface IEnumerableTestMethodCommand
+ {
+ IEnumerable ExecuteEnumerable(ITestExecutionContext context);
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs.meta
new file mode 100644
index 0000000..29ed5a5
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/IEnumerableTestMethodCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dbd43d8a3b8122d4e89b055f53382b11
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs
new file mode 100644
index 0000000..bdb55fe
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs
@@ -0,0 +1,13 @@
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal class PlaymodeWorkItemFactory : WorkItemFactory
+ {
+ protected override UnityWorkItem Create(TestMethod method, ITestFilter filter, ITest loadedTest)
+ {
+ return new CoroutineTestWorkItem(method, filter);
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs.meta
new file mode 100644
index 0000000..42a71f6
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/PlaymodeWorkItemFactory.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 7ef6801a8b664544aa9f2ab1bc1f8b60
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs
new file mode 100644
index 0000000..4171ed8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs
@@ -0,0 +1,4 @@
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal class RestoreTestContextAfterDomainReload {}
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs.meta
new file mode 100644
index 0000000..eaf8bc2
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/RestoreTestContextAfterDomainReload.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 26721f9940339264fb14bdbfe1290e21
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs
new file mode 100644
index 0000000..7cf2103
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs
@@ -0,0 +1,127 @@
+using System;
+using System.Collections;
+using System.Linq;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestTools;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal static class TestCommandBuilder
+ {
+ public static TestCommand BuildTestCommand(TestMethod test, ITestFilter filter)
+ {
+ if (test.RunState != RunState.Runnable &&
+ !(test.RunState == RunState.Explicit && filter.IsExplicitMatch(test)))
+ {
+ return new SkipCommand(test);
+ }
+
+ var testReturnsIEnumerator = test.Method.ReturnType.Type == typeof(IEnumerator);
+
+ TestCommand command;
+ if (!testReturnsIEnumerator)
+ {
+ command = new TestMethodCommand(test);
+ }
+ else
+ {
+ command = new EnumerableTestMethodCommand(test);
+ }
+
+ command = new UnityLogCheckDelegatingCommand(command);
+ foreach (var wrapper in test.Method.GetCustomAttributes<IWrapTestMethod>(true))
+ {
+ command = wrapper.Wrap(command);
+ if (command == null)
+ {
+ var message = String.Format("IWrapTestMethod implementation '{0}' returned null as command.",
+ wrapper.GetType().FullName);
+ return new FailCommand(test, ResultState.Failure, message);
+ }
+
+ if (testReturnsIEnumerator && !(command is IEnumerableTestMethodCommand))
+ {
+ command = TryReplaceWithEnumerableCommand(command);
+ if (command != null)
+ {
+ continue;
+ }
+
+ var message = String.Format("'{0}' is not supported on {1} as it does not handle returning IEnumerator.",
+ wrapper.GetType().FullName,
+ GetTestBuilderName(test));
+ return new FailCommand(test, ResultState.Failure, message);
+ }
+ }
+
+ command = new UnityEngine.TestTools.TestActionCommand(command);
+ command = new UnityEngine.TestTools.SetUpTearDownCommand(command);
+
+ if (!testReturnsIEnumerator)
+ {
+ command = new ImmediateEnumerableCommand(command);
+ }
+
+ foreach (var wrapper in test.Method.GetCustomAttributes<IWrapSetUpTearDown>(true))
+ {
+ command = wrapper.Wrap(command);
+ if (command == null)
+ {
+ var message = String.Format("IWrapSetUpTearDown implementation '{0}' returned null as command.",
+ wrapper.GetType().FullName);
+ return new FailCommand(test, ResultState.Failure, message);
+ }
+
+ if (testReturnsIEnumerator && !(command is IEnumerableTestMethodCommand))
+ {
+ command = TryReplaceWithEnumerableCommand(command);
+ if (command != null)
+ {
+ continue;
+ }
+
+ var message = String.Format("'{0}' is not supported on {1} as it does not handle returning IEnumerator.",
+ wrapper.GetType().FullName,
+ GetTestBuilderName(test));
+ return new FailCommand(test, ResultState.Failure, message);
+ }
+ }
+
+ command = new EnumerableSetUpTearDownCommand(command);
+ command = new OuterUnityTestActionCommand(command);
+
+ IApplyToContext[] changes = test.Method.GetCustomAttributes<IApplyToContext>(true);
+ if (changes.Length > 0)
+ {
+ command = new EnumerableApplyChangesToContextCommand(command, changes);
+ }
+
+ return command;
+ }
+
+ private static string GetTestBuilderName(TestMethod testMethod)
+ {
+ return new[]
+ {
+ testMethod.Method.GetCustomAttributes<ITestBuilder>(true).Select(attribute => attribute.GetType().Name),
+ testMethod.Method.GetCustomAttributes<ISimpleTestBuilder>(true).Select(attribute => attribute.GetType().Name)
+ }.SelectMany(v => v).FirstOrDefault();
+ }
+
+ private static TestCommand TryReplaceWithEnumerableCommand(TestCommand command)
+ {
+ switch (command.GetType().Name)
+ {
+ case nameof(RepeatAttribute.RepeatedTestCommand):
+ return new EnumerableRepeatedTestCommand(command as RepeatAttribute.RepeatedTestCommand);
+ case nameof(RetryAttribute.RetryCommand):
+ return new EnumerableRetryTestCommand(command as RetryAttribute.RetryCommand);
+ default:
+ return null;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs.meta
new file mode 100644
index 0000000..2c4a37b
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/TestCommandBuilder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f40df9c8cf926b241b093a37028d8815
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs
new file mode 100644
index 0000000..1081e06
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs
@@ -0,0 +1,143 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Commands;
+using UnityEngine.TestTools;
+using UnityEngine.TestTools.Logging;
+using UnityEngine.TestTools.TestRunner;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ class UnityLogCheckDelegatingCommand : DelegatingTestCommand, IEnumerableTestMethodCommand
+ {
+ static Dictionary<object, bool?> s_AttributeCache = new Dictionary<object, bool?>();
+
+ public UnityLogCheckDelegatingCommand(TestCommand innerCommand)
+ : base(innerCommand) {}
+
+ public override TestResult Execute(ITestExecutionContext context)
+ {
+ using (var logScope = new LogScope())
+ {
+ if (ExecuteAndCheckLog(logScope, context.CurrentResult, () => innerCommand.Execute(context)))
+ PostTestValidation(logScope, innerCommand, context.CurrentResult);
+ }
+
+ return context.CurrentResult;
+ }
+
+ public IEnumerable ExecuteEnumerable(ITestExecutionContext context)
+ {
+ if (!(innerCommand is IEnumerableTestMethodCommand enumerableTestMethodCommand))
+ {
+ Execute(context);
+ yield break;
+ }
+
+ using (var logScope = new LogScope())
+ {
+ IEnumerable executeEnumerable = null;
+
+ if (!ExecuteAndCheckLog(logScope, context.CurrentResult,
+ () => executeEnumerable = enumerableTestMethodCommand.ExecuteEnumerable(context)))
+ yield break;
+
+ foreach (var step in executeEnumerable)
+ {
+ // do not check expected logs here - we want to permit expecting and receiving messages to run
+ // across frames. (but we do always want to catch a fail immediately.)
+ if (!CheckFailingLogs(logScope, context.CurrentResult))
+ yield break;
+
+ yield return step;
+ }
+
+ if (!CheckLogs(context.CurrentResult, logScope))
+ yield break;
+
+ PostTestValidation(logScope, innerCommand, context.CurrentResult);
+ }
+ }
+
+ static bool CaptureException(TestResult result, Action action)
+ {
+ try
+ {
+ action();
+ return true;
+ }
+ catch (Exception e)
+ {
+ result.RecordException(e);
+ return false;
+ }
+ }
+
+ static bool ExecuteAndCheckLog(LogScope logScope, TestResult result, Action action)
+ => CaptureException(result, action) && CheckLogs(result, logScope);
+
+ static void PostTestValidation(LogScope logScope, TestCommand command, TestResult result)
+ {
+ if (MustExpect(command.Test.Method.MethodInfo))
+ CaptureException(result, logScope.NoUnexpectedReceived);
+ }
+
+ static bool CheckLogs(TestResult result, LogScope logScope)
+ => CheckFailingLogs(logScope, result) && CheckExpectedLogs(logScope, result);
+
+ static bool CheckFailingLogs(LogScope logScope, TestResult result)
+ {
+ if (!logScope.AnyFailingLogs())
+ return true;
+
+ var failingLog = logScope.FailingLogs.First();
+ result.RecordException(new UnhandledLogMessageException(failingLog));
+ return false;
+ }
+
+ static bool CheckExpectedLogs(LogScope logScope, TestResult result)
+ {
+ if (!logScope.ExpectedLogs.Any())
+ return true;
+
+ var expectedLog = logScope.ExpectedLogs.Peek();
+ result.RecordException(new UnexpectedLogMessageException(expectedLog));
+ return false;
+ }
+
+ static bool MustExpect(MemberInfo method)
+ {
+ // method
+
+ var methodAttr = method.GetCustomAttributes<TestMustExpectAllLogsAttribute>(true).FirstOrDefault();
+ if (methodAttr != null)
+ return methodAttr.MustExpect;
+
+ // fixture
+
+ var fixture = method.DeclaringType;
+ if (!s_AttributeCache.TryGetValue(fixture, out var mustExpect))
+ {
+ var fixtureAttr = fixture.GetCustomAttributes<TestMustExpectAllLogsAttribute>(true).FirstOrDefault();
+ mustExpect = s_AttributeCache[fixture] = fixtureAttr?.MustExpect;
+ }
+
+ if (mustExpect != null)
+ return mustExpect.Value;
+
+ // assembly
+
+ var assembly = fixture.Assembly;
+ if (!s_AttributeCache.TryGetValue(assembly, out mustExpect))
+ {
+ var assemblyAttr = assembly.GetCustomAttributes<TestMustExpectAllLogsAttribute>().FirstOrDefault();
+ mustExpect = s_AttributeCache[assembly] = assemblyAttr?.MustExpect;
+ }
+
+ return mustExpect == true;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs.meta
new file mode 100644
index 0000000..42b3b73
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityLogCheckDelegatingCommand.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 48230e4e90fb4d14a9d56bddea898413
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs
new file mode 100644
index 0000000..dbb60c8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs
@@ -0,0 +1,98 @@
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using NUnit;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using UnityEngine.TestTools;
+using UnityEngine.TestTools.NUnitExtensions;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal interface IUnityTestAssemblyRunner
+ {
+ ITest LoadedTest { get; }
+ ITestResult Result { get; }
+ bool IsTestLoaded { get; }
+ bool IsTestRunning { get; }
+ bool IsTestComplete { get; }
+ UnityWorkItem TopLevelWorkItem { get; set; }
+ UnityTestExecutionContext GetCurrentContext();
+ ITest Load(Assembly[] assemblies, TestPlatform testPlatform, IDictionary<string, object> settings);
+ IEnumerable Run(ITestListener listener, ITestFilter filter);
+ void StopRun();
+ }
+
+ internal class UnityTestAssemblyRunner : IUnityTestAssemblyRunner
+ {
+ private readonly UnityTestAssemblyBuilder unityBuilder;
+ private readonly WorkItemFactory m_Factory;
+
+ protected UnityTestExecutionContext Context { get; set; }
+
+ public UnityTestExecutionContext GetCurrentContext()
+ {
+ return UnityTestExecutionContext.CurrentContext;
+ }
+
+ protected IDictionary<string, object> Settings { get; set; }
+ public ITest LoadedTest { get; protected set; }
+
+ public ITestResult Result
+ {
+ get { return TopLevelWorkItem == null ? null : TopLevelWorkItem.Result; }
+ }
+
+ public bool IsTestLoaded
+ {
+ get { return LoadedTest != null; }
+ }
+
+ public bool IsTestRunning
+ {
+ get { return TopLevelWorkItem != null && TopLevelWorkItem.State == NUnit.Framework.Internal.Execution.WorkItemState.Running; }
+ }
+ public bool IsTestComplete
+ {
+ get { return TopLevelWorkItem != null && TopLevelWorkItem.State == NUnit.Framework.Internal.Execution.WorkItemState.Complete; }
+ }
+
+ public UnityTestAssemblyRunner(UnityTestAssemblyBuilder builder, WorkItemFactory factory)
+ {
+ unityBuilder = builder;
+ m_Factory = factory;
+ Context = new UnityTestExecutionContext();
+ }
+
+ public ITest Load(Assembly[] assemblies, TestPlatform testPlatform, IDictionary<string, object> settings)
+ {
+ Settings = settings;
+
+ if (settings.ContainsKey(FrameworkPackageSettings.RandomSeed))
+ Randomizer.InitialSeed = (int)settings[FrameworkPackageSettings.RandomSeed];
+
+ return LoadedTest = unityBuilder.Build(assemblies, Enumerable.Repeat(testPlatform, assemblies.Length).ToArray(), settings);
+ }
+
+ public IEnumerable Run(ITestListener listener, ITestFilter filter)
+ {
+ TopLevelWorkItem = m_Factory.Create(LoadedTest, filter);
+ TopLevelWorkItem.InitializeContext(Context);
+ UnityTestExecutionContext.CurrentContext = Context;
+ Context.Listener = listener;
+
+ return TopLevelWorkItem.Execute();
+ }
+
+ public UnityWorkItem TopLevelWorkItem { get; set; }
+
+ public void StopRun()
+ {
+ if (IsTestRunning)
+ {
+ TopLevelWorkItem.Cancel(false);
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs.meta
new file mode 100644
index 0000000..2277fc0
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestAssemblyRunner.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 874e40a588dbb1e48bc128d686337d4e
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs
new file mode 100644
index 0000000..ca17b70
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs
@@ -0,0 +1,130 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using NUnit.Framework;
+using NUnit.Framework.Constraints;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Execution;
+using UnityEngine.TestTools;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal class UnityTestExecutionContext : ITestExecutionContext
+ {
+ private readonly UnityTestExecutionContext _priorContext;
+ private TestResult _currentResult;
+ private int _assertCount;
+
+ public static UnityTestExecutionContext CurrentContext { get; set; }
+
+ public UnityTestExecutionContext Context { get; private set; }
+
+ public Test CurrentTest { get; set; }
+ public DateTime StartTime { get; set; }
+ public long StartTicks { get; set; }
+ public TestResult CurrentResult
+ {
+ get { return _currentResult; }
+ set
+ {
+ _currentResult = value;
+ if (value != null)
+ OutWriter = value.OutWriter;
+ }
+ }
+
+ public object TestObject { get; set; }
+ public string WorkDirectory { get; set; }
+
+
+ private TestExecutionStatus _executionStatus;
+ public TestExecutionStatus ExecutionStatus
+ {
+ get
+ {
+ // ExecutionStatus may have been set to StopRequested or AbortRequested
+ // in a prior context. If so, reflect the same setting in this context.
+ if (_executionStatus == TestExecutionStatus.Running && _priorContext != null)
+ _executionStatus = _priorContext.ExecutionStatus;
+
+ return _executionStatus;
+ }
+ set
+ {
+ _executionStatus = value;
+
+ // Push the same setting up to all prior contexts
+ if (_priorContext != null)
+ _priorContext.ExecutionStatus = value;
+ }
+ }
+
+ public List<ITestAction> UpstreamActions { get; private set; }
+ public int TestCaseTimeout { get; set; }
+ public CultureInfo CurrentCulture { get; set; }
+ public CultureInfo CurrentUICulture { get; set; }
+ public ITestListener Listener { get; set; }
+
+ public UnityTestExecutionContext()
+ {
+ UpstreamActions = new List<ITestAction>();
+ CurrentContext = this;
+ }
+
+ public UnityTestExecutionContext(UnityTestExecutionContext other)
+ {
+ _priorContext = other;
+
+ CurrentTest = other.CurrentTest;
+ CurrentResult = other.CurrentResult;
+ TestObject = other.TestObject;
+ WorkDirectory = other.WorkDirectory;
+ Listener = other.Listener;
+ TestCaseTimeout = other.TestCaseTimeout;
+ UpstreamActions = new List<ITestAction>(other.UpstreamActions);
+ SetUpTearDownState = other.SetUpTearDownState;
+ OuterUnityTestActionState = other.OuterUnityTestActionState;
+
+ TestContext.CurrentTestExecutionContext = this;
+
+ CurrentCulture = other.CurrentCulture;
+ CurrentUICulture = other.CurrentUICulture;
+ CurrentContext = this;
+ }
+
+ public TextWriter OutWriter { get; private set; }
+ public bool StopOnError { get; set; }
+
+ public IWorkItemDispatcher Dispatcher { get; set; }
+
+ public ParallelScope ParallelScope { get; set; }
+ public string WorkerId { get; private set; }
+ public Randomizer RandomGenerator { get; private set; }
+ public ValueFormatter CurrentValueFormatter { get; private set; }
+ public bool IsSingleThreaded { get; set; }
+ public BeforeAfterTestCommandState SetUpTearDownState { get; set; }
+ public BeforeAfterTestCommandState OuterUnityTestActionState { get; set; }
+ public int EnumerableRepeatedTestState { get; set; }
+ public int EnumerableRetryTestState { get; set; }
+
+ internal int AssertCount
+ {
+ get
+ {
+ return _assertCount;
+ }
+ }
+
+ public void IncrementAssertCount()
+ {
+ _assertCount += 1;
+ }
+
+ public void AddFormatter(ValueFormatterFactory formatterFactory)
+ {
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs.meta
new file mode 100644
index 0000000..f218a3d
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityTestExecutionContext.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 59ff995fabb3bac45afa0f96f333e5dc
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs
new file mode 100644
index 0000000..a4593db
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs
@@ -0,0 +1,113 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Execution;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal abstract class UnityWorkItem
+ {
+ protected readonly WorkItemFactory m_Factory;
+ protected bool m_ExecuteTestStartEvent;
+ protected bool m_DontRunRestoringResult;
+ public event EventHandler Completed;
+
+ public bool ResultedInDomainReload { get; internal set; }
+
+ public UnityTestExecutionContext Context { get; private set; }
+
+ public Test Test { get; private set; }
+
+ public TestResult Result { get; protected set; }
+
+ public WorkItemState State { get; private set; }
+
+ public List<ITestAction> Actions { get; private set; }
+
+ protected UnityWorkItem(Test test, WorkItemFactory factory)
+ {
+ m_Factory = factory;
+ Test = test;
+ Actions = new List<ITestAction>();
+ Result = test.MakeTestResult();
+ State = WorkItemState.Ready;
+ m_ExecuteTestStartEvent = ShouldExecuteStartEvent();
+ m_DontRunRestoringResult = ShouldRestore(test);
+ }
+
+ protected static bool ShouldRestore(ITest loadedTest)
+ {
+ return UnityWorkItemDataHolder.alreadyExecutedTests != null && UnityWorkItemDataHolder.alreadyExecutedTests.Contains(loadedTest.FullName);
+ }
+
+ protected bool ShouldExecuteStartEvent()
+ {
+ return UnityWorkItemDataHolder.alreadyStartedTests != null && UnityWorkItemDataHolder.alreadyStartedTests.All(x => x != Test.FullName) && !ShouldRestore(Test);
+ }
+
+ protected abstract IEnumerable PerformWork();
+
+ public void InitializeContext(UnityTestExecutionContext context)
+ {
+ Context = context;
+
+ if (Test is TestAssembly)
+ Actions.AddRange(ActionsHelper.GetActionsFromTestAssembly((TestAssembly)Test));
+ else if (Test is ParameterizedMethodSuite)
+ Actions.AddRange(ActionsHelper.GetActionsFromTestMethodInfo(Test.Method));
+ else if (Test.TypeInfo != null)
+ Actions.AddRange(ActionsHelper.GetActionsFromTypesAttributes(Test.TypeInfo.Type));
+ }
+
+ public virtual IEnumerable Execute()
+ {
+ Context.CurrentTest = this.Test;
+ Context.CurrentResult = this.Result;
+
+ if (m_ExecuteTestStartEvent)
+ {
+ Context.Listener.TestStarted(Test);
+ }
+
+ Context.StartTime = DateTime.UtcNow;
+ Context.StartTicks = Stopwatch.GetTimestamp();
+
+ State = WorkItemState.Running;
+
+ return PerformWork();
+ }
+
+ protected void WorkItemComplete()
+ {
+ State = WorkItemState.Complete;
+
+ Result.StartTime = Context.StartTime;
+ Result.EndTime = DateTime.UtcNow;
+
+ long tickCount = Stopwatch.GetTimestamp() - Context.StartTicks;
+ double seconds = (double)tickCount / Stopwatch.Frequency;
+ Result.Duration = seconds;
+
+ //Result.AssertCount += Context.AssertCount;
+
+ Context.Listener.TestFinished(Result);
+
+ if (Completed != null)
+ Completed(this, EventArgs.Empty);
+
+ Context.TestObject = null;
+ Test.Fixture = null;
+ }
+
+ public virtual void Cancel(bool force)
+ {
+ Result.SetResult(ResultState.Cancelled, "Cancelled by user");
+ Context.Listener.TestFinished(Result);
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs.meta
new file mode 100644
index 0000000..e0b4496
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItem.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 79ced2556f0af814a840b86232613ff1
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs
new file mode 100644
index 0000000..dc9a3d1
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs
@@ -0,0 +1,10 @@
+using System.Collections.Generic;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal class UnityWorkItemDataHolder
+ {
+ public static List<string> alreadyStartedTests = new List<string>();
+ public static List<string> alreadyExecutedTests;
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs.meta
new file mode 100644
index 0000000..77b31f2
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/UnityWorkItemDataHolder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5b3e90046c38f1d4dad2e0d5a79e871c
+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/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs
new file mode 100644
index 0000000..89683ac
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs
@@ -0,0 +1,28 @@
+using System.Collections;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestRunner.NUnitExtensions.Runner
+{
+ internal abstract class WorkItemFactory
+ {
+ public UnityWorkItem Create(ITest loadedTest, ITestFilter filter)
+ {
+ TestSuite suite = loadedTest as TestSuite;
+ if (suite != null)
+ {
+ return new CompositeWorkItem(suite, filter, this);
+ }
+
+ var testMethod = (TestMethod)loadedTest;
+ if (testMethod.Method.ReturnType.Type != typeof(IEnumerator))
+ {
+ return new DefaultTestWorkItem(testMethod, filter);
+ }
+
+ return Create(testMethod, filter, loadedTest);
+ }
+
+ protected abstract UnityWorkItem Create(TestMethod method, ITestFilter filter, ITest loadedTest);
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs.meta
new file mode 100644
index 0000000..e22ce95
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/Runner/WorkItemFactory.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5c15bf0966eb95847a4260d830a30d30
+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/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs
new file mode 100644
index 0000000..a326004
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs
@@ -0,0 +1,146 @@
+using System.Collections.Generic;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using UnityEngine.TestRunner.NUnitExtensions.Filters;
+
+namespace UnityEngine.TestRunner.NUnitExtensions
+{
+ internal static class TestExtensions
+ {
+ private static IEnumerable<string> GetTestCategories(this ITest test)
+ {
+ var categories = test.Properties[PropertyNames.Category].Cast<string>().ToList();
+ if (categories.Count == 0 && test is TestMethod)
+ {
+ // only mark tests as Uncategorized if the test fixture doesn't have a category,
+ // otherwise the test inherits the Fixture category
+ var fixtureCategories = test.Parent.Properties[PropertyNames.Category].Cast<string>().ToList();
+ if (fixtureCategories.Count == 0)
+ categories.Add(CategoryFilterExtended.k_DefaultCategory);
+ }
+ return categories;
+ }
+
+ public static bool HasCategory(this ITest test, string[] categoryFilter)
+ {
+ var categories = test.GetAllCategoriesFromTest().Distinct();
+ return categoryFilter.Any(c => categories.Any(r => r == c));
+ }
+
+ public static List<string> GetAllCategoriesFromTest(this ITest test)
+ {
+ if (test.Parent == null)
+ return test.GetTestCategories().ToList();
+
+ var categories = GetAllCategoriesFromTest(test.Parent);
+ categories.AddRange(test.GetTestCategories());
+ return categories;
+ }
+
+ public static void ParseForNameDuplicates(this ITest test)
+ {
+ var duplicates = new Dictionary<string, int>();
+ for (var i = 0; i < test.Tests.Count; i++)
+ {
+ var child = test.Tests[i];
+ int count;
+ if (duplicates.TryGetValue(child.FullName, out count))
+ {
+ count++;
+ child.Properties.Add("childIndex", count);
+ duplicates[child.FullName] = count;
+ }
+ else
+ {
+ duplicates.Add(child.FullName, 1);
+ }
+ ParseForNameDuplicates(child);
+ }
+ }
+
+ public static int GetChildIndex(this ITest test)
+ {
+ var index = test.Properties["childIndex"];
+ return (int)index[0];
+ }
+
+ public static bool HasChildIndex(this ITest test)
+ {
+ var index = test.Properties["childIndex"];
+ return index.Count > 0;
+ }
+
+ static string GetAncestorPath(ITest test)
+ {
+ var path = "";
+ var testParent = test.Parent;
+
+ while (testParent != null && testParent.Parent != null && !string.IsNullOrEmpty(testParent.Name))
+ {
+ path = testParent.Name + "/" + path;
+ testParent = testParent.Parent;
+ }
+
+ return path;
+ }
+
+ public static string GetUniqueName(this ITest test)
+ {
+ var id = GetAncestorPath(test) + GetFullName(test);
+ if (test.HasChildIndex())
+ {
+ var index = test.GetChildIndex();
+ if (index >= 0)
+ id += index;
+ }
+ if (test.IsSuite)
+ {
+ id += "[suite]";
+ }
+ return id;
+ }
+
+ public static string GetFullName(ITest test)
+ {
+ if (test.TypeInfo == null && (test.Parent == null || test.Parent.TypeInfo == null))
+ {
+ return "[" + test.FullName + "]";
+ }
+ var assemblyId = test.TypeInfo == null ? test.Parent.TypeInfo.Assembly.GetName().Name : test.TypeInfo.Assembly.GetName().Name;
+ return string.Format("[{0}][{1}]", assemblyId, test.FullName);
+ }
+
+ public static string GetSkipReason(this ITest test)
+ {
+ if (test.Properties.ContainsKey(PropertyNames.SkipReason))
+ return (string)test.Properties.Get(PropertyNames.SkipReason);
+
+ return null;
+ }
+
+ public static string GetParentId(this ITest test)
+ {
+ if (test.Parent != null)
+ return test.Parent.Id;
+
+ return null;
+ }
+
+ public static string GetParentFullName(this ITest test)
+ {
+ if (test.Parent != null)
+ return test.Parent.FullName;
+
+ return null;
+ }
+
+ public static string GetParentUniqueName(this ITest test)
+ {
+ if (test.Parent != null)
+ return GetUniqueName(test.Parent);
+
+ return null;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs.meta
new file mode 100644
index 0000000..d7e04b4
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestExtensions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8bc74398aa3944646ade4ee78cd57484
+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/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs
new file mode 100644
index 0000000..0c14397
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs
@@ -0,0 +1,77 @@
+using System;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestRunner.NUnitExtensions
+{
+ internal static class TestResultExtensions
+ {
+ public static void RecordPrefixedException(this TestResult testResult, string prefix, Exception ex, ResultState resultState = null)
+
+ {
+ if (ex is NUnitException)
+ {
+ ex = ex.InnerException;
+ }
+
+ if (resultState == null)
+ {
+ resultState = testResult.ResultState == ResultState.Cancelled
+ ? ResultState.Cancelled
+ : ResultState.Error;
+ }
+
+ var exceptionMessage = ExceptionHelper.BuildMessage(ex);
+ string stackTrace = "--" + prefix + NUnit.Env.NewLine + ExceptionHelper.BuildStackTrace(ex);
+ if (testResult.StackTrace != null)
+ {
+ stackTrace = testResult.StackTrace + NUnit.Env.NewLine + stackTrace;
+ }
+
+ if (testResult.Test.IsSuite)
+ {
+ resultState = resultState.WithSite(FailureSite.TearDown);
+ }
+
+ if (ex is ResultStateException)
+ {
+ exceptionMessage = ex.Message;
+ resultState = ((ResultStateException)ex).ResultState;
+ stackTrace = StackFilter.Filter(ex.StackTrace);
+ }
+
+ string message = (string.IsNullOrEmpty(prefix) ? "" : (prefix + " : ")) + exceptionMessage;
+ if (testResult.Message != null)
+ {
+ message = testResult.Message + NUnit.Env.NewLine + message;
+ }
+
+ testResult.SetResult(resultState, message, stackTrace);
+ }
+
+ public static void RecordPrefixedError(this TestResult testResult, string prefix, string error, ResultState resultState = null)
+
+ {
+ if (resultState == null)
+ {
+ resultState = testResult.ResultState == ResultState.Cancelled
+ ? ResultState.Cancelled
+ : ResultState.Error;
+ }
+
+ if (testResult.Test.IsSuite)
+ {
+ resultState = resultState.WithSite(FailureSite.TearDown);
+ }
+
+ string message = (string.IsNullOrEmpty(prefix) ? "" : (prefix + " : ")) + error;
+ if (testResult.Message != null)
+ {
+ message = testResult.Message + NUnit.Env.NewLine + message;
+ }
+
+ testResult.SetResult(resultState, message);
+ }
+ }
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs.meta
new file mode 100644
index 0000000..86eb9ad
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/TestResultExtensions.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 65fb6da362a78334ab360a125cfafdaf
+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/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs
new file mode 100644
index 0000000..3a130c5
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs
@@ -0,0 +1,58 @@
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using NUnit;
+using NUnit.Framework.Api;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestTools.NUnitExtensions
+{
+ internal class UnityTestAssemblyBuilder : DefaultTestAssemblyBuilder, IAsyncTestAssemblyBuilder
+ {
+ private readonly string m_ProductName;
+ public UnityTestAssemblyBuilder()
+ {
+ m_ProductName = Application.productName;
+ }
+
+ public ITest Build(Assembly[] assemblies, TestPlatform[] testPlatforms, IDictionary<string, object> options)
+ {
+ var test = BuildAsync(assemblies, testPlatforms, options);
+ while (test.MoveNext())
+ {
+ }
+
+ return test.Current;
+ }
+
+ public IEnumerator<ITest> BuildAsync(Assembly[] assemblies, TestPlatform[] testPlatforms, IDictionary<string, object> options)
+ {
+ var productName = string.Join("_", m_ProductName.Split(Path.GetInvalidFileNameChars()));
+ var suite = new TestSuite(productName);
+ for (var index = 0; index < assemblies.Length; index++)
+ {
+ var assembly = assemblies[index];
+ var platform = testPlatforms[index];
+
+ var assemblySuite = Build(assembly, options) as TestSuite;
+ if (assemblySuite != null && assemblySuite.HasChildren)
+ {
+ assemblySuite.Properties.Set("platform", platform);
+ suite.Add(assemblySuite);
+ }
+
+ yield return null;
+ }
+
+ yield return suite;
+ }
+
+ public static Dictionary<string, object> GetNUnitTestBuilderSettings(TestPlatform testPlatform)
+ {
+ var emptySettings = new Dictionary<string, object>();
+ emptySettings.Add(FrameworkPackageSettings.TestParameters, "platform=" + testPlatform);
+ return emptySettings;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs.meta
new file mode 100644
index 0000000..abd0444
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/NUnitExtensions/UnityTestAssemblyBuilder.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 98ba0396e4b4ee8498a8f097affcfddf
+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/UnityEngine.TestRunner/TestRunner.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner.meta
new file mode 100644
index 0000000..bf3d145
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 1ddb9e1c877ea80479d1eab4ddaa5d0d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks.meta
new file mode 100644
index 0000000..46b230c
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 61e236e8570a95e4eb754fb291e102e0
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs
new file mode 100644
index 0000000..66c48e5
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs
@@ -0,0 +1,47 @@
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestTools.TestRunner.Callbacks
+{
+ [AddComponentMenu("")]
+ internal class PlayModeRunnerCallback : MonoBehaviour, ITestRunnerListener
+ {
+ private TestResultRenderer m_ResultRenderer;
+
+ public void RunFinished(ITestResult testResults)
+ {
+ Application.logMessageReceivedThreaded -= LogRecieved;
+ if (Camera.main == null)
+ {
+ gameObject.AddComponent<Camera>();
+ }
+ m_ResultRenderer = new TestResultRenderer(testResults);
+ m_ResultRenderer.ShowResults();
+ }
+
+ public void TestFinished(ITestResult result)
+ {
+ }
+
+ public void OnGUI()
+ {
+ if (m_ResultRenderer != null)
+ m_ResultRenderer.Draw();
+ }
+
+ public void RunStarted(ITest testsToRun)
+ {
+ Application.logMessageReceivedThreaded += LogRecieved;
+ }
+
+ public void TestStarted(ITest test)
+ {
+ }
+
+ private void LogRecieved(string message, string stacktrace, LogType type)
+ {
+ if (TestContext.Out != null)
+ TestContext.Out.WriteLine(message);
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta
new file mode 100644
index 0000000..7f533f6
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/PlayModeRunnerCallback.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3cf5cb9e1ef590c48b1f919f2a7bd895
+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/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs
new file mode 100644
index 0000000..1bfb63e
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs
@@ -0,0 +1,151 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using NUnit.Framework.Interfaces;
+using UnityEngine.Networking.PlayerConnection;
+using UnityEngine.TestRunner.TestLaunchers;
+
+namespace UnityEngine.TestTools.TestRunner.Callbacks
+{
+ [AddComponentMenu("")]
+ internal class RemoteTestResultSender : MonoBehaviour, ITestRunnerListener
+ {
+ private class QueueData
+ {
+ public Guid id { get; set; }
+ public byte[] data { get; set; }
+ }
+
+ private const int k_aliveMessageFrequency = 120;
+ private float m_NextliveMessage = k_aliveMessageFrequency;
+ private readonly Queue<QueueData> m_SendQueue = new Queue<QueueData>();
+ private readonly object m_LockQueue = new object();
+ private readonly IRemoteTestResultDataFactory m_TestResultDataFactory = new RemoteTestResultDataFactory();
+
+ public void Start()
+ {
+ PlayerConnection.instance.Register(PlayerConnectionMessageIds.quitPlayerMessageId, EditorProccessedTheResult);
+ StartCoroutine(SendDataRoutine());
+ }
+
+ private void EditorProccessedTheResult(MessageEventArgs arg0)
+ {
+ if (arg0.data != null)
+ {
+ return;
+ }
+
+ //Some platforms don't quit, so we need to disconnect to make sure they will not connect to another editor instance automatically.
+ PlayerConnection.instance.DisconnectAll();
+
+ //XBOX has an error when quitting
+ if (Application.platform == RuntimePlatform.XboxOne)
+ {
+ return;
+ }
+ Application.Quit();
+ }
+
+ private byte[] SerializeObject(object objectToSerialize)
+ {
+ return Encoding.UTF8.GetBytes(JsonUtility.ToJson(objectToSerialize));
+ }
+
+ public void RunStarted(ITest testsToRun)
+ {
+ var data = SerializeObject(m_TestResultDataFactory.CreateFromTest(testsToRun));
+ lock (m_LockQueue)
+ {
+ m_SendQueue.Enqueue(new QueueData
+ {
+ id = PlayerConnectionMessageIds.runStartedMessageId,
+ data = data
+ });
+ }
+ }
+
+ public void RunFinished(ITestResult testResults)
+ {
+ var data = SerializeObject(m_TestResultDataFactory.CreateFromTestResult(testResults));
+ lock (m_LockQueue)
+ {
+ m_SendQueue.Enqueue(new QueueData { id = PlayerConnectionMessageIds.runFinishedMessageId, data = data, });
+ }
+ }
+
+ public void TestStarted(ITest test)
+ {
+ var data = SerializeObject(m_TestResultDataFactory.CreateFromTest(test));
+ lock (m_LockQueue)
+ {
+ m_SendQueue.Enqueue(new QueueData
+ {
+ id = PlayerConnectionMessageIds.testStartedMessageId,
+ data = data
+ });
+ }
+ }
+
+ public void TestFinished(ITestResult result)
+ {
+ var testRunnerResultForApi = m_TestResultDataFactory.CreateFromTestResult(result);
+ var resultData = SerializeObject(testRunnerResultForApi);
+ lock (m_LockQueue)
+ {
+ m_SendQueue.Enqueue(new QueueData
+ {
+ id = PlayerConnectionMessageIds.testFinishedMessageId,
+ data = resultData,
+ });
+ }
+ }
+
+ public IEnumerator SendDataRoutine()
+ {
+ while (!PlayerConnection.instance.isConnected)
+ {
+ yield return new WaitForSeconds(1);
+ }
+
+ while (true)
+ {
+ lock (m_LockQueue)
+ {
+ if (PlayerConnection.instance.isConnected && m_SendQueue.Count > 0)
+ {
+ ResetNextPlayerAliveMessageTime();
+ var queueData = m_SendQueue.Dequeue();
+ PlayerConnection.instance.Send(queueData.id, queueData.data);
+ yield return null;
+ }
+
+ //This is needed so we dont stall the player totally
+ if (!m_SendQueue.Any())
+ {
+ SendAliveMessageIfNeeded();
+ yield return new WaitForSeconds(0.02f);
+ }
+ }
+ }
+ }
+
+ private void SendAliveMessageIfNeeded()
+ {
+ if (Time.timeSinceLevelLoad < m_NextliveMessage)
+ {
+ return;
+ }
+
+ Debug.Log("Sending player alive message back to editor.");
+ ResetNextPlayerAliveMessageTime();
+ PlayerConnection.instance.Send(PlayerConnectionMessageIds.playerAliveHeartbeat, new byte[0]);
+ }
+
+ private void ResetNextPlayerAliveMessageTime()
+ {
+ m_NextliveMessage = Time.timeSinceLevelLoad + k_aliveMessageFrequency;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta
new file mode 100644
index 0000000..13af2c8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/RemoteTestResultSender.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 20793418366caf14293b29c55df5e9ec
+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/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs
new file mode 100644
index 0000000..95316e7
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs
@@ -0,0 +1,97 @@
+using System.Collections.Generic;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestTools.TestRunner.Callbacks
+{
+ internal class TestResultRenderer
+ {
+ private static class Styles
+ {
+ public static readonly GUIStyle SucceedLabelStyle;
+ public static readonly GUIStyle FailedLabelStyle;
+ public static readonly GUIStyle FailedMessagesStyle;
+
+ static Styles()
+ {
+ SucceedLabelStyle = new GUIStyle("label");
+ SucceedLabelStyle.normal.textColor = Color.green;
+ SucceedLabelStyle.fontSize = 48;
+
+ FailedLabelStyle = new GUIStyle("label");
+ FailedLabelStyle.normal.textColor = Color.red;
+ FailedLabelStyle.fontSize = 32;
+
+ FailedMessagesStyle = new GUIStyle("label");
+ FailedMessagesStyle.wordWrap = false;
+ FailedMessagesStyle.richText = true;
+ }
+ }
+
+ private readonly List<ITestResult> m_FailedTestCollection;
+
+ private bool m_ShowResults;
+ private Vector2 m_ScrollPosition;
+
+ public TestResultRenderer(ITestResult testResults)
+ {
+ m_FailedTestCollection = new List<ITestResult>();
+ GetFailedTests(testResults);
+ }
+
+ private void GetFailedTests(ITestResult testResults)
+ {
+ if (testResults is TestCaseResult)
+ {
+ if (testResults.ResultState.Status == TestStatus.Failed)
+ m_FailedTestCollection.Add(testResults);
+ }
+ else if (testResults.HasChildren)
+ {
+ foreach (var testResultsChild in testResults.Children)
+ {
+ GetFailedTests(testResultsChild);
+ }
+ }
+ }
+
+ private const int k_MaxStringLength = 15000;
+
+ public void ShowResults()
+ {
+ m_ShowResults = true;
+ Cursor.visible = true;
+ }
+
+ public void Draw()
+ {
+ if (!m_ShowResults) return;
+ if (m_FailedTestCollection.Count == 0)
+ {
+ GUILayout.Label("All test(s) succeeded", Styles.SucceedLabelStyle, GUILayout.Width(600));
+ }
+ else
+ {
+ int count = m_FailedTestCollection.Count;
+ GUILayout.Label(count + " tests failed!", Styles.FailedLabelStyle);
+
+ m_ScrollPosition = GUILayout.BeginScrollView(m_ScrollPosition, GUILayout.ExpandWidth(true));
+ var text = "";
+
+ text += "<b><size=18>Code-based tests</size></b>\n";
+ text += string.Join("\n", m_FailedTestCollection
+ .Select(result => result.Name + " " + result.ResultState + "\n" + result.Message)
+ .ToArray());
+
+ if (text.Length > k_MaxStringLength)
+ text = text.Substring(0, k_MaxStringLength);
+
+ GUILayout.TextArea(text, Styles.FailedMessagesStyle);
+ GUILayout.EndScrollView();
+ }
+ if (GUILayout.Button("Close"))
+ Application.Quit();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs.meta
new file mode 100644
index 0000000..1814f78
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRenderer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5ebb87899ca30b743bb4274bc00c02b4
+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/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs
new file mode 100644
index 0000000..9f5ce05
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs
@@ -0,0 +1,36 @@
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestTools.TestRunner.Callbacks
+{
+ internal class TestResultRendererCallback : MonoBehaviour, ITestRunnerListener
+ {
+ private TestResultRenderer m_ResultRenderer;
+ public void RunStarted(ITest testsToRun)
+ {
+ }
+
+ public void RunFinished(ITestResult testResults)
+ {
+ if (Camera.main == null)
+ {
+ gameObject.AddComponent<Camera>();
+ }
+ m_ResultRenderer = new TestResultRenderer(testResults);
+ m_ResultRenderer.ShowResults();
+ }
+
+ public void OnGUI()
+ {
+ if (m_ResultRenderer != null)
+ m_ResultRenderer.Draw();
+ }
+
+ public void TestStarted(ITest test)
+ {
+ }
+
+ public void TestFinished(ITestResult result)
+ {
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs.meta
new file mode 100644
index 0000000..21e7ef0
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Callbacks/TestResultRendererCallback.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dfc336f10b83bd74eaded16a658275c7
+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/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs
new file mode 100644
index 0000000..358ac74
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs
@@ -0,0 +1,26 @@
+using System;
+using NUnit.Framework.Interfaces;
+using UnityEngine.Events;
+
+namespace UnityEngine.TestTools.TestRunner
+{
+ internal interface ITestRunnerListener
+ {
+ void RunStarted(ITest testsToRun);
+ void RunFinished(ITestResult testResults);
+ void TestStarted(ITest test);
+ void TestFinished(ITestResult result);
+ }
+
+ [Serializable]
+ internal class TestFinishedEvent : UnityEvent<ITestResult> {}
+
+ [Serializable]
+ internal class TestStartedEvent : UnityEvent<ITest> {}
+
+ [Serializable]
+ internal class RunFinishedEvent : UnityEvent<ITestResult> {}
+
+ [Serializable]
+ internal class RunStartedEvent : UnityEvent<ITest> {}
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs.meta
new file mode 100644
index 0000000..8a6ef78
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/ITestRunnerListener.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d1b534518943030499685344fd1d476d
+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/UnityEngine.TestRunner/TestRunner/Messages.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages.meta
new file mode 100644
index 0000000..0a8a314
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 256a0ca37fa972840bce7fca446e75e7
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs
new file mode 100644
index 0000000..da4bcb5
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs
@@ -0,0 +1,12 @@
+using System.Collections;
+
+namespace UnityEngine.TestTools
+{
+ public interface IEditModeTestYieldInstruction
+ {
+ bool ExpectDomainReload { get; }
+ bool ExpectedPlaymodeState { get; }
+
+ IEnumerator Perform();
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs.meta
new file mode 100644
index 0000000..5760500
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/Messages/IEditModeTestYieldInstruction.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 898bc38486fc899428fbe5bd6adfe473
+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/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs
new file mode 100644
index 0000000..7375557
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs
@@ -0,0 +1,129 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using UnityEngine.SceneManagement;
+using UnityEngine.TestRunner.NUnitExtensions;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+using UnityEngine.TestTools.NUnitExtensions;
+using UnityEngine.TestTools.Utils;
+
+namespace UnityEngine.TestTools.TestRunner
+{
+ [Serializable]
+ [AddComponentMenu("")]
+ internal class PlaymodeTestsController : MonoBehaviour
+ {
+ private IEnumerator m_TestSteps;
+
+ [SerializeField]
+ private List<string> m_AssembliesWithTests;
+ public List<string> AssembliesWithTests
+ {
+ get
+ {
+ return m_AssembliesWithTests;
+ }
+ set
+ {
+ m_AssembliesWithTests = value;
+ }
+ }
+
+ [SerializeField]
+ internal TestStartedEvent testStartedEvent = new TestStartedEvent();
+ [SerializeField]
+ internal TestFinishedEvent testFinishedEvent = new TestFinishedEvent();
+ [SerializeField]
+ internal RunStartedEvent runStartedEvent = new RunStartedEvent();
+ [SerializeField]
+ internal RunFinishedEvent runFinishedEvent = new RunFinishedEvent();
+
+ internal const string kPlaymodeTestControllerName = "Code-based tests runner";
+
+ [SerializeField]
+ public PlaymodeTestsControllerSettings settings = new PlaymodeTestsControllerSettings();
+
+ internal UnityTestAssemblyRunner m_Runner;
+
+ public IEnumerator Start()
+ {
+ //Skip 2 frame because Unity.
+ yield return null;
+ yield return null;
+ StartCoroutine(Run());
+ }
+
+ internal static bool IsControllerOnScene()
+ {
+ return GameObject.Find(kPlaymodeTestControllerName) != null;
+ }
+
+ internal static PlaymodeTestsController GetController()
+ {
+ return GameObject.Find(kPlaymodeTestControllerName).GetComponent<PlaymodeTestsController>();
+ }
+
+ public IEnumerator TestRunnerCoroutine()
+ {
+ while (m_TestSteps.MoveNext())
+ {
+ yield return m_TestSteps.Current;
+ }
+
+ if (m_Runner.IsTestComplete)
+ {
+ runFinishedEvent.Invoke(m_Runner.Result);
+ Cleanup();
+
+ yield return null;
+ }
+ }
+
+ public IEnumerator Run()
+ {
+ CoroutineTestWorkItem.monoBehaviourCoroutineRunner = this;
+ gameObject.hideFlags |= HideFlags.DontSave;
+
+ if (settings.sceneBased)
+ {
+ SceneManager.LoadScene(1, LoadSceneMode.Additive);
+ yield return null;
+ }
+
+ var testListUtil = new PlayerTestAssemblyProvider(new AssemblyLoadProxy(), m_AssembliesWithTests);
+ m_Runner = new UnityTestAssemblyRunner(new UnityTestAssemblyBuilder(), new PlaymodeWorkItemFactory());
+
+ var loadedTests = m_Runner.Load(testListUtil.GetUserAssemblies().Select(a => a.Assembly).ToArray(), TestPlatform.PlayMode, UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(TestPlatform.PlayMode));
+ loadedTests.ParseForNameDuplicates();
+ runStartedEvent.Invoke(m_Runner.LoadedTest);
+
+ var testListenerWrapper = new TestListenerWrapper(testStartedEvent, testFinishedEvent);
+ m_TestSteps = m_Runner.Run(testListenerWrapper, settings.BuildNUnitFilter()).GetEnumerator();
+
+ yield return TestRunnerCoroutine();
+ }
+
+ public void Cleanup()
+ {
+ if (m_Runner != null)
+ {
+ m_Runner.StopRun();
+ m_Runner = null;
+ }
+ if (Application.isEditor)
+ {
+ Destroy(gameObject);
+ }
+ }
+
+ public static void TryCleanup()
+ {
+ var controller = GetController();
+ if (controller != null)
+ {
+ controller.Cleanup();
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs.meta
new file mode 100644
index 0000000..ba95396
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsController.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 102e512f651ee834f951a2516c1ea3b8
+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/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs
new file mode 100644
index 0000000..a062b55
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs
@@ -0,0 +1,36 @@
+using System;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal.Filters;
+using UnityEngine.SceneManagement;
+using UnityEngine.TestTools.TestRunner.GUI;
+
+namespace UnityEngine.TestTools.TestRunner
+{
+ [Serializable]
+ internal class PlaymodeTestsControllerSettings
+ {
+ [SerializeField]
+ public TestRunnerFilter[] filters;
+ public bool sceneBased;
+ public string originalScene;
+ public string bootstrapScene;
+
+ public static PlaymodeTestsControllerSettings CreateRunnerSettings(TestRunnerFilter[] filters)
+ {
+ var settings = new PlaymodeTestsControllerSettings
+ {
+ filters = filters,
+ sceneBased = false,
+ originalScene = SceneManager.GetActiveScene().path,
+ bootstrapScene = null
+ };
+ return settings;
+ }
+
+ internal ITestFilter BuildNUnitFilter()
+ {
+ return new OrFilter(filters.Select(f => f.BuildNUnitFilter()).ToArray());
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs.meta
new file mode 100644
index 0000000..d354fad
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/PlaymodeTestsControllerSettings.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2799eb4c84e72e54092a292cf626936b
+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/UnityEngine.TestRunner/TestRunner/RemoteHelpers.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers.meta
new file mode 100644
index 0000000..e70ae47
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 91c20d2c22b8b3a4cb6c816bd225591a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs
new file mode 100644
index 0000000..1032e6a
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs
@@ -0,0 +1,11 @@
+using System;
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestRunner.TestLaunchers
+{
+ internal interface IRemoteTestResultDataFactory
+ {
+ RemoteTestResultDataWithTestData CreateFromTestResult(ITestResult result);
+ RemoteTestResultDataWithTestData CreateFromTest(ITest test);
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs.meta
new file mode 100644
index 0000000..173f175
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/IRemoteTestResultDataFactory.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 874c0713cdc44f549b0161750b48d2c2
+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/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs
new file mode 100644
index 0000000..58f6263
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs
@@ -0,0 +1,14 @@
+using System;
+
+namespace UnityEngine.TestRunner.TestLaunchers
+{
+ internal static class PlayerConnectionMessageIds
+ {
+ public static Guid runStartedMessageId { get { return new Guid("6a7f53dd-4672-461d-a7b5-9467e9393fd3"); } }
+ public static Guid runFinishedMessageId { get { return new Guid("ffb622fc-34ad-4901-8d7b-47fb04b0bdd4"); } }
+ public static Guid testStartedMessageId { get { return new Guid("b54d241e-d88d-4dba-8c8f-ee415d11c030"); } }
+ public static Guid testFinishedMessageId { get { return new Guid("72f7b7f4-6829-4cd1-afde-78872b9d5adc"); } }
+ public static Guid quitPlayerMessageId { get { return new Guid("ab44bfe0-bb50-4ee6-9977-69d2ea6bb3a0"); } }
+ public static Guid playerAliveHeartbeat { get { return new Guid("8c0c307b-f7fd-4216-8623-35b4b3f55fb6"); } }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs.meta
new file mode 100644
index 0000000..1b606e4
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/PlayerConnectionMessageIds.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 41d60936b62cc6d4ca7fe628b22b0e40
+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/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs
new file mode 100644
index 0000000..eaf7078
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs
@@ -0,0 +1,56 @@
+using System;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using UnityEngine.TestRunner.NUnitExtensions;
+
+namespace UnityEngine.TestRunner.TestLaunchers
+{
+ [Serializable]
+ internal class RemoteTestData
+ {
+ public string id;
+ public string name;
+ public string fullName;
+ public int testCaseCount;
+ public int ChildIndex;
+ public bool hasChildren;
+ public bool isSuite;
+ public string[] childrenIds;
+ public int testCaseTimeout;
+ public string[] Categories;
+ public bool IsTestAssembly;
+ public RunState RunState;
+ public string Description;
+ public string SkipReason;
+ public string ParentId;
+ public string UniqueName;
+ public string ParentUniqueName;
+ public string ParentFullName;
+
+ internal RemoteTestData(ITest test)
+ {
+ id = test.Id;
+ name = test.Name;
+ fullName = test.FullName;
+ testCaseCount = test.TestCaseCount;
+ ChildIndex = -1;
+ if (test.Properties["childIndex"].Count > 0)
+ {
+ ChildIndex = (int)test.Properties["childIndex"][0];
+ }
+ hasChildren = test.HasChildren;
+ isSuite = test.IsSuite;
+ childrenIds = test.Tests.Select(t => t.Id).ToArray();
+ Categories = test.GetAllCategoriesFromTest().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();
+ UniqueName = test.GetUniqueName();
+ ParentUniqueName = test.GetParentUniqueName();
+ ParentFullName = test.GetParentFullName();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs.meta
new file mode 100644
index 0000000..34b9c5a
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b135ec222fdcd11468014c90d11d6821
+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/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs
new file mode 100644
index 0000000..a0a34c3
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs
@@ -0,0 +1,54 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestRunner.TestLaunchers
+{
+ [Serializable]
+ internal class RemoteTestResultData
+ {
+ public string testId;
+ public string name;
+ public string fullName;
+ public string resultState;
+ public TestStatus testStatus;
+ public double duration;
+ public DateTime startTime;
+ public DateTime endTime;
+ public string message;
+ public string stackTrace;
+ public int assertCount;
+ public int failCount;
+ public int passCount;
+ public int skipCount;
+ public int inconclusiveCount;
+ public bool hasChildren;
+ public string output;
+ public string xml;
+ public string[] childrenIds;
+
+ internal RemoteTestResultData(ITestResult result)
+ {
+ testId = result.Test.Id;
+ name = result.Name;
+ fullName = result.FullName;
+ resultState = result.ResultState.ToString();
+ testStatus = 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;
+ xml = result.ToXml(true).OuterXml;
+ childrenIds = result.Children.Select(child => child.Test.Id).ToArray();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs.meta
new file mode 100644
index 0000000..247a8a3
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 03e4d63665d06f04c8a6cf68133c1592
+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/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs
new file mode 100644
index 0000000..356a39d
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs
@@ -0,0 +1,51 @@
+using System.Collections.Generic;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestRunner.TestLaunchers
+{
+ internal class RemoteTestResultDataFactory : IRemoteTestResultDataFactory
+ {
+ public RemoteTestResultDataWithTestData CreateFromTestResult(ITestResult result)
+ {
+ var tests = CreateTestDataList(result.Test);
+ tests.First().testCaseTimeout = UnityTestExecutionContext.CurrentContext.TestCaseTimeout;
+ return new RemoteTestResultDataWithTestData()
+ {
+ results = CreateTestResultDataList(result),
+ tests = tests
+ };
+ }
+
+ public RemoteTestResultDataWithTestData CreateFromTest(ITest test)
+ {
+ var tests = CreateTestDataList(test);
+ if (UnityTestExecutionContext.CurrentContext != null)
+ {
+ tests.First().testCaseTimeout = UnityTestExecutionContext.CurrentContext.TestCaseTimeout;
+ }
+
+ return new RemoteTestResultDataWithTestData()
+ {
+ tests = tests
+ };
+ }
+
+ private RemoteTestData[] CreateTestDataList(ITest test)
+ {
+ var list = new List<RemoteTestData>();
+ list.Add(new RemoteTestData(test));
+ list.AddRange(test.Tests.SelectMany(CreateTestDataList));
+ return list.ToArray();
+ }
+
+ private static RemoteTestResultData[] CreateTestResultDataList(ITestResult result)
+ {
+ var list = new List<RemoteTestResultData>();
+ list.Add(new RemoteTestResultData(result));
+ list.AddRange(result.Children.SelectMany(CreateTestResultDataList));
+ return list.ToArray();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs.meta
new file mode 100644
index 0000000..575b017
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataFactory.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 826b6becaef90fb458eedebe4c2f3664
+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/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs
new file mode 100644
index 0000000..5b28f49
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestRunner.TestLaunchers
+{
+ [Serializable]
+ internal class RemoteTestResultDataWithTestData
+ {
+ public RemoteTestResultData[] results;
+ public RemoteTestData[] tests;
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs.meta
new file mode 100644
index 0000000..ea1a860
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/RemoteHelpers/RemoteTestResultDataWithTestData.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 475e3699f219c854f8581a9838135002
+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/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs
new file mode 100644
index 0000000..6916d81
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs
@@ -0,0 +1,51 @@
+using System.Collections;
+using System.Linq;
+using System.Reflection;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestTools.TestRunner.GUI
+{
+ class SynchronousFilter : ITestFilter
+ {
+ public TNode ToXml(bool recursive)
+ {
+ return new TNode("synchronousOnly");
+ }
+
+ public TNode AddToXml(TNode parentNode, bool recursive)
+ {
+ return parentNode.AddElement("synchronousOnly");
+ }
+
+ public bool Pass(ITest test)
+ {
+ if (test.Method == null)
+ return true;
+
+ if (test.Method.ReturnType.Type == typeof(IEnumerator))
+ return false;
+
+ if (test.Method.GetCustomAttributes<IOuterUnityTestAction>(true).Any())
+ return false;
+
+ if (test.TypeInfo?.Type != null)
+ {
+ if (Reflect.GetMethodsWithAttribute(test.TypeInfo.Type, typeof(UnitySetUpAttribute), true)
+ .Any(mi => mi.ReturnType == typeof(System.Collections.IEnumerator)))
+ return false;
+
+ if (Reflect.GetMethodsWithAttribute(test.TypeInfo.Type, typeof(UnityTearDownAttribute), true)
+ .Any(mi => mi.ReturnType == typeof(System.Collections.IEnumerator)))
+ return false;
+ }
+
+ return true;
+ }
+
+ public bool IsExplicitMatch(ITest test)
+ {
+ return Pass(test);
+ }
+ }
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs.meta
new file mode 100644
index 0000000..809accf
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/SynchronousFilter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b9aec9d3b0a86466ab4647d01e8fc87d
+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/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs
new file mode 100644
index 0000000..31171d1
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections;
+using System.Reflection;
+using NUnit.Framework;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+
+namespace UnityEngine.TestTools.TestRunner
+{
+ internal class TestEnumeratorWrapper
+ {
+ private readonly TestMethod m_TestMethod;
+
+ public TestEnumeratorWrapper(TestMethod testMethod)
+ {
+ m_TestMethod = testMethod;
+ }
+
+ public IEnumerator GetEnumerator(ITestExecutionContext context)
+ {
+ if (m_TestMethod.Method.ReturnType.Type == typeof(IEnumerator))
+ {
+ return HandleEnumerableTest(context);
+ }
+ var message = string.Format("Return type {0} of {1} in {2} is not supported.",
+ m_TestMethod.Method.ReturnType, m_TestMethod.Method.Name, m_TestMethod.Method.TypeInfo.FullName);
+ if (m_TestMethod.Method.ReturnType.Type == typeof(IEnumerable))
+ {
+ message += "\nDid you mean IEnumerator?";
+ }
+ throw new InvalidSignatureException(message);
+ }
+
+ private IEnumerator HandleEnumerableTest(ITestExecutionContext context)
+ {
+ try
+ {
+ return m_TestMethod.Method.MethodInfo.Invoke(context.TestObject, m_TestMethod.parms != null ? m_TestMethod.parms.OriginalArguments : null) as IEnumerator;
+ }
+ catch (TargetInvocationException e)
+ {
+ if (e.InnerException is IgnoreException)
+ {
+ context.CurrentResult.SetResult(ResultState.Ignored, e.InnerException.Message);
+ return null;
+ }
+ throw;
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs.meta
new file mode 100644
index 0000000..41bc421
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestEnumeratorWrapper.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9ad0b0c865b01af4ca1b414689e71259
+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/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs
new file mode 100644
index 0000000..0c1c75e
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs
@@ -0,0 +1,30 @@
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestTools.TestRunner
+{
+ internal class TestListenerWrapper : ITestListener
+ {
+ private readonly TestFinishedEvent m_TestFinishedEvent;
+ private readonly TestStartedEvent m_TestStartedEvent;
+
+ public TestListenerWrapper(TestStartedEvent testStartedEvent, TestFinishedEvent testFinishedEvent)
+ {
+ m_TestStartedEvent = testStartedEvent;
+ m_TestFinishedEvent = testFinishedEvent;
+ }
+
+ public void TestStarted(ITest test)
+ {
+ m_TestStartedEvent.Invoke(test);
+ }
+
+ public void TestFinished(ITestResult result)
+ {
+ m_TestFinishedEvent.Invoke(result);
+ }
+
+ public void TestOutput(TestOutput output)
+ {
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs.meta
new file mode 100644
index 0000000..963a50e
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestListenerWrapper.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 73deb9b8722aa284eab27c4dc90956c6
+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/UnityEngine.TestRunner/TestRunner/TestPlatform.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestPlatform.cs
new file mode 100644
index 0000000..2c8a3a8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestPlatform.cs
@@ -0,0 +1,21 @@
+using System;
+
+namespace UnityEngine.TestTools
+{
+ [Flags]
+ [Serializable]
+ public enum TestPlatform : byte
+ {
+ All = 0xFF,
+ EditMode = 1 << 1,
+ PlayMode = 1 << 2
+ }
+
+ internal static class TestPlatformEnumExtensions
+ {
+ public static bool IsFlagIncluded(this TestPlatform flags, TestPlatform flag)
+ {
+ return (flags & flag) == flag;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestPlatform.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestPlatform.cs.meta
new file mode 100644
index 0000000..ea2e596
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestPlatform.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 743879b4db4bc1a4b829aae4386f4acf
+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/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs
new file mode 100644
index 0000000..68e3761
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs
@@ -0,0 +1,203 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.RegularExpressions;
+using System.IO;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using NUnit.Framework.Internal.Filters;
+using UnityEngine.TestRunner.NUnitExtensions.Filters;
+
+namespace UnityEngine.TestTools.TestRunner.GUI
+{
+ [Serializable]
+ internal class TestRunnerFilter
+ {
+#pragma warning disable 649
+ public string[] assemblyNames;
+ public string[] groupNames;
+ public string[] categoryNames;
+ public static TestRunnerFilter empty = new TestRunnerFilter();
+ public string[] testNames;
+ public int testRepetitions = 1;
+ public bool synchronousOnly = false;
+
+ public static string AssemblyNameFromPath(string path)
+ {
+ string output = Path.GetFileName(path);
+ if (output != null && output.EndsWith(".dll", StringComparison.OrdinalIgnoreCase))
+ return output.Substring(0, output.Length - 4);
+ return output;
+ }
+
+ private bool CategoryMatches(IEnumerable<string> categories)
+ {
+ if (categoryNames == null || categoryNames.Length == 0)
+ return true;
+
+ foreach (string category in categories)
+ {
+ if (categoryNames.Contains(category))
+ return true;
+ }
+
+ return false;
+ }
+
+ private bool IDMatchesAssembly(string id)
+ {
+ if (AreOptionalFiltersEmpty())
+ return true;
+
+ if (assemblyNames == null)
+ return false;
+
+ int openingBracket = id.IndexOf('[');
+ int closingBracket = id.IndexOf(']');
+ if (openingBracket >= 0 && openingBracket < id.Length && closingBracket > openingBracket && openingBracket < id.Length)
+ {
+ //Some assemblies are absolute and explicitly part of the test ID e.g.
+ //"[/path/to/assembly-name.dll][rest of ID ...]"
+ //While some are minimal assembly names e.g.
+ //"[assembly-name][rest of ID ...]"
+ //Strip them down to just the assembly name
+ string assemblyNameFromID = AssemblyNameFromPath(id.Substring(openingBracket + 1, closingBracket - openingBracket - 1));
+ foreach (string assemblyName in assemblyNames)
+ {
+ if (assemblyName.Equals(assemblyNameFromID, StringComparison.OrdinalIgnoreCase))
+ return true;
+ }
+ }
+ return false;
+ }
+
+ private bool NameMatches(string name)
+ {
+ if (AreOptionalFiltersEmpty())
+ return true;
+
+ if (groupNames == null)
+ return false;
+
+ foreach (var nameFromFilter in groupNames)
+ {
+ //Strict regex match for test group name on its own
+ if (Regex.IsMatch(name, nameFromFilter))
+ return true;
+ //Match test names that end with parametrized test values and full nunit generated test names that have . separators
+ var regex = nameFromFilter.TrimEnd('$') + @"[\.|\(.*\)]";
+ if (Regex.IsMatch(name, regex))
+ return true;
+ }
+ return false;
+ }
+
+ private bool AreOptionalFiltersEmpty()
+ {
+ if (assemblyNames != null && assemblyNames.Length != 0)
+ return false;
+ if (groupNames != null && groupNames.Length != 0)
+ return false;
+ if (testNames != null && testNames.Length != 0)
+ return false;
+ return true;
+ }
+
+ private bool NameMatchesExactly(string name)
+ {
+ if (AreOptionalFiltersEmpty())
+ return true;
+
+ if (testNames == null)
+ return false;
+
+ foreach (var exactName in testNames)
+ {
+ if (name == exactName)
+ return true;
+ }
+ return false;
+ }
+
+ private static void ClearAncestors(IEnumerable<IClearableResult> newResultList, string parentID)
+ {
+ if (string.IsNullOrEmpty(parentID))
+ return;
+ foreach (var result in newResultList)
+ {
+ if (result.Id == parentID)
+ {
+ result.Clear();
+ ClearAncestors(newResultList, result.ParentId);
+ break;
+ }
+ }
+ }
+
+ public void ClearResults(List<IClearableResult> newResultList)
+ {
+ foreach (var result in newResultList)
+ {
+ if (!result.IsSuite && CategoryMatches(result.Categories))
+ {
+ if (IDMatchesAssembly(result.Id) || NameMatches(result.FullName) || NameMatchesExactly(result.FullName))
+ {
+ result.Clear();
+ ClearAncestors(newResultList, result.ParentId);
+ }
+ }
+ }
+ }
+
+ public ITestFilter BuildNUnitFilter()
+ {
+ var filters = new List<ITestFilter>();
+
+ 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());
+ }
+
+ internal interface IClearableResult
+ {
+ string Id { get; }
+ string FullName { get; }
+ string ParentId { get; }
+ bool IsSuite { get; }
+ List<string> Categories { get; }
+ void Clear();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs.meta
new file mode 100644
index 0000000..671327b
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/TestRunner/TestRunnerFilter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a025ba7ee40d0104db8d08b1d9eabb0d
+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/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef
new file mode 100644
index 0000000..f85c16a
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef
@@ -0,0 +1,13 @@
+{
+ "name": "UnityEngine.TestRunner",
+ "references": [],
+ "includePlatforms": [],
+ "excludePlatforms": [],
+ "allowUnsafeCode": false,
+ "overrideReferences": true,
+ "precompiledReferences": [
+ "nunit.framework.dll"
+ ],
+ "autoReferenced": false,
+ "defineConstraints": []
+} \ No newline at end of file
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef.meta
new file mode 100644
index 0000000..5f4a7ac
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/UnityEngine.TestRunner.asmdef.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 27619889b8ba8c24980f49ee34dbb44a
+AssemblyDefinitionImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils.meta
new file mode 100644
index 0000000..4cc1a1f
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: bb32bccaf32a6db448d1c0cc99c78688
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider.meta
new file mode 100644
index 0000000..e12e5eb
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 51557afa652635743b264a309f0a5c60
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs
new file mode 100644
index 0000000..be41950
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs
@@ -0,0 +1,12 @@
+using System.Reflection;
+
+namespace UnityEngine.TestTools.Utils
+{
+ internal class AssemblyLoadProxy : IAssemblyLoadProxy
+ {
+ public IAssemblyWrapper Load(string assemblyString)
+ {
+ return new AssemblyWrapper(Assembly.Load(assemblyString));
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs.meta
new file mode 100644
index 0000000..26b76a6
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyLoadProxy.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fb593906b7b6d824087dcaebf6c082e0
+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/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs
new file mode 100644
index 0000000..86d450e
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs
@@ -0,0 +1,30 @@
+using System;
+using System.Reflection;
+
+namespace UnityEngine.TestTools.Utils
+{
+ internal class AssemblyWrapper : IAssemblyWrapper
+ {
+ public AssemblyWrapper(Assembly assembly)
+ {
+ Assembly = assembly;
+ }
+
+ public Assembly Assembly { get; }
+
+ public virtual string Location
+ {
+ get
+ {
+ //Some platforms dont support this
+ throw new NotImplementedException();
+ }
+ }
+
+ public virtual AssemblyName[] GetReferencedAssemblies()
+ {
+ //Some platforms dont support this
+ throw new NotImplementedException();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs.meta
new file mode 100644
index 0000000..bd3090c
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/AssemblyWrapper.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 2e3b9bbf2c1a3cd4f88883ca32882ec6
+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/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs
new file mode 100644
index 0000000..6e05914
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs
@@ -0,0 +1,7 @@
+namespace UnityEngine.TestTools.Utils
+{
+ internal interface IAssemblyLoadProxy
+ {
+ IAssemblyWrapper Load(string assemblyString);
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs.meta
new file mode 100644
index 0000000..a794168
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyLoadProxy.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 12dfd4bdbb5c8e6419432fbc54ef25d9
+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/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs
new file mode 100644
index 0000000..d423db9
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs
@@ -0,0 +1,11 @@
+using System.Reflection;
+
+namespace UnityEngine.TestTools.Utils
+{
+ internal interface IAssemblyWrapper
+ {
+ Assembly Assembly { get; }
+ string Location { get; }
+ AssemblyName[] GetReferencedAssemblies();
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs.meta
new file mode 100644
index 0000000..ae919ef
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IAssemblyWrapper.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 1c5afe945b715e149a70113a4be7b32a
+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/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs
new file mode 100644
index 0000000..2bb572d
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs
@@ -0,0 +1,7 @@
+namespace UnityEngine.TestTools.Utils
+{
+ internal interface IScriptingRuntimeProxy
+ {
+ string[] GetAllUserAssemblies();
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs.meta
new file mode 100644
index 0000000..6002d28
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/IScriptingRuntimeProxy.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fe4aef60e4ace544c8430da8ef8acba2
+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/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs
new file mode 100644
index 0000000..2944936
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs
@@ -0,0 +1,10 @@
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestTools.Utils
+{
+ internal interface ITestAssemblyProvider
+ {
+ ITest GetTestsWithNUnit();
+ IAssemblyWrapper[] GetUserAssemblies();
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs.meta
new file mode 100644
index 0000000..f187c63
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ITestAssemblyProvider.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c5acba6181d845c4e92146009bd4480f
+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/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs
new file mode 100644
index 0000000..0b47e1d
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs
@@ -0,0 +1,66 @@
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using NUnit.Framework.Interfaces;
+using UnityEngine.TestTools.NUnitExtensions;
+
+namespace UnityEngine.TestTools.Utils
+{
+ internal class PlayerTestAssemblyProvider
+ {
+ private IAssemblyLoadProxy m_AssemblyLoadProxy;
+ private readonly List<string> m_AssembliesToLoad;
+
+ //Cached until domain reload
+ private static List<IAssemblyWrapper> m_LoadedAssemblies;
+
+ internal PlayerTestAssemblyProvider(IAssemblyLoadProxy assemblyLoadProxy, List<string> assembliesToLoad)
+ {
+ m_AssemblyLoadProxy = assemblyLoadProxy;
+ m_AssembliesToLoad = assembliesToLoad;
+ LoadAssemblies();
+ }
+
+ public ITest GetTestsWithNUnit()
+ {
+ return BuildTests(TestPlatform.PlayMode, m_LoadedAssemblies.ToArray());
+ }
+
+ public List<IAssemblyWrapper> GetUserAssemblies()
+ {
+ return m_LoadedAssemblies;
+ }
+
+ protected static ITest BuildTests(TestPlatform testPlatform, IAssemblyWrapper[] assemblies)
+ {
+ var settings = UnityTestAssemblyBuilder.GetNUnitTestBuilderSettings(testPlatform);
+ var builder = new UnityTestAssemblyBuilder();
+ return builder.Build(assemblies.Select(a => a.Assembly).ToArray(), Enumerable.Repeat(testPlatform, assemblies.Length).ToArray(), settings);
+ }
+
+ private void LoadAssemblies()
+ {
+ if (m_LoadedAssemblies != null)
+ {
+ return;
+ }
+
+ m_LoadedAssemblies = new List<IAssemblyWrapper>();
+
+ foreach (var userAssembly in m_AssembliesToLoad)
+ {
+ IAssemblyWrapper a;
+ try
+ {
+ a = m_AssemblyLoadProxy.Load(userAssembly);
+ }
+ catch (FileNotFoundException)
+ {
+ continue;
+ }
+ if (a != null)
+ m_LoadedAssemblies.Add(a);
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs.meta
new file mode 100644
index 0000000..f2c86cd
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/PlayerTestAssemblyProvider.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 43a3aec217baa9644a7cf34b5f93fed9
+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/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs
new file mode 100644
index 0000000..d84470e
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs
@@ -0,0 +1,10 @@
+namespace UnityEngine.TestTools.Utils
+{
+ internal class ScriptingRuntimeProxy : IScriptingRuntimeProxy
+ {
+ public string[] GetAllUserAssemblies()
+ {
+ return ScriptingRuntime.GetAllUserAssemblies();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta
new file mode 100644
index 0000000..2baf4f4
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AssemblyProvider/ScriptingRuntimeProxy.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f3a361a6ad1aff14ba8f48976e94ad76
+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/UnityEngine.TestRunner/Utils/AttributeHelper.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AttributeHelper.cs
new file mode 100644
index 0000000..9d2269b
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AttributeHelper.cs
@@ -0,0 +1,45 @@
+using System;
+using System.IO;
+using System.Linq;
+
+namespace UnityEngine.TestTools
+{
+ internal static class AttributeHelper
+ {
+ internal static Type GetTargetClassFromName(string targetClassName, Type attributeInterface)
+ {
+ Type targetClass = null;
+ foreach (var assemblyName in ScriptingRuntime.GetAllUserAssemblies())
+ {
+ // we need to pass the assembly name without the .dll extension, so removing that first
+ var name = Path.GetFileNameWithoutExtension(assemblyName);
+ targetClass = Type.GetType(targetClassName + "," + name);
+ if (targetClass != null)
+ break;
+ }
+
+ if (targetClass == null)
+ {
+ Debug.LogWarningFormat("Class type not found: " + targetClassName);
+ return null;
+ }
+
+ ValidateTargetClass(targetClass, attributeInterface);
+ return targetClass;
+ }
+
+ private static void ValidateTargetClass(Type targetClass, Type attributeInterface)
+ {
+ var constructorInfos = targetClass.GetConstructors();
+ if (constructorInfos.All(constructor => constructor.GetParameters().Length != 0))
+ {
+ Debug.LogWarningFormat("{0} does not implement default constructor", targetClass.Name);
+ }
+
+ if (!attributeInterface.IsAssignableFrom(targetClass))
+ {
+ Debug.LogWarningFormat("{0} does not implement {1}", targetClass.Name, attributeInterface.Name);
+ }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AttributeHelper.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AttributeHelper.cs.meta
new file mode 100644
index 0000000..5ed31a9
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/AttributeHelper.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ae8ce3ffe04ac2c42945fd27e0291fc3
+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/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs
new file mode 100644
index 0000000..347ec93
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs
@@ -0,0 +1,36 @@
+using System.Collections.Generic;
+
+namespace UnityEngine.TestTools.Utils
+{
+ public class ColorEqualityComparer : IEqualityComparer<Color>
+ {
+ private const float k_DefaultError = 0.01f;
+ private readonly float AllowedError;
+
+
+ private static readonly ColorEqualityComparer m_Instance = new ColorEqualityComparer();
+ public static ColorEqualityComparer Instance { get { return m_Instance; } }
+
+ private ColorEqualityComparer() : this(k_DefaultError)
+ {
+ }
+
+ public ColorEqualityComparer(float error)
+ {
+ this.AllowedError = error;
+ }
+
+ public bool Equals(Color expected, Color actual)
+ {
+ return Utils.AreFloatsEqualAbsoluteError(expected.r, actual.r, AllowedError) &&
+ Utils.AreFloatsEqualAbsoluteError(expected.g, actual.g, AllowedError) &&
+ Utils.AreFloatsEqualAbsoluteError(expected.b, actual.b, AllowedError) &&
+ Utils.AreFloatsEqualAbsoluteError(expected.a, actual.a, AllowedError);
+ }
+
+ public int GetHashCode(Color color)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs.meta
new file mode 100644
index 0000000..87a9fe8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ColorEqualityComparer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d6105bc8cf5ce544487daca4cbc62583
+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/UnityEngine.TestRunner/Utils/CoroutineRunner.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/CoroutineRunner.cs
new file mode 100644
index 0000000..e775aa7
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/CoroutineRunner.cs
@@ -0,0 +1,103 @@
+using System;
+using System.Collections;
+using NUnit.Framework.Internal;
+using UnityEngine.TestRunner.NUnitExtensions.Runner;
+
+namespace UnityEngine.TestTools.Utils
+{
+ internal class CoroutineRunner
+ {
+ private bool m_Running;
+ private bool m_TestFailed;
+ private bool m_Timeout;
+ private readonly MonoBehaviour m_Controller;
+ private readonly UnityTestExecutionContext m_Context;
+ private Coroutine m_TimeOutCoroutine;
+ private IEnumerator m_TestCoroutine;
+
+ internal const int k_DefaultTimeout = 1000 * 180;
+
+ public CoroutineRunner(MonoBehaviour playmodeTestsController, UnityTestExecutionContext context)
+ {
+ m_Controller = playmodeTestsController;
+ m_Context = context;
+ }
+
+ public IEnumerator HandleEnumerableTest(IEnumerator testEnumerator)
+ {
+ if (m_Context.TestCaseTimeout == 0)
+ {
+ m_Context.TestCaseTimeout = k_DefaultTimeout;
+ }
+ do
+ {
+ if (!m_Running)
+ {
+ m_Running = true;
+ m_TestCoroutine = ExMethod(testEnumerator, m_Context.TestCaseTimeout);
+ m_Controller.StartCoroutine(m_TestCoroutine);
+ }
+ if (m_TestFailed)
+ {
+ StopAllRunningCoroutines();
+ yield break;
+ }
+
+ if (m_Context.ExecutionStatus == TestExecutionStatus.StopRequested || m_Context.ExecutionStatus == TestExecutionStatus.AbortRequested)
+ {
+ StopAllRunningCoroutines();
+ yield break;
+ }
+ yield return null;
+ }
+ while (m_Running);
+ }
+
+ private void StopAllRunningCoroutines()
+ {
+ if (m_TimeOutCoroutine != null)
+ {
+ m_Controller.StopCoroutine(m_TimeOutCoroutine);
+ }
+
+ if (m_TestCoroutine != null)
+ {
+ m_Controller.StopCoroutine(m_TestCoroutine);
+ }
+ }
+
+ private IEnumerator ExMethod(IEnumerator e, int timeout)
+ {
+ m_TimeOutCoroutine = m_Controller.StartCoroutine(StartTimer(e, timeout,
+ () =>
+ {
+ m_TestFailed = true;
+ m_Timeout = true;
+ m_Running = false;
+ }));
+
+ yield return m_Controller.StartCoroutine(e);
+ m_Controller.StopCoroutine(m_TimeOutCoroutine);
+ m_Running = false;
+ }
+
+ private IEnumerator StartTimer(IEnumerator coroutineToBeKilled, int timeout, Action onTimeout)
+ {
+ yield return new WaitForSecondsRealtime(timeout / 1000f);
+ if (coroutineToBeKilled != null)
+ m_Controller.StopCoroutine(coroutineToBeKilled);
+ if (onTimeout != null)
+ onTimeout();
+ }
+
+ public bool HasFailedWithTimeout()
+ {
+ return m_Timeout;
+ }
+
+ public int GetDefaultTimeout()
+ {
+ return k_DefaultTimeout;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/CoroutineRunner.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/CoroutineRunner.cs.meta
new file mode 100644
index 0000000..ed7d3e9
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/CoroutineRunner.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 24a158219395ebf44a60547b97784ddc
+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/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs
new file mode 100644
index 0000000..dfd4956
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs
@@ -0,0 +1,30 @@
+using System.Collections.Generic;
+
+namespace UnityEngine.TestTools.Utils
+{
+ public class FloatEqualityComparer : IEqualityComparer<float>
+ {
+ private const float k_DefaultError = 0.0001f;
+ private readonly float AllowedError;
+
+ private static readonly FloatEqualityComparer m_Instance = new FloatEqualityComparer();
+ public static FloatEqualityComparer Instance { get { return m_Instance; } }
+
+ private FloatEqualityComparer() : this(k_DefaultError) {}
+
+ public FloatEqualityComparer(float allowedError)
+ {
+ this.AllowedError = allowedError;
+ }
+
+ public bool Equals(float expected, float actual)
+ {
+ return Utils.AreFloatsEqual(expected, actual, AllowedError);
+ }
+
+ public int GetHashCode(float value)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs.meta
new file mode 100644
index 0000000..5486c55
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/FloatEqualityComparer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: af5042802f06c804c8abddd544b77a4a
+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/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs
new file mode 100644
index 0000000..e9eaa3c
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs
@@ -0,0 +1,19 @@
+using System.Collections;
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestTools
+{
+ /// <summary>
+ /// When implemented by an attribute, this interface implemented to provide actions to execute before setup and after teardown of tests.
+ /// </summary>
+ public interface IOuterUnityTestAction
+ {
+ /// <summary>Executed before each test is run</summary>
+ /// <param name="test">The test that is going to be run.</param>
+ IEnumerator BeforeTest(ITest test);
+
+ /// <summary>Executed after each test is run</summary>
+ /// <param name="test">The test that has just been run.</param>
+ IEnumerator AfterTest(ITest test);
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs.meta
new file mode 100644
index 0000000..91da147
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IOuterUnityTestAction.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b9c2a6302985d3846b7b9f6fd9e2da9a
+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/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs
new file mode 100644
index 0000000..5f79948
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs
@@ -0,0 +1,7 @@
+namespace UnityEngine.TestTools
+{
+ public interface IPostBuildCleanup
+ {
+ void Cleanup();
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs.meta
new file mode 100644
index 0000000..281b577
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPostBuildCleanup.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ff67c526455160f4690a44f74dee4cbe
+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/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs
new file mode 100644
index 0000000..c480fbf
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs
@@ -0,0 +1,7 @@
+namespace UnityEngine.TestTools
+{
+ public interface IPrebuildSetup
+ {
+ void Setup();
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs.meta
new file mode 100644
index 0000000..f776662
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/IPrebuildSceneSetup.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: acc16f0c684508f44813662a300c574b
+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/UnityEngine.TestRunner/Utils/ITestRunCallback.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ITestRunCallback.cs
new file mode 100644
index 0000000..dd4c170
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ITestRunCallback.cs
@@ -0,0 +1,12 @@
+using NUnit.Framework.Interfaces;
+
+namespace UnityEngine.TestRunner
+{
+ public interface ITestRunCallback
+ {
+ void RunStarted(ITest testsToRun);
+ void RunFinished(ITestResult testResults);
+ void TestStarted(ITest test);
+ void TestFinished(ITestResult result);
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ITestRunCallback.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ITestRunCallback.cs.meta
new file mode 100644
index 0000000..1888c05
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/ITestRunCallback.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 38d0b8a87b967304da08a2ae9b955066
+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/UnityEngine.TestRunner/Utils/MonoBehaviourTest.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest.meta
new file mode 100644
index 0000000..9d60b01
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: ce8da628f68c7594b8b9a597fa52db7b
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs
new file mode 100644
index 0000000..478d606
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs
@@ -0,0 +1,7 @@
+namespace UnityEngine.TestTools
+{
+ public interface IMonoBehaviourTest
+ {
+ bool IsTestFinished {get; }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta
new file mode 100644
index 0000000..fb11dfb
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/IMonoBehaviourTest.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a002d3737b873954395b7cf862873ab8
+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/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs
new file mode 100644
index 0000000..b3c1c62
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs
@@ -0,0 +1,23 @@
+namespace UnityEngine.TestTools
+{
+ public class MonoBehaviourTest<T> : CustomYieldInstruction where T : MonoBehaviour, IMonoBehaviourTest
+ {
+ public T component { get; }
+ public GameObject gameObject { get { return component.gameObject; } }
+
+ public MonoBehaviourTest(bool dontDestroyOnLoad = true)
+ {
+ var go = new GameObject("MonoBehaviourTest: " + typeof(T).FullName);
+ component = go.AddComponent<T>();
+ if (dontDestroyOnLoad)
+ {
+ Object.DontDestroyOnLoad(go);
+ }
+ }
+
+ public override bool keepWaiting
+ {
+ get { return !component.IsTestFinished; }
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta
new file mode 100644
index 0000000..d0fa5a1
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/MonoBehaviourTest/MonoBehaviourTest.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 164c9b1458eaab743a4b45c37a4d720d
+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/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs
new file mode 100644
index 0000000..2864daf
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs
@@ -0,0 +1,20 @@
+using System;
+
+namespace UnityEngine.TestTools
+{
+ [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
+ public class PostBuildCleanupAttribute : Attribute
+ {
+ public PostBuildCleanupAttribute(Type targetClass)
+ {
+ TargetClass = targetClass;
+ }
+
+ public PostBuildCleanupAttribute(string targetClassName)
+ {
+ TargetClass = AttributeHelper.GetTargetClassFromName(targetClassName, typeof(IPostBuildCleanup));
+ }
+
+ internal Type TargetClass { get; private set; }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs.meta
new file mode 100644
index 0000000..e3ac3e8
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PostBuildCleanupAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 621fd19bcb071b64aa1d68f0271aa780
+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/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs
new file mode 100644
index 0000000..ea2c172
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs
@@ -0,0 +1,20 @@
+using System;
+
+namespace UnityEngine.TestTools
+{
+ [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Method)]
+ public class PrebuildSetupAttribute : Attribute
+ {
+ public PrebuildSetupAttribute(Type targetClass)
+ {
+ TargetClass = targetClass;
+ }
+
+ public PrebuildSetupAttribute(string targetClassName)
+ {
+ TargetClass = AttributeHelper.GetTargetClassFromName(targetClassName, typeof(IPrebuildSetup));
+ }
+
+ internal Type TargetClass { get; private set; }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs.meta
new file mode 100644
index 0000000..15402ac
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/PrebuildSceneSetupAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: d1b7ce919aa8864409412e809073cf96
+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/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs
new file mode 100644
index 0000000..ede7a8f
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs
@@ -0,0 +1,31 @@
+using System.Collections.Generic;
+
+namespace UnityEngine.TestTools.Utils
+{
+ public class QuaternionEqualityComparer : IEqualityComparer<Quaternion>
+ {
+ private const float k_DefaultError = 0.00001f;
+ private readonly float AllowedError;
+
+ private static readonly QuaternionEqualityComparer m_Instance = new QuaternionEqualityComparer();
+ public static QuaternionEqualityComparer Instance { get { return m_Instance; } }
+
+
+ private QuaternionEqualityComparer() : this(k_DefaultError) {}
+
+ public QuaternionEqualityComparer(float allowedError)
+ {
+ AllowedError = allowedError;
+ }
+
+ public bool Equals(Quaternion expected, Quaternion actual)
+ {
+ return Mathf.Abs(Quaternion.Dot(expected, actual)) > (1.0f - AllowedError);
+ }
+
+ public int GetHashCode(Quaternion quaternion)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs.meta
new file mode 100644
index 0000000..8c3d16b
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/QuaternionEqualityComparer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3b28913f21577de429da928d6d05219f
+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/UnityEngine.TestRunner/Utils/StacktraceFilter.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/StacktraceFilter.cs
new file mode 100644
index 0000000..6f1e690
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/StacktraceFilter.cs
@@ -0,0 +1,43 @@
+using System.Linq;
+using System.Text;
+
+namespace UnityEngine.TestTools.Utils
+{
+ internal static class StackTraceFilter
+ {
+ private static readonly string[] s_FilteredLogMessages =
+ {
+ @"UnityEngine.DebugLogHandler:Internal_Log",
+ @"UnityEngine.DebugLogHandler:Log",
+ @"UnityEngine.Logger:Log",
+ @"UnityEngine.Debug"
+ };
+
+ private static readonly string[] s_LastMessages =
+ {
+ @"System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)",
+ @"UnityEditor.TestTools.TestRunner.EditModeRunner:InvokeDelegator"
+ };
+
+ public static string Filter(string inputStackTrace)
+ {
+ int idx;
+ foreach (var lastMessage in s_LastMessages)
+ {
+ idx = inputStackTrace.IndexOf(lastMessage);
+ if (idx != -1)
+ inputStackTrace = inputStackTrace.Substring(0, idx);
+ }
+
+ var inputStackTraceLines = inputStackTrace.Split('\n');
+ var result = new StringBuilder();
+ foreach (var line in inputStackTraceLines)
+ {
+ if (s_FilteredLogMessages.Any(s => line.StartsWith(s)))
+ continue;
+ result.AppendLine(line);
+ }
+ return result.ToString();
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/StacktraceFilter.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/StacktraceFilter.cs.meta
new file mode 100644
index 0000000..3ba70cd
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/StacktraceFilter.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fc748d99f1f0d484a811a566fc7915ec
+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/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs
new file mode 100644
index 0000000..b8a5086
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs
@@ -0,0 +1,24 @@
+using System;
+
+namespace UnityEngine.TestRunner
+{
+ [AttributeUsage(AttributeTargets.Assembly)]
+ public class TestRunCallbackAttribute : Attribute
+ {
+ private Type m_Type;
+ public TestRunCallbackAttribute(Type type)
+ {
+ var interfaceType = typeof(ITestRunCallback);
+ if (!interfaceType.IsAssignableFrom(type))
+ {
+ throw new ArgumentException(string.Format("Type provided to {0} does not implement {1}", this.GetType().Name, interfaceType.Name));
+ }
+ m_Type = type;
+ }
+
+ internal ITestRunCallback ConstructCallback()
+ {
+ return Activator.CreateInstance(m_Type) as ITestRunCallback;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs.meta
new file mode 100644
index 0000000..c40da51
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackAttribute.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 76b3a3296de548f48b0c3d088fb4b490
+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/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs
new file mode 100644
index 0000000..4425fa0
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs
@@ -0,0 +1,63 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using NUnit.Framework.Interfaces;
+using NUnit.Framework.Internal;
+using UnityEngine.TestTools.TestRunner;
+
+namespace UnityEngine.TestRunner.Utils
+{
+ internal class TestRunCallbackListener : ScriptableObject, ITestRunnerListener
+ {
+ private ITestRunCallback[] m_Callbacks;
+ public void RunStarted(ITest testsToRun)
+ {
+ InvokeAllCallbacks(callback => callback.RunStarted(testsToRun));
+ }
+
+ private static ITestRunCallback[] GetAllCallbacks()
+ {
+ var allAssemblies = AppDomain.CurrentDomain.GetAssemblies();
+ allAssemblies = allAssemblies.Where(x => x.GetReferencedAssemblies().Any(z => z.Name == "UnityEngine.TestRunner")).ToArray();
+ var attributes = allAssemblies.SelectMany(assembly => assembly.GetCustomAttributes(typeof(TestRunCallbackAttribute), true).OfType<TestRunCallbackAttribute>()).ToArray();
+ return attributes.Select(attribute => attribute.ConstructCallback()).ToArray();
+ }
+
+ private void InvokeAllCallbacks(Action<ITestRunCallback> invoker)
+ {
+ if (m_Callbacks == null)
+ {
+ m_Callbacks = GetAllCallbacks();
+ }
+
+ foreach (var testRunCallback in m_Callbacks)
+ {
+ try
+ {
+ invoker(testRunCallback);
+ }
+ catch (Exception e)
+ {
+ Debug.LogException(e);
+ throw;
+ }
+ }
+ }
+
+ public void RunFinished(ITestResult testResults)
+ {
+ InvokeAllCallbacks(callback => callback.RunFinished(testResults));
+ }
+
+ public void TestStarted(ITest test)
+ {
+ InvokeAllCallbacks(callback => callback.TestStarted(test));
+ }
+
+ public void TestFinished(ITestResult result)
+ {
+ InvokeAllCallbacks(callback => callback.TestFinished(result));
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs.meta
new file mode 100644
index 0000000..aec1caa
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/TestRunCallbackListener.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 68f09f0f82599b5448579854e622a4c1
+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/UnityEngine.TestRunner/Utils/Utils.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Utils.cs
new file mode 100644
index 0000000..52a1482
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Utils.cs
@@ -0,0 +1,40 @@
+using System;
+
+namespace UnityEngine.TestTools.Utils
+{
+ public static class Utils
+ {
+ public static bool AreFloatsEqual(float expected, float actual, float epsilon)
+ {
+ // special case for infinity
+ if (expected == Mathf.Infinity || actual == Mathf.Infinity || expected == Mathf.NegativeInfinity || actual == Mathf.NegativeInfinity)
+ return expected == actual;
+
+ // we cover both relative and absolute tolerance with this check
+ // which is better than just relative in case of small (in abs value) args
+ // please note that "usually" approximation is used [i.e. abs(x)+abs(y)+1]
+ // but we speak about test code so we dont care that much about performance
+ // but we do care about checks being more precise
+ return Math.Abs(actual - expected) <= epsilon * Mathf.Max(Mathf.Max(Mathf.Abs(actual), Mathf.Abs(expected)), 1.0f);
+ }
+
+ public static bool AreFloatsEqualAbsoluteError(float expected, float actual, float allowedAbsoluteError)
+ {
+ return Math.Abs(actual - expected) <= allowedAbsoluteError;
+ }
+
+ /// <summary>
+ /// Analogous to GameObject.CreatePrimitive, but creates a primitive mesh renderer with fast shader instead of a default builtin shader.
+ /// Optimized for testing performance.
+ /// </summary>
+ /// <returns>A GameObject with primitive mesh renderer and collider.</returns>
+ public static GameObject CreatePrimitive(PrimitiveType type)
+ {
+ var prim = GameObject.CreatePrimitive(type);
+ var renderer = prim.GetComponent<Renderer>();
+ if (renderer)
+ renderer.sharedMaterial = new Material(Shader.Find("VertexLit"));
+ return prim;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Utils.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Utils.cs.meta
new file mode 100644
index 0000000..32a5d6f
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Utils.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 9502550ba4785e3499d6c9251fa2114b
+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/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs
new file mode 100644
index 0000000..074dfa5
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs
@@ -0,0 +1,22 @@
+using System.Collections.Generic;
+
+namespace UnityEngine.TestTools.Utils
+{
+ public class Vector2ComparerWithEqualsOperator : IEqualityComparer<Vector2>
+ {
+ private static readonly Vector2ComparerWithEqualsOperator m_Instance = new Vector2ComparerWithEqualsOperator();
+ public static Vector2ComparerWithEqualsOperator Instance { get { return m_Instance; } }
+
+ private Vector2ComparerWithEqualsOperator() {}
+
+ public bool Equals(Vector2 expected, Vector2 actual)
+ {
+ return expected == actual;
+ }
+
+ public int GetHashCode(Vector2 vec2)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs.meta
new file mode 100644
index 0000000..9f25fdc
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2ComparerWithEqualsOperator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 65701ebe8bada6b4785e9c7afe7f5bee
+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/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs
new file mode 100644
index 0000000..6806b7a
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs
@@ -0,0 +1,33 @@
+using System.Collections.Generic;
+
+namespace UnityEngine.TestTools.Utils
+{
+ public class Vector2EqualityComparer : IEqualityComparer<Vector2>
+ {
+ private const float k_DefaultError = 0.0001f;
+ private readonly float AllowedError;
+
+ private static readonly Vector2EqualityComparer m_Instance = new Vector2EqualityComparer();
+ public static Vector2EqualityComparer Instance { get { return m_Instance; } }
+
+ private Vector2EqualityComparer() : this(k_DefaultError)
+ {
+ }
+
+ public Vector2EqualityComparer(float error)
+ {
+ this.AllowedError = error;
+ }
+
+ public bool Equals(Vector2 expected, Vector2 actual)
+ {
+ return Utils.AreFloatsEqual(expected.x, actual.x, AllowedError) &&
+ Utils.AreFloatsEqual(expected.y, actual.y, AllowedError);
+ }
+
+ public int GetHashCode(Vector2 vec2)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs.meta
new file mode 100644
index 0000000..06fc773
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector2EqualityComparer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 58ad09607a0d62d458a78d7174665566
+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/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs
new file mode 100644
index 0000000..0650e0e
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs
@@ -0,0 +1,22 @@
+using System.Collections.Generic;
+
+namespace UnityEngine.TestTools.Utils
+{
+ public class Vector3ComparerWithEqualsOperator : IEqualityComparer<Vector3>
+ {
+ private static readonly Vector3ComparerWithEqualsOperator m_Instance = new Vector3ComparerWithEqualsOperator();
+ public static Vector3ComparerWithEqualsOperator Instance { get { return m_Instance; } }
+
+ private Vector3ComparerWithEqualsOperator() {}
+
+ public bool Equals(Vector3 expected, Vector3 actual)
+ {
+ return expected == actual;
+ }
+
+ public int GetHashCode(Vector3 vec3)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs.meta
new file mode 100644
index 0000000..b3c4c43
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3ComparerWithEqualsOperator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5b994928117e3db418da69c821da7e19
+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/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs
new file mode 100644
index 0000000..42ff0b0
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs
@@ -0,0 +1,32 @@
+using System.Collections.Generic;
+
+
+namespace UnityEngine.TestTools.Utils
+{
+ public class Vector3EqualityComparer : IEqualityComparer<Vector3>
+ {
+ private const float k_DefaultError = 0.0001f;
+ private readonly float AllowedError;
+
+ private static readonly Vector3EqualityComparer m_Instance = new Vector3EqualityComparer();
+ public static Vector3EqualityComparer Instance { get { return m_Instance; } }
+
+ private Vector3EqualityComparer() : this(k_DefaultError) {}
+ public Vector3EqualityComparer(float allowedError)
+ {
+ this.AllowedError = allowedError;
+ }
+
+ public bool Equals(Vector3 expected, Vector3 actual)
+ {
+ return Utils.AreFloatsEqual(expected.x, actual.x, AllowedError) &&
+ Utils.AreFloatsEqual(expected.y, actual.y, AllowedError) &&
+ Utils.AreFloatsEqual(expected.z, actual.z, AllowedError);
+ }
+
+ public int GetHashCode(Vector3 vec3)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs.meta
new file mode 100644
index 0000000..1474236
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector3EqualityComparer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 4bd2bc28ff24d5c488844851cb785db0
+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/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs
new file mode 100644
index 0000000..2524817
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs
@@ -0,0 +1,22 @@
+using System.Collections.Generic;
+
+namespace UnityEngine.TestTools.Utils
+{
+ public class Vector4ComparerWithEqualsOperator : IEqualityComparer<Vector4>
+ {
+ private static readonly Vector4ComparerWithEqualsOperator m_Instance = new Vector4ComparerWithEqualsOperator();
+ public static Vector4ComparerWithEqualsOperator Instance { get { return m_Instance; } }
+
+ private Vector4ComparerWithEqualsOperator() {}
+
+ public bool Equals(Vector4 expected, Vector4 actual)
+ {
+ return expected == actual;
+ }
+
+ public int GetHashCode(Vector4 vec4)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs.meta
new file mode 100644
index 0000000..ef9d109
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4ComparerWithEqualsOperator.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 44100f5f60f351348b9719b46d46cebe
+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/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs
new file mode 100644
index 0000000..23640f6
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs
@@ -0,0 +1,32 @@
+using System.Collections.Generic;
+
+namespace UnityEngine.TestTools.Utils
+{
+ public class Vector4EqualityComparer : IEqualityComparer<Vector4>
+ {
+ private const float k_DefaultError = 0.0001f;
+ private readonly float AllowedError;
+
+ private static readonly Vector4EqualityComparer m_Instance = new Vector4EqualityComparer();
+ public static Vector4EqualityComparer Instance { get { return m_Instance; } }
+
+ private Vector4EqualityComparer() : this(k_DefaultError) {}
+ public Vector4EqualityComparer(float allowedError)
+ {
+ this.AllowedError = allowedError;
+ }
+
+ public bool Equals(Vector4 expected, Vector4 actual)
+ {
+ return Utils.AreFloatsEqual(expected.x, actual.x, AllowedError) &&
+ Utils.AreFloatsEqual(expected.y, actual.y, AllowedError) &&
+ Utils.AreFloatsEqual(expected.z, actual.z, AllowedError) &&
+ Utils.AreFloatsEqual(expected.w, actual.w, AllowedError);
+ }
+
+ public int GetHashCode(Vector4 vec4)
+ {
+ return 0;
+ }
+ }
+}
diff --git a/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs.meta b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs.meta
new file mode 100644
index 0000000..75f969d
--- /dev/null
+++ b/Library/PackageCache/com.unity.test-framework@1.1.11/UnityEngine.TestRunner/Utils/Vector4EqualityComparer.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 32da81683c22faf458026716a2b821aa
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant: