Ei kuvausta
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

BurstInspectorGUITests.cs 979B

123456789101112131415161718192021222324252627282930313233
  1. using System.Collections;
  2. using NUnit.Framework;
  3. using Unity.Burst.Editor;
  4. using UnityEditor;
  5. using UnityEngine;
  6. using UnityEngine.TestTools;
  7. [TestFixture]
  8. public class BurstInspectorGUITests
  9. {
  10. [UnityTest]
  11. [UnityPlatform(RuntimePlatform.WindowsEditor, RuntimePlatform.OSXEditor)]
  12. public IEnumerator TestInspectorOpenDuringDomainReloadDoesNotLogErrors()
  13. {
  14. // Show Inspector window
  15. EditorWindow.GetWindow<BurstInspectorGUI>().Show();
  16. Assert.IsTrue(EditorWindow.HasOpenInstances<BurstInspectorGUI>());
  17. // Ask for domain reload
  18. EditorUtility.RequestScriptReload();
  19. // Wait for the domain reload to be completed
  20. yield return new WaitForDomainReload();
  21. Assert.IsTrue(EditorWindow.HasOpenInstances<BurstInspectorGUI>());
  22. // Hide Inspector window
  23. EditorWindow.GetWindow<BurstInspectorGUI>().Close();
  24. Assert.IsFalse(EditorWindow.HasOpenInstances<BurstInspectorGUI>());
  25. }
  26. }