浏览代码

Made test randomizer serializable to better reflect the test use case

/main
Steven Leal 4 年前
当前提交
2ddd3531
共有 1 个文件被更改,包括 3 次插入5 次删除
  1. 8
      com.unity.perception/Tests/Editor/RandomizerEditorTests.cs

8
com.unity.perception/Tests/Editor/RandomizerEditorTests.cs


using System;
using Object = UnityEngine.Object;
namespace EditorTests
{

}
}
[Serializable]
[AddRandomizerMenu("Test Randomizers/Errors OnCreate Test Randomizer")]
class ErrorsOnCreateTestRandomizer : Randomizer
{

{
// This line should throw a NullReferenceException
testGameObject.transform.position = Vector3.zero;
}
protected override void OnIterationStart()
{
testGameObject = new GameObject("Test");
}
}
}
正在加载...
取消
保存