Files
Magical-Jumping-Bean/Library/metadata/cb/cbbca1d8a0434be4bbc7f165523763ac
T

204 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¯øä¼Ë
4´N»|V%s6ÊoPackages/com.unity.test-framework/UnityEngine.TestRunner/NUnitExtensions/Commands/BeforeAfterTestCommandBase.csày¯BeforeAfterTestCommandBase`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;
}