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
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 10924db4abe9770f4afcae590ef633b4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
16
Assets/Plugins/UnityGameMode/Tests/Tests.asmdef
Normal file
16
Assets/Plugins/UnityGameMode/Tests/Tests.asmdef
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "Tests",
|
||||
"references": [
|
||||
"UnityGameMode"
|
||||
],
|
||||
"optionalUnityReferences": [
|
||||
"TestAssemblies"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": []
|
||||
}
|
7
Assets/Plugins/UnityGameMode/Tests/Tests.asmdef.meta
Normal file
7
Assets/Plugins/UnityGameMode/Tests/Tests.asmdef.meta
Normal file
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 988460cbe66440da5957c2009cf1716c
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue