| | 1 | | using NUnit.Framework; |
| | 2 | | using UnityEngine; |
| | 3 | | using UnityEngine.TestTools; |
| | 4 | | using System.Collections; |
| | 5 | |
|
| | 6 | | public class SanityTest { |
| | 7 | | [Test] |
| 1 | 8 | | public void SanityTestSimplePasses() { |
| | 9 | | // Use the Assert class to test conditions |
| 1 | 10 | | Assert.Pass("This test passes."); |
| 0 | 11 | | } |
| | 12 | |
|
| | 13 | | // A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use |
| | 14 | | // `yield return null;` to skip a frame. |
| | 15 | | [UnityTest] |
| 1 | 16 | | public IEnumerator SanityTestWithEnumeratorPasses() { |
| | 17 | | // Use the Assert class to test conditions. |
| | 18 | | // Use yield to skip a frame. |
| 1 | 19 | | yield return null; |
| 1 | 20 | | Assert.Pass("This test passes after skipping a frame."); |
| 0 | 21 | | } |
| | 22 | | } |