first commit
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
using UnityEngine.UI;
|
||||
using UnityEditor;
|
||||
using NUnit.Framework;
|
||||
|
||||
public class DropdownOptionsListDrawer : WrapperWindowFixture
|
||||
{
|
||||
public class Fixture : MonoBehaviour
|
||||
{
|
||||
public Dropdown.OptionDataList options = new Dropdown.OptionDataList();
|
||||
}
|
||||
|
||||
[UnityTest]
|
||||
public IEnumerator PropertyDrawerDoesNotThrowExceptionWhenObjectIsDisposed()
|
||||
{
|
||||
var go = new GameObject();
|
||||
var component = go.AddComponent<Fixture>();
|
||||
var so = new SerializedObject(component);
|
||||
var win = GetWindow((wnd) => {
|
||||
Assert.DoesNotThrow(() => EditorGUILayout.PropertyField(so.FindProperty("options")));
|
||||
so.Dispose();
|
||||
so = new SerializedObject(component);
|
||||
Assert.DoesNotThrow(() => EditorGUILayout.PropertyField(so.FindProperty("options")));
|
||||
return true;
|
||||
});
|
||||
|
||||
while (win.TestCompleted == false)
|
||||
{
|
||||
yield return null;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b180d0cec21671c45a32a9ce99bff2f5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user