diff --git a/.github/workflows/unity-compile-check-and-test-runner.yml b/.github/workflows/unity-compile-check-and-test-runner.yml
index ab654f8b3..4b00b478e 100644
--- a/.github/workflows/unity-compile-check-and-test-runner.yml
+++ b/.github/workflows/unity-compile-check-and-test-runner.yml
@@ -65,7 +65,9 @@ jobs:
- name: Run concurrency unit tests
if: steps.changes.outputs.csharp == 'true'
- run: dotnet test tests/DynamicCodeExecutionScheduler.UnitTests/DynamicCodeExecutionScheduler.UnitTests.csproj --configuration Release
+ run: |
+ dotnet test tests/DynamicCodeExecutionScheduler.UnitTests/DynamicCodeExecutionScheduler.UnitTests.csproj --configuration Release
+ dotnet test tests/SharedRoslynCompilerWorker.UnitTests/SharedRoslynCompilerWorker.UnitTests.csproj --configuration Release
- name: Cache Library folder
if: env.HAS_UNITY_LICENSE == 'true'
diff --git a/.github/workflows/unity-editmode-tests.yml b/.github/workflows/unity-editmode-tests.yml
index b0e62e0c4..826b6fc97 100644
--- a/.github/workflows/unity-editmode-tests.yml
+++ b/.github/workflows/unity-editmode-tests.yml
@@ -27,7 +27,9 @@ jobs:
dotnet-version: 10.0.x
- name: Run concurrency unit tests
- run: dotnet test tests/DynamicCodeExecutionScheduler.UnitTests/DynamicCodeExecutionScheduler.UnitTests.csproj --configuration Release
+ run: |
+ dotnet test tests/DynamicCodeExecutionScheduler.UnitTests/DynamicCodeExecutionScheduler.UnitTests.csproj --configuration Release
+ dotnet test tests/SharedRoslynCompilerWorker.UnitTests/SharedRoslynCompilerWorker.UnitTests.csproj --configuration Release
- name: Cache Library folder
if: env.HAS_UNITY_LICENSE == 'true'
diff --git a/Assets/Tests/Editor/DynamicCodeToolTests/WrapperTemplateTests.cs b/Assets/Tests/Editor/DynamicCodeToolTests/WrapperTemplateTests.cs
new file mode 100644
index 000000000..05bb62999
--- /dev/null
+++ b/Assets/Tests/Editor/DynamicCodeToolTests/WrapperTemplateTests.cs
@@ -0,0 +1,34 @@
+using System.Collections.Generic;
+
+using NUnit.Framework;
+
+using io.github.hatayama.UnityCliLoop.FirstPartyTools;
+
+namespace io.github.hatayama.UnityCliLoop.Tests.Editor.DynamicCodeToolTests
+{
+ ///
+ /// String-level coverage for WrapperTemplate entry-point generation (no compile-and-run).
+ ///
+ [TestFixture]
+ public class WrapperTemplateTests
+ {
+ [Test]
+ public void Build_ShouldGenerateExecuteAsyncWithCancellationTokenAndOmitSyncExecute()
+ {
+ // Verifies wrapped snippets expose only ExecuteAsync with ct, not a sync Execute that
+ // would discard the runtime token via ExecuteAsync(parameters, default).
+ string wrappedSource = WrapperTemplate.Build(
+ new List(),
+ System.Array.Empty(),
+ "TestNs",
+ "TestClass",
+ "return 1;");
+
+ Assert.That(wrappedSource, Does.Contain("public async System.Threading.Tasks.Task