Add tests
Modify syntax to be clearer
Add Query function
This commit is contained in:
Marc Di Luzio 2018-12-03 10:40:40 +00:00
parent a0e23300a5
commit e68b1a5214
23 changed files with 222 additions and 48 deletions

View 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

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 10924db4abe9770f4afcae590ef633b4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,16 @@
{
"name": "Tests",
"references": [
"UnityGameMode"
],
"optionalUnityReferences": [
"TestAssemblies"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": []
}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 988460cbe66440da5957c2009cf1716c
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant: