v2
Add tests Modify syntax to be clearer Add Query function
This commit is contained in:
parent
a0e23300a5
commit
e68b1a5214
23 changed files with 222 additions and 48 deletions
42
Assets/Plugins/UnityGameMode/Tests/LinuxGameModeTests.cs
Normal file
42
Assets/Plugins/UnityGameMode/Tests/LinuxGameModeTests.cs
Normal file
|
@ -0,0 +1,42 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using NUnit.Framework;
|
||||
using UnityEngine;
|
||||
using UnityEngine.TestTools;
|
||||
|
||||
#if UNITY_EDITOR_LINUX || UNITY_STANDALONE_LINUX
|
||||
namespace Tests
|
||||
{
|
||||
public class LinuxGameModeTests
|
||||
{
|
||||
[Test]
|
||||
public void GameModeRequestStartWorks()
|
||||
{
|
||||
var ret = LinuxGameMode.GameModeRequestStart();
|
||||
Assert.IsTrue( ret == 0 );
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GameModeRequestEndWorks()
|
||||
{
|
||||
var ret = LinuxGameMode.GameModeRequestStart();
|
||||
Assert.IsTrue( ret == 0 );
|
||||
ret = LinuxGameMode.GameModeRequestEnd();
|
||||
Assert.IsTrue( ret == 0 );
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GameModeGameModeQueryStatusWorks()
|
||||
{
|
||||
var ret = LinuxGameMode.GameModeRequestStart();
|
||||
Assert.IsTrue( ret == 0 );
|
||||
|
||||
ret = LinuxGameMode.GameModeQueryStatus();
|
||||
Assert.IsTrue( ret == 2 );
|
||||
|
||||
ret = LinuxGameMode.GameModeRequestEnd();
|
||||
Assert.IsTrue( ret == 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue