Files
Magical-Jumping-Bean/Library/metadata/1e/1ebc1994f9a3d5649a1201d3a84b38df
T

188 lines
12 KiB
Plaintext
Raw Normal View History

2019-09-29 19:40:54 -04:00
í2019.2.3f1þÿÿÿÿÿ’3$øÌuñ옲e+ Í=^7€ÿÿÿÿ¦€²Ð¦¦¦€#¦€+H€3ÿÿÿÿ1€1€ÿÿÿÿ@Þ Q€j
H€<ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jÕ€Iÿÿÿÿ1€1€ÿÿÿÿÀÞH€j€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€j€PAssetMetaDataguiddata[0]data[1]data[2]data[3]pathNameoriginalNamelabelsassetStoreRef ÿÿfš†!ë5˜9Ý4QÁóBí7€ÿÿÿÿ¦€²
E Þ€#.€,5a Þ€#.€,€r Þ€# .€,
H€«€ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jñ€JÿÿÿÿÀ1€1€ÿÿÿÿÞ€j€ÿÿÿÿ\€ÿÿÿÿH€rÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jH€wÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jH€€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jy
 Þ€#!.€,"€…ÿÿÿÿ#@1€1€ÿÿÿÿ$Þ%.€j&Õ€“ÿÿÿÿ'1€1€ÿÿÿÿ(ÀÞ)€j€ÿÿÿÿ*H€›€ÿÿÿÿ+1€1€ÿÿÿÿ,@Þ-Q€j.y
 /Þ€#0.€,1 €§2@¾€¶ 3@Þ€#4.€,5H€»ÿÿÿÿ61€1€ÿÿÿÿ7@Þ8Q€j9H€Æÿÿÿÿ:1€1€ÿÿÿÿ;@Þ<Q€j=H€Øÿÿÿÿ>1€1€ÿÿÿÿ?@Þ@Q€jAMonoImporterPPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_ExternalObjectsSourceAssetIdentifiertypeassemblynamem_UsedFileIDsm_DefaultReferencesexecutionOrdericonm_UserDatam_AssetBundleNamem_AssetBundleVariantsÿÿ£Gñ×ÜZ56 :!@iÁJ*€7€ÿÿÿÿ¦€²E Þ.(a Þ.€r Þ .
H€«€ÿÿÿÿ 1€1€ÿÿÿÿ @Þ
Q€jH€ê€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jñ€=ÿÿÿÿ1€1€ÿÿÿÿÞ€j€ÿÿÿÿH€›€ÿÿÿÿ1€1€ÿÿÿÿ@ÞQ€jy
 Þ.y€Q Þ. Þ€X!H€iÿÿÿÿ"1€1€ÿÿÿÿ#@Þ$Q€j%H€uÿÿÿÿ&1€1€ÿÿÿÿ'@Þ(Q€j)PPtr<EditorExtension>m_FileIDm_PathIDPPtr<PrefabInstance>m_DefaultReferencesm_Iconm_ExecutionOrderm_ClassNamem_NamespaceŒ\ày¯ðìáË‘IŸ:]F©!=Š´ƒýcPackages/com.unity.test-framework/UnityEditor.TestRunner/TestRunner/EditorEnumeratorTestWorkItem.csày¯EditorEnumeratorTestWorkItemHusing System;
using System.Collections;
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal;
using NUnit.Framework.Internal.Commands;
using NUnit.Framework.Internal.Execution;
using UnityEngine;
using UnityEngine.TestRunner.NUnitExtensions.Runner;
using UnityEngine.TestTools;
namespace UnityEditor.TestTools.TestRunner
{
internal class EditorEnumeratorTestWorkItem : UnityWorkItem
{
private TestCommand m_Command;
public EditorEnumeratorTestWorkItem(TestMethod test, ITestFilter filter)
: base(test, null)
{
m_Command = test.RunState == RunState.Runnable || test.RunState == RunState.Explicit && filter.IsExplicitMatch(test)
? CommandBuilder.MakeTestCommand(test)
: CommandBuilder.MakeSkipCommand(test);
}
private static IEnumerableTestMethodCommand FindFirstIEnumerableTestMethodCommand(TestCommand command)
{
if (command == null)
{
return null;
}
if (command is IEnumerableTestMethodCommand)
{
return (IEnumerableTestMethodCommand)command;
}
if (command is DelegatingTestCommand)
{
var delegatingTestCommand = (DelegatingTestCommand)command;
return FindFirstIEnumerableTestMethodCommand(delegatingTestCommand.GetInnerCommand());
}
return null;
}
protected override IEnumerable PerformWork()
{
if (IsCancelledRun())
{
yield break;
}
if (m_DontRunRestoringResult)
{
if (EditModeTestCallbacks.RestoringTestContext == null)
{
throw new NullReferenceException("RestoringTestContext is not set");
}
EditModeTestCallbacks.RestoringTestContext();
Result = Context.CurrentResult;
yield break;
}
try
{
if (IsCancelledRun())
{
yield break;
}
if (m_Command is SkipCommand)
{
m_Command.Execute(Context);
Result = Context.CurrentResult;
yield break;
}
//Check if we can execute this test
var firstEnumerableCommand = FindFirstIEnumerableTestMethodCommand(m_Command);
if (firstEnumerableCommand == null)
{
Context.CurrentResult.SetResult(ResultState.Error, "Returning IEnumerator but not using test attribute supporting this");
yield break;
}
if (m_Command.Test.Method.ReturnType.IsType(typeof(IEnumerator)))
{
if (m_Command is ApplyChangesToContextCommand)
{
var applyChangesToContextCommand = ((ApplyChangesToContextCommand)m_Command);
applyChangesToContextCommand.ApplyChanges(Context);
m_Command = applyChangesToContextCommand.GetInnerCommand();
}
var innerCommand = (IEnumerableTestMethodCommand)m_Command;
if (innerCommand == null)
{
Debug.Log("failed getting innerCommand");
throw new Exception("Tests returning IEnumerator can only use test attributes handling those");
}
foreach (var workItemStep in innerCommand.ExecuteEnumerable(Context))
{
if (IsCancelledRun())
{
yield break;
}
if (workItemStep is TestEnumerator)
{
if (EnumeratorStepHelper.UpdateEnumeratorPcIfNeeded(TestEnumerator.Enumerator))
{
yield return new RestoreTestContextAfterDomainReload();
}
continue;
}
if (workItemStep is AsyncOperation)
{
var asyncOperation = (AsyncOperation)workItemStep;
while (!asyncOperation.isDone)
{
if (IsCancelledRun())
{
yield break;
}
yield return null;
}
continue;
}
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;
EditorApplication.isPlaying = false;
yield return null;
}
}
finally
{
WorkItemComplete();
}
}
private bool IsCancelledRun()
{
return Context.ExecutionStatus == TestExecutionStatus.AbortRequested || Context.ExecutionStatus == TestExecutionStatus.StopRequested;