Skip to content

Commit a27ea83

Browse files
authored
Merge pull request #38 from nowsprinting/utfg3-unity2019
Fix for UTFG3
2 parents a2957bf + c3332bd commit a27ea83

File tree

161 files changed

+2029
-1909
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

161 files changed

+2029
-1909
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ resharper_merge_into_logical_pattern_highlighting = none
275275
resharper_use_negated_pattern_in_is_expression_highlighting = none
276276

277277
# Test codes for Unity Test Framework
278-
[Tests/**/*.cs]
278+
[**/Tests/**/*.cs]
279279

280280
# Access to a static member of a type via a derived type (e.g., NUnit.Framework.Is)
281281
resharper_access_to_static_member_via_derived_type_highlighting = none

.github/workflows/test-integration.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,17 @@ jobs:
4141
matrix:
4242
unityVersion: # Available versions see: https://game.ci/docs/docker/versions
4343
- 2019.4.40f1
44-
- 2020.3.48f1
44+
- 2020.3.49f1
4545
- 2021.3.45f1
46-
- 2022.3.59f1
47-
- 2023.2.20f1
48-
- 6000.0.41f1
46+
- 2022.3.62f1
47+
- 6000.0.43f1
48+
- 6000.0.44f1 # pin test-framework v1.5.1
49+
- 6000.0.59f2 # pin test-framework v1.6.0
50+
- 6000.3.1f1
4951
testMode:
5052
- PlayMode # run tests in editor
5153
include:
52-
- unityVersion: 6000.0.41f1
54+
- unityVersion: 6000.3.1f1
5355
testMode: Standalone # run tests on player
5456

5557
steps:

.github/workflows/test.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,21 @@ jobs:
4242
matrix:
4343
unityVersion: # Available versions see: https://game.ci/docs/docker/versions
4444
- 2019.4.40f1
45-
- 2020.3.48f1
45+
- 2020.3.49f1
4646
- 2021.3.45f1
47-
- 2022.3.59f1
48-
- 2023.2.20f1
49-
- 6000.0.41f1
47+
- 2022.3.62f1
48+
- 6000.0.43f1
49+
- 6000.0.44f1 # pin test-framework v1.5.1
50+
- 6000.0.59f2 # pin test-framework v1.6.0
51+
- 6000.2.5f1 # pin test-framework v1.5.1
52+
- 6000.2.6f1 # pin test-framework v1.6.0
53+
- 6000.3.1f1
5054
testMode:
5155
- All # run tests in editor
5256
include:
53-
- unityVersion: 6000.0.41f1
57+
- unityVersion: 6000.3.1f1
5458
octocov: true
55-
- unityVersion: 6000.0.41f1
59+
- unityVersion: 6000.3.1f1
5660
testMode: Standalone # run tests on player
5761

5862
steps:
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Copyright (c) 2021-2025 Koji Hasegawa.
2+
// This software is released under the MIT License.
3+
4+
using System.Runtime.CompilerServices;
5+
6+
[assembly: InternalsVisibleTo("APIExample.Editor.Tests")]

Assets/APIExamples/Scripts/Editor/AssemblyInfo.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Assets/APIExamples/Scripts/Editor/UnityTestFramework/CallbacksExample.cs renamed to Assets/APIExamples/Scripts/Editor/UnityTestFramework/ICallbacksExample.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2021 Koji Hasegawa.
1+
// Copyright (c) 2021-2025 Koji Hasegawa.
22
// This software is released under the MIT License.
33

44
using UnityEditor;
@@ -8,21 +8,21 @@
88
namespace APIExamples.Editor.UnityTestFramework
99
{
1010
/// <summary>
11-
/// Test RunnerコールバックAPI使用例
12-
/// <see href="https://docs.unity3d.com/Packages/com.unity.test-framework@1.1/manual/reference-ierror-callbacks.html"/>
11+
/// Test RunnerコールバックAPI使用例.
12+
/// <see href="https://docs.unity3d.com/Packages/com.unity.test-framework@1.6/api/UnityEditor.TestTools.TestRunner.Api.IErrorCallbacks.html"/>
1313
/// </summary>
1414
/// <remarks>
1515
/// `OnError()`を除いて、<see cref="UnityEditor.TestTools.TestRunner.Api.ICallbacks"/>に定義されている
1616
/// `OnError()`は、<see cref="UnityEditor.TestTools.TestRunner.Api.IErrorCallbacks"/>にのみ定義されている
1717
/// </remarks>
18-
/// <inheritdoc/>
19-
public class CallbacksExample : IErrorCallbacks
18+
/// <seealso cref="ITestRunCallbackExample"/>
19+
public class ICallbacksExample : IErrorCallbacks
2020
{
2121
[InitializeOnLoadMethod]
2222
private static void SetupCallbacks()
2323
{
2424
var api = ScriptableObject.CreateInstance<TestRunnerApi>();
25-
api.RegisterCallbacks(new CallbacksExample());
25+
api.RegisterCallbacks(new ICallbacksExample());
2626
}
2727

2828
/// <inheritdoc/>

Assets/APIExamples/Scripts/Editor/UnityTestFramework/CallbacksExample.cs.meta renamed to Assets/APIExamples/Scripts/Editor/UnityTestFramework/ICallbacksExample.cs.meta

File renamed without changes.
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright (c) 2021-2025 Koji Hasegawa.
2+
// This software is released under the MIT License.
3+
4+
using APIExamples.Editor.UnityTestFramework;
5+
using NUnit.Framework.Interfaces;
6+
using UnityEngine.TestRunner;
7+
8+
[assembly: TestRunCallback(typeof(ITestRunCallbackExample))]
9+
10+
namespace APIExamples.Editor.UnityTestFramework
11+
{
12+
/// <summary>
13+
/// Test RunnerコールバックAPI使用例.
14+
/// <see href="https://docs.unity3d.com/Packages/[email protected]/api/UnityEngine.TestRunner.ITestRunCallback.html"/>
15+
/// </summary>
16+
/// <seealso cref="ICallbacksExample"/>
17+
public class ITestRunCallbackExample : ITestRunCallback
18+
{
19+
/// <inheritdoc/>
20+
public void RunStarted(ITest testsToRun)
21+
{
22+
// テスト実行が開始されるときに呼ばれます
23+
}
24+
25+
/// <inheritdoc/>
26+
public void RunFinished(ITestResult testResults)
27+
{
28+
// テスト実行が終了したときに呼ばれます
29+
}
30+
31+
/// <inheritdoc/>
32+
public void TestStarted(ITest test)
33+
{
34+
// 個々の(Test Runnerウィンドウにおける)ツリーノードが開始されるときに呼ばれます
35+
}
36+
37+
/// <inheritdoc/>
38+
public void TestFinished(ITestResult result)
39+
{
40+
// 個々の(Test Runnerウィンドウにおける)ツリーノードが終了したときに呼ばれます
41+
}
42+
}
43+
}

Assets/APIExamples/Scripts/Editor/UnityTestFramework/ITestRunCallbackExample.cs.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// Copyright (c) 2021-2025 Koji Hasegawa.
2+
// This software is released under the MIT License.
3+
4+
using System.Runtime.CompilerServices;
5+
6+
[assembly: InternalsVisibleTo("APIExample.Editor")]
7+
[assembly: InternalsVisibleTo("APIExample.Editor.Tests")]
8+
[assembly: InternalsVisibleTo("APIExample.Tests")]

0 commit comments

Comments
 (0)