Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created December 11, 2017 14:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/725d3048be60887176cb4b6157818169 to your computer and use it in GitHub Desktop.
Save tsubaki/725d3048be60887176cb4b6157818169 to your computer and use it in GitHub Desktop.
適当過ぎるテスト
using UnityEngine;
using UnityEngine.TestTools;
using NUnit.Framework;
using System.Collections;
using UnityEngine.SceneManagement;
public class NewPlayModeTest {
[Test]
public void 必ず成功するテスト() {
}
[Test]
public void 必ず失敗するテスト() {
Assert.Fail ("残念!!!!");
}
[UnityTest, Timeout(1000)]
public IEnumerator タイムアウトで死ぬテスト() {
yield return new WaitForSeconds(3000);
}
[UnityTest, Timeout(1000)]
public IEnumerator タイムアウトで死なないテスト() {
yield return null;
}
[UnityTest]
public IEnumerator 存在しないシーンをロードして失敗するテスト() {
SceneManager.LoadScene ("main");
yield return null;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment