Created
August 7, 2018 17:58
-
-
Save wiverson/adc63de6ff70ab4f8cf6c2ca92f2849e to your computer and use it in GitHub Desktop.
Example of Unity3D test and the command line to run it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using NUnit.Framework; | |
using UnityEngine; | |
using UnityEngine.TestTools; | |
/** | |
/Applications/Unity/Hub/Editor/2018.1.7f1/Unity.app/Contents/MacOS/Unity | |
-batchmode -nographics -runEditorTests -projectPath /Users/wiverson/Desktop/test-test/TestTest | |
*/ | |
public class TestTest { | |
[Test] | |
public void someRandomTest () { | |
Assert.AreEqual ("First", "First"); | |
//Expect a regular log message | |
LogAssert.Expect (LogType.Log, "Tests Running!"); | |
//A log message is expected so without the following line | |
//the test would fail | |
Debug.Log ("Tests Running!"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment