Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@ jobs:
unityVersion: # Available versions see: https://game.ci/docs/docker/versions
- 2019.4.40f1
- 2020.3.48f1
- 2021.3.42f1
- 2022.3.42f1
- 2021.3.45f1
- 2022.3.57f1
- 2023.2.20f1
- 6000.0.22f1
- 6000.0.37f1
testMode:
- All # run tests in editor
include:
- unityVersion: 2023.2.20f1
- unityVersion: 6000.0.37f1
testMode: Standalone # run tests on player

steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ jobs:
unityVersion: # Available versions see: https://game.ci/docs/docker/versions
- 2019.4.40f1
- 2020.3.48f1
- 2021.3.42f1
- 2022.3.42f1
- 2021.3.45f1
- 2022.3.57f1
- 2023.2.20f1
- 6000.0.22f1
- 6000.0.37f1
testMode:
- All # run tests in editor
include:
- unityVersion: 2019.4.40f1
octocov: true
- unityVersion: 2023.2.20f1
- unityVersion: 6000.0.37f1
testMode: Standalone # run tests on player

steps:
Expand Down
12 changes: 9 additions & 3 deletions Assets/APIExamples/Tests/Runtime/NUnit/ConstraintExample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
using NUnit.Framework.Constraints;
using UnityEngine;
using UnityEngine.TestTools;
using AssertionException = UnityEngine.Assertions.AssertionException;
#if UNITY_EDITOR
using UnityEditor;
#endif

#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously

Expand Down Expand Up @@ -536,7 +540,7 @@ public class ファイルとディレクトリ
public void EmptyDirectoryConstraint_ディレクトリが空であること()
{
#if UNITY_EDITOR
var dir = UnityEditor.FileUtil.GetUniqueTempPathInProject();
var dir = FileUtil.GetUniqueTempPathInProject();
var actual = Directory.CreateDirectory(dir);

Assert.That(actual, Is.Empty);
Expand All @@ -553,7 +557,7 @@ public void EmptyDirectoryConstraint_ディレクトリが空であること()
public void FileOrDirectoryExistsConstraint_ファイルまたはディレクトリが存在すること()
{
#if UNITY_EDITOR
var dir = Path.GetFileName(UnityEditor.FileUtil.GetUniqueTempPathInProject());
var dir = Path.GetFileName(FileUtil.GetUniqueTempPathInProject());
var directoryInfo = Directory.CreateDirectory(dir);
var file = Path.Combine(dir, "test");
var fileInfo = new FileInfo(file);
Expand Down Expand Up @@ -783,7 +787,7 @@ public void ThrowsConstraint_UnityEngineのAssert失敗を期待する()
{
void GetAssert() => UnityEngine.Assertions.Assert.IsTrue(false);

Assert.That(() => GetAssert(), Throws.TypeOf<UnityEngine.Assertions.AssertionException>());
Assert.That(() => GetAssert(), Throws.TypeOf<AssertionException>());
// 失敗時メッセージ例:
// Expected: <NUnit.Framework.AssertionException>
// But was: <UnityEngine.Assertions.AssertionException>
Expand Down Expand Up @@ -934,6 +938,8 @@ public void XmlSerializableConstraint_XMLシリアル化が可能であること
public class 破棄されたGameObject
{
[Test]
[UnityPlatform(RuntimePlatform.OSXEditor, RuntimePlatform.WindowsEditor, RuntimePlatform.LinuxEditor)]
// Note: プレイヤーではnull判定されるため除外
public void Boolキャストオペレーターで破棄されたGameObjectを検証する例()
{
var cube = new GameObject("Cube");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public void CustomConstraint_Constraintの実装だけで可能な書きかた()

[Test]
[UnityPlatform(RuntimePlatform.OSXEditor, RuntimePlatform.WindowsEditor, RuntimePlatform.LinuxEditor)]
// Note: プレイヤーではnull判定されるため除外
public void CustomConstraint_Extensionsの実装も行なうと可能な書きかた()
{
var actual = CreateDestroyedObject();
Expand Down
4 changes: 2 additions & 2 deletions Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"com.nowsprinting.test-helper.monkey": "0.5.1",
"com.nowsprinting.test-helper.random": "0.2.0",
"com.unity.collab-proxy": "1.14.18",
"com.unity.ide.rider": "3.0.26",
"com.unity.ide.rider": "3.0.34",
"com.unity.ide.visualstudio": "2.0.22",
"com.unity.inputsystem": "1.7.0",
"com.unity.test-framework": "1.4.5",
"com.unity.test-framework": "1.4.6",
"com.unity.testframework.graphics": "7.17.0-exp.1",
"com.unity.testtools.codecoverage": "1.2.4",
"com.unity.textmeshpro": "2.1.6",
Expand Down
28 changes: 14 additions & 14 deletions Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.scriptablebuildpipeline": "1.17.0",
"com.unity.modules.assetbundle": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.jsonserialize": "1.0.0",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.modules.unitywebrequest": "1.0.0",
"com.unity.scriptablebuildpipeline": "1.17.0",
"com.unity.modules.unitywebrequestassetbundle": "1.0.0"
},
"url": "https://packages.unity.com"
Expand Down Expand Up @@ -99,7 +99,7 @@
"url": "https://packages.unity.com"
},
"com.unity.ide.rider": {
"version": "3.0.26",
"version": "3.0.34",
"depth": 0,
"source": "registry",
"dependencies": {
Expand Down Expand Up @@ -154,7 +154,7 @@
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
"version": "1.4.5",
"version": "1.4.6",
"depth": 0,
"source": "registry",
"dependencies": {
Expand All @@ -169,15 +169,15 @@
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.xr": "1.0.0",
"com.unity.addressables": "1.17.15",
"com.unity.xr.management": "4.0.5",
"com.unity.external.test-protocol": "1.0.0-preview",
"com.unity.nuget.newtonsoft-json": "2.0.0",
"com.unity.xr.legacyinputhelpers": "2.1.8",
"com.unity.modules.xr": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.addressables": "1.17.15",
"com.unity.modules.imageconversion": "1.0.0",
"com.unity.testtools.codecoverage": "1.2.0"
"com.unity.external.test-protocol": "1.0.0-preview",
"com.unity.testtools.codecoverage": "1.2.0",
"com.unity.modules.imageconversion": "1.0.0"
},
"url": "https://packages.unity.com"
},
Expand Down Expand Up @@ -205,9 +205,9 @@
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.director": "1.0.0",
"com.unity.modules.animation": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0"
},
"url": "https://packages.unity.com"
Expand Down Expand Up @@ -236,11 +236,11 @@
"depth": 1,
"source": "registry",
"dependencies": {
"com.unity.modules.subsystems": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.xr": "1.0.0",
"com.unity.xr.legacyinputhelpers": "2.1.7",
"com.unity.subsystemregistration": "1.0.6"
"com.unity.modules.subsystems": "1.0.0",
"com.unity.subsystemregistration": "1.0.6",
"com.unity.xr.legacyinputhelpers": "2.1.7"
},
"url": "https://packages.unity.com"
},
Expand Down