diff --git a/.claude/settings.local.json b/.claude/settings.local.json
deleted file mode 100644
index a4640b9c07..0000000000
--- a/.claude/settings.local.json
+++ /dev/null
@@ -1,166 +0,0 @@
-{
- "permissions": {
- "allow": [
- "Bash(find:*)",
- "Bash(find*)",
- "Bash(ls:*)",
- "Bash(git checkout:*)",
- "Bash(git pull:*)",
- "Bash(dotnet build:*)",
- "Bash(~/.dotnet/dotnet build:*)",
- "Bash(~/.dotnet/dotnet restore:*)",
- "Bash(./dotnet-install.sh:*)",
- "Bash(export PATH=\"$HOME/.dotnet:$PATH\")",
- "Bash(dotnet test:*)",
- "Bash(dotnet run:*)",
- "Bash(git fetch:*)",
- "Bash(grep:*)",
- "Bash(cd /home/thomh/dev/TUnit)",
- "Bash(dotnet build*)",
- "Bash(source:*)",
- "Bash(git add:*)",
- "Bash(dotnet clean:*)",
- "Bash(git commit:*)",
- "Bash(git push:*)",
- "Bash(rm:*)",
- "Bash(/home/thomh/.dotnet/dotnet run* -f net9.0 --treenode-filter \"/*/*/*/*[EngineTest=Pass]\" --detailed-stacktrace --reflection-scanner)",
- "Bash(/home/thomh/.dotnet/dotnet build* -c Release)",
- "Bash(timeout:*)",
- "Bash(git stash:*)",
- "Bash(/home/thomh/.dotnet/dotnet clean*)",
- "Bash(./dotnet build*)",
- "Bash(export:*)",
- "Bash(rg:*)",
- "Bash(sed:*)",
- "mcp__zen__thinkdeep",
- "Bash(mv:*)",
- "Bash(comm:*)",
- "mcp__zen__chat",
- "mcp__zen__analyze",
- "mcp__zen__debug",
- "mcp__zen__refactor",
- "Bash(chmod:*)",
- "Bash(python3:*)",
- "Bash(./bin/Release/net8.0/TUnit.TestProject:*)",
- "Bash(dotnet new:*)",
- "Bash(./clean.ps1)",
- "Bash(pwsh ./clean.ps1)",
- "WebFetch(domain:docs.anthropic.com)",
- "Bash(claude-code --help)",
- "mcp__sequential-thinking__sequentialthinking",
- "mcp__zen__listmodels",
- "Bash(dotnet restore:*)",
- "Bash(true)",
- "Bash(/home/thomh/dev/TUnit/update_test_assertions.sh:*)",
- "Bash(./bin/Release/net8.0/Playground:*)",
- "mcp__zen__version",
- "Bash(awk:*)",
- "Bash(dotnet exec:*)",
- "Bash(mkdir:*)",
- "Bash(touch:*)",
- "Bash(./remove_old_files.sh)",
- "Bash(./bin/Release/net8.0/SimplifiedArchitectureTest:*)",
- "mcp__desktop-commander__list_directory",
- "mcp__desktop-commander__search_code",
- "mcp__desktop-commander__read_multiple_files",
- "mcp__desktop-commander__read_file",
- "mcp__desktop-commander__edit_block",
- "Bash(dotnet format:*)",
- "mcp__desktop-commander__execute_command",
- "Bash(kill:*)",
- "mcp__serena__activate_project",
- "mcp__serena__initial_instructions",
- "mcp__serena__check_onboarding_performed",
- "mcp__serena__onboarding",
- "mcp__serena__list_dir",
- "mcp__serena__read_file",
- "mcp__serena__search_for_pattern",
- "mcp__serena__get_symbols_overview",
- "mcp__serena__find_symbol",
- "mcp__serena__write_memory",
- "mcp__serena__think_about_collected_information",
- "mcp__serena__think_about_whether_you_are_done",
- "mcp__serena__summarize_changes",
- "mcp__serena__find_file",
- "mcp__serena__replace_symbol_body",
- "mcp__serena__replace_regex",
- "mcp__serena__insert_before_symbol",
- "mcp__serena__read_memory",
- "mcp__serena__think_about_task_adherence",
- "mcp__serena__switch_modes",
- "Bash(./debug_discovery.sh:*)",
- "Bash(/dev/null)",
- "Bash(cat:*)",
- "Bash(dotnet:*)",
- "mcp__desktop-commander__create_directory",
- "mcp__desktop-commander__write_file",
- "Bash(git restore:*)",
- "Bash(find /home/thomh/dev/TUnit -path \"*/obj/*\" -name \"*.cs\")",
- "Bash(git rebase:*)",
- "mcp__desktop-commander__search_files",
- "Bash(cp:*)",
- "Bash(diff:*)",
- "Bash(git reset:*)",
- "Bash(echo $?)",
- "Bash(csc:*)",
- "Bash(./test-fix.exe)",
- "mcp__desktop-commander__read_output",
- "Bash(git revert:*)",
- "Bash(Get-Date -Format \"yyyy-MM-dd-HHmm\")",
- "Bash(dir:*)",
- "Bash(git rm:*)",
- "Bash(del /F /Q TUnit.TestProjectbinDebugnet8.0TestResults*.log)",
- "Bash(taskkill:*)",
- "Bash(powershell:*)",
- "Bash(./TUnit.TestProject.exe --list-tests)",
- "Bash(./TUnit.TestProject.exe --treenode-filter \"/*/*/AsyncLocalTest/*\" --output Detailed)",
- "Bash(./TUnit.TestProject.exe --treenode-filter \"/*/*/AsyncLocalTest/*\" --output Normal)",
- "Bash(./TUnit.TestProject.exe --treenode-filter \"/*/*/AsyncHookTests/TestAsyncLocal(1)\" --output Detailed)",
- "Bash(./TUnit.TestProject.exe --treenode-filter \"/*/*/ExecutionContextRestorationTests/*\" --output Normal)",
- "Bash(./TUnit.TestProject.exe --treenode-filter \"/*/*/AsyncHookTests/*\" --output Normal)",
- "Bash(./TUnit.TestProject.exe --treenode-filter \"/*/*/SimpleAsyncLocalDebugTest/*\" --output Normal)",
- "Bash(./TUnit.TestProject.exe --treenode-filter \"/**/SimpleAsyncLocalDebugTest/*\" --output Normal)",
- "Bash(./TUnit.TestProject.exe --treenode-filter \"/*/*/TUnit.TestProject.Bugs._1914.SimpleAsyncLocalDebugTest/*\" --output Normal)",
- "Bash(TUnit.TestProject.exe:*)",
- "Bash(./TUnit.TestProject.exe --reflection --filter \"FullyQualifiedName~TestHookContextSupport.Test_With_Hook_Context_Support\")",
- "Bash(./TUnit.TestProject.exe --reflection --treenode-filter \"FullyQualifiedName~TestHookContextSupport.Test_With_Hook_Context_Support\")",
- "Bash(Remove-Item -Path TUnit.TestProjectbin -Recurse -Force -ErrorAction SilentlyContinue)",
- "Bash(.TUnit.TestProject.exe --reflection --treenode-filter \"TUnit.TestProject.TestHookContextSupport.*\" --timeout 30s --output Detailed)",
- "Bash(./TUnit.TestProject.exe --reflection --treenode-filter \"TUnit.TestProject.TestHookContextSupport.*\" --timeout 30s --output Detailed)",
- "Bash(./TUnit.TestProject.exe --reflection --treenode-filter \"TUnit.TestProject.BeforeTests.AssemblySetupTests.*\" --timeout 10s --output Detailed)",
- "Bash(./TUnit.TestProject.exe --reflection --treenode-filter \"TUnit.TestProject.BeforeTests.AssemblySetupTests.*\" --timeout 5s --output Detailed)",
- "Bash(./TUnit.TestProject.exe --reflection --treenode-filter \"TUnit.TestProject.TestHookContextSupport.*\" --timeout 10s --output Detailed)",
- "Bash(./TUnit.TestProject.exe --reflection --treenode-filter \"TUnit.TestProject.BeforeTests.AfterTestAttributeTests.*\" --timeout 5s --output Detailed)",
- "Bash(./TUnit.TestProject.exe --reflection --treenode-filter \"TUnit.TestProject.TestHookContextSupport.*\" --timeout 5s)",
- "Bash(./TUnit.TestProject.exe --reflection --output Detailed)",
- "Bash(cmd.exe:*)",
- "Bash(cmd /c:*)",
- "Bash(\"D:\\git\\TUnit\\TUnit.TestProject\\bin\\Debug\\net8.0\\TUnit.TestProject.exe\" --filter \"FullyQualifiedName~SimpleGenericClassTests\")",
- "Bash(\"D:\\git\\TUnit\\TUnit.TestProject\\bin\\Debug\\net8.0\\TUnit.TestProject.exe\" --help)",
- "Bash(\"D:\\git\\TUnit\\TUnit.TestProject\\bin\\Debug\\net8.0\\TUnit.TestProject.exe\" --treenode-filter \"SimpleGenericClassTests\")",
- "Bash(\"D:\\git\\TUnit\\TUnit.TestProject\\bin\\Debug\\net8.0\\TUnit.TestProject.exe\" --list-tests)",
- "Bash(\"D:\\git\\TUnit\\TUnit.TestProject\\bin\\Debug\\net8.0\\TUnit.TestProject.exe\" --verbosity debug)",
- "Bash(\"D:\\git\\TUnit\\TUnit.TestProject\\bin\\Debug\\net8.0\\TUnit.TestProject.exe\" --treenode-filter \"*SimpleGeneric*\" --verbosity verbose)",
- "Bash(\"D:\\git\\TUnit\\TUnit.TestProject\\bin\\Debug\\net8.0\\TUnit.TestProject.exe\" --treenode-filter \"TestWithValue\")",
- "Bash(verify_generic_test.exe)",
- "Bash(\"D:\\git\\TUnit\\TUnit.TestProject\\bin\\Debug\\net8.0\\TUnit.TestProject.exe\" --treenode-filter \"*TestWithValue*\")",
- "Bash(\"D:\\git\\TUnit\\TUnit.TestProject\\bin\\Debug\\net8.0\\TUnit.TestProject.exe\" --treenode-filter \"/*/*/*/TestWithValue\")",
- "Bash(del TestTypedDataSources.cs)",
- "Bash(tasklist)",
- "Bash(tail:*)",
- "Bash(del GenericTestExample.cs)",
- "Bash(pwsh:*)",
- "Bash(for dir in *.received)",
- "Bash(do rm -rf \"$dir%.received.verified\")",
- "Bash(done)",
- "WebFetch(domain:github.com)",
- "Bash(./bin/Debug/net9.0/TUnit.TestProject.exe*)"
- ],
- "deny": []
- },
- "enableAllProjectMcpServers": true,
- "enabledMcpjsonServers": [
- "zen",
- "sequential-thinking"
- ]
-}
diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml
index 5bf8ce5951..dc3652b5b1 100644
--- a/.github/workflows/claude-code-review.yml
+++ b/.github/workflows/claude-code-review.yml
@@ -27,7 +27,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
fetch-depth: 1
diff --git a/.github/workflows/claude.yml b/.github/workflows/claude.yml
index 64a3e5b14b..cf119f44eb 100644
--- a/.github/workflows/claude.yml
+++ b/.github/workflows/claude.yml
@@ -26,7 +26,7 @@ jobs:
actions: read # Required for Claude to read CI results on PRs
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
with:
fetch-depth: 1
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index dbb49ac73a..8c6ddced9d 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -55,7 +55,7 @@ jobs:
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
- uses: actions/checkout@v4
+ uses: actions/checkout@v5
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
diff --git a/.github/workflows/deploy-pages-test.yml b/.github/workflows/deploy-pages-test.yml
index 53bb558e1d..c98aa0018e 100644
--- a/.github/workflows/deploy-pages-test.yml
+++ b/.github/workflows/deploy-pages-test.yml
@@ -13,7 +13,7 @@ jobs:
run:
working-directory: docs
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v4
diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml
index 5c39f45084..85b6c7ac7d 100644
--- a/.github/workflows/deploy-pages.yml
+++ b/.github/workflows/deploy-pages.yml
@@ -16,7 +16,7 @@ jobs:
run:
working-directory: docs
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v4
diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml
index f03c901f73..89bfa71473 100644
--- a/.github/workflows/dotnet.yml
+++ b/.github/workflows/dotnet.yml
@@ -26,7 +26,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
with:
fetch-depth: 0
diff --git a/.github/workflows/generate-readme.yml b/.github/workflows/generate-readme.yml
index b5ccb9cf31..d222e036a7 100644
--- a/.github/workflows/generate-readme.yml
+++ b/.github/workflows/generate-readme.yml
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
with:
fetch-depth: 0
diff --git a/.github/workflows/speed-comparison.yml b/.github/workflows/speed-comparison.yml
index 64e5c1a167..32fe6041cb 100644
--- a/.github/workflows/speed-comparison.yml
+++ b/.github/workflows/speed-comparison.yml
@@ -19,7 +19,7 @@ jobs:
cancel-in-progress: true
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
with:
fetch-depth: 0
@@ -88,7 +88,7 @@ jobs:
cancel-in-progress: true
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@v5
with:
fetch-depth: 0
diff --git a/.gitignore b/.gitignore
index 993c3e1a78..2d7856147c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -284,6 +284,7 @@ FakesAssemblies/
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
+package-lock.json
# Visual Studio 6 build log
*.plg
@@ -421,3 +422,6 @@ TESTPROJECT_AOT
TESTPROJECT_SINGLEFILE
nul
+
+# Claude Code settings
+.claude/settings.local.json
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 09cbc6801f..3ef4d981cb 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,6 +1,6 @@
- $(DefineConstants);ROSLYN4_7_OR_GREATER
- $(DefineConstants);ROSLYN4_14_OR_GREATER
+ $(DefineConstants);ROSLYN4_7_OR_GREATER
+ $(DefineConstants);ROSLYN4_14_OR_GREATER
diff --git a/Directory.Packages.props b/Directory.Packages.props
index afc346bdd1..112550e10f 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -11,7 +11,7 @@
-
+
@@ -45,16 +45,16 @@
-
-
-
+
+
+
-
-
-
+
+
+
@@ -75,7 +75,7 @@
-
+
@@ -84,9 +84,9 @@
-
-
-
+
+
+
@@ -94,4 +94,4 @@
-
+
\ No newline at end of file
diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md
new file mode 100644
index 0000000000..1594260393
--- /dev/null
+++ b/KNOWN_ISSUES.md
@@ -0,0 +1,37 @@
+# Known Issues in TUnit
+
+## NotInParallel with Multiple Constraint Keys
+
+**Issue**: Tests with multiple `NotInParallel` constraint keys may run in parallel when they shouldn't.
+
+**Example**:
+```csharp
+[Test, NotInParallel(["GroupD", "GroupE"])]
+public async Task Test1() { }
+
+[Test, NotInParallel(["GroupD", "GroupF"])]
+public async Task Test2() { }
+```
+
+Test1 and Test2 share "GroupD" and should not run in parallel, but they might.
+
+**Root Cause**:
+The current implementation adds tests with multiple keys to separate queues for each key. Each queue is processed independently in parallel. This means:
+- GroupD queue will run Test1 and Test2 sequentially
+- But GroupE queue (processing Test1) and GroupF queue (processing Test2) may run concurrently
+- There's no cross-queue coordination to prevent tests sharing any constraint from overlapping
+
+**Workaround**:
+- Use single constraint keys per test
+- Or group related tests in the same test class with a class-level `NotInParallel` attribute
+
+**Fix Required**:
+The scheduler needs to track running tests across all queues and check for shared constraints before starting any test. This requires significant changes to the scheduling algorithm in `TestScheduler.cs` and `TestGroupingService.cs`.
+
+## Assembly-Level Hooks Affecting Unrelated Tests
+
+**Issue**: Assembly-level hooks (e.g., `[AfterEvery(Assembly)]`) run for ALL tests in the assembly, which can cause unexpected failures when hooks from test-specific scenarios affect other tests.
+
+**Workaround**:
+- Avoid using assembly-level hooks in test files that intentionally throw exceptions
+- Or add proper filtering in the hooks to only run for specific test namespaces/classes
\ No newline at end of file
diff --git a/README.md b/README.md
index a8078ae2ab..9fe1e6da4a 100644
--- a/README.md
+++ b/README.md
@@ -440,10 +440,10 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|------------- |-------- |-----------:|---------:|----------:|-----------:|
-| Build_TUnit | 0.52.64 | 1,039.9 ms | 29.30 ms | 80.70 ms | 1,026.4 ms |
-| Build_NUnit | 4.3.2 | 881.2 ms | 17.33 ms | 26.46 ms | 878.6 ms |
-| Build_xUnit | 2.9.3 | 1,030.9 ms | 48.12 ms | 138.83 ms | 1,012.0 ms |
-| Build_MSTest | 3.10.1 | 1,099.4 ms | 65.01 ms | 187.58 ms | 1,073.7 ms |
+| Build_TUnit | 0.53.0 | 1,118.7 ms | 67.93 ms | 191.60 ms | 1,065.6 ms |
+| Build_NUnit | 4.4.0 | 912.8 ms | 26.58 ms | 77.54 ms | 880.9 ms |
+| Build_xUnit | 2.9.3 | 861.8 ms | 26.00 ms | 75.83 ms | 823.2 ms |
+| Build_MSTest | 3.10.1 | 913.0 ms | 27.81 ms | 80.24 ms | 886.6 ms |
@@ -462,10 +462,10 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|------------- |-------- |--------:|---------:|---------:|--------:|
-| Build_TUnit | 0.52.64 | 1.840 s | 0.0336 s | 0.0552 s | 1.826 s |
-| Build_NUnit | 4.3.2 | 1.538 s | 0.0256 s | 0.0240 s | 1.539 s |
-| Build_xUnit | 2.9.3 | 1.559 s | 0.0185 s | 0.0173 s | 1.557 s |
-| Build_MSTest | 3.10.1 | 1.561 s | 0.0233 s | 0.0218 s | 1.568 s |
+| Build_TUnit | 0.53.0 | 1.803 s | 0.0325 s | 0.0587 s | 1.780 s |
+| Build_NUnit | 4.4.0 | 1.520 s | 0.0262 s | 0.0232 s | 1.514 s |
+| Build_xUnit | 2.9.3 | 1.525 s | 0.0142 s | 0.0133 s | 1.525 s |
+| Build_MSTest | 3.10.1 | 1.498 s | 0.0187 s | 0.0157 s | 1.504 s |
@@ -484,10 +484,10 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|------------- |-------- |--------:|---------:|---------:|--------:|
-| Build_TUnit | 0.52.64 | 1.871 s | 0.0325 s | 0.0657 s | 1.861 s |
-| Build_NUnit | 4.3.2 | 1.587 s | 0.0267 s | 0.0250 s | 1.588 s |
-| Build_xUnit | 2.9.3 | 1.590 s | 0.0271 s | 0.0253 s | 1.591 s |
-| Build_MSTest | 3.10.1 | 1.609 s | 0.0184 s | 0.0172 s | 1.612 s |
+| Build_TUnit | 0.53.0 | 1.853 s | 0.0369 s | 0.0753 s | 1.832 s |
+| Build_NUnit | 4.4.0 | 1.572 s | 0.0233 s | 0.0206 s | 1.577 s |
+| Build_xUnit | 2.9.3 | 1.566 s | 0.0258 s | 0.0241 s | 1.566 s |
+| Build_MSTest | 3.10.1 | 1.599 s | 0.0288 s | 0.0270 s | 1.592 s |
### Scenario: Tests focused on assertion performance and validation
@@ -507,9 +507,9 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.52.64 | NA | NA | NA | NA |
-| TUnit | 0.52.64 | NA | NA | NA | NA |
-| NUnit | 4.3.2 | NA | NA | NA | NA |
+| TUnit_AOT | 0.53.0 | NA | NA | NA | NA |
+| TUnit | 0.53.0 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.1 | NA | NA | NA | NA |
@@ -537,9 +537,9 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.52.64 | NA | NA | NA | NA |
-| TUnit | 0.52.64 | NA | NA | NA | NA |
-| NUnit | 4.3.2 | NA | NA | NA | NA |
+| TUnit_AOT | 0.53.0 | NA | NA | NA | NA |
+| TUnit | 0.53.0 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.1 | NA | NA | NA | NA |
@@ -567,9 +567,9 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.52.64 | NA | NA | NA | NA |
-| TUnit | 0.52.64 | NA | NA | NA | NA |
-| NUnit | 4.3.2 | NA | NA | NA | NA |
+| TUnit_AOT | 0.53.0 | NA | NA | NA | NA |
+| TUnit | 0.53.0 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.1 | NA | NA | NA | NA |
@@ -596,13 +596,13 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |---------:|---------:|---------:|---------:|
-| TUnit_AOT | 0.52.64 | 103.6 ms | 1.88 ms | 1.66 ms | 103.4 ms |
-| TUnit | 0.52.64 | 519.4 ms | 7.80 ms | 6.92 ms | 519.0 ms |
-| NUnit | 4.3.2 | 752.9 ms | 14.85 ms | 27.15 ms | 744.7 ms |
-| xUnit | 2.9.3 | 789.1 ms | 14.52 ms | 29.33 ms | 778.5 ms |
-| MSTest | 3.10.1 | 684.7 ms | 7.72 ms | 6.45 ms | 686.6 ms |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|-----------:|----------:|
+| TUnit_AOT | 0.53.0 | 95.36 ms | 1.906 ms | 3.762 ms | 94.05 ms |
+| TUnit | 0.53.0 | 563.14 ms | 15.938 ms | 45.729 ms | 551.61 ms |
+| NUnit | 4.4.0 | 789.44 ms | 17.689 ms | 50.468 ms | 765.49 ms |
+| xUnit | 2.9.3 | 901.14 ms | 44.313 ms | 129.263 ms | 866.87 ms |
+| MSTest | 3.10.1 | 749.13 ms | 23.079 ms | 66.218 ms | 715.13 ms |
@@ -621,11 +621,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 32.23 ms | 0.153 ms | 0.143 ms | 32.24 ms |
-| TUnit | 0.52.64 | 891.98 ms | 17.453 ms | 18.674 ms | 894.92 ms |
-| NUnit | 4.3.2 | 1,286.54 ms | 10.802 ms | 9.576 ms | 1,286.43 ms |
-| xUnit | 2.9.3 | 1,388.62 ms | 13.832 ms | 12.939 ms | 1,387.46 ms |
-| MSTest | 3.10.1 | 1,237.95 ms | 8.184 ms | 7.255 ms | 1,239.58 ms |
+| TUnit_AOT | 0.53.0 | 27.48 ms | 0.321 ms | 0.300 ms | 27.50 ms |
+| TUnit | 0.53.0 | 890.28 ms | 17.640 ms | 22.937 ms | 888.19 ms |
+| NUnit | 4.4.0 | 1,315.52 ms | 25.445 ms | 24.990 ms | 1,300.70 ms |
+| xUnit | 2.9.3 | 1,395.30 ms | 11.035 ms | 9.782 ms | 1,394.66 ms |
+| MSTest | 3.10.1 | 1,275.46 ms | 11.423 ms | 10.685 ms | 1,273.38 ms |
@@ -644,11 +644,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 77.50 ms | 1.303 ms | 1.155 ms | 77.96 ms |
-| TUnit | 0.52.64 | 995.14 ms | 19.574 ms | 34.282 ms | 986.41 ms |
-| NUnit | 4.3.2 | 1,384.84 ms | 20.306 ms | 16.956 ms | 1,386.31 ms |
-| xUnit | 2.9.3 | 1,535.51 ms | 26.033 ms | 35.635 ms | 1,534.29 ms |
-| MSTest | 3.10.1 | 1,370.54 ms | 24.680 ms | 30.309 ms | 1,362.96 ms |
+| TUnit_AOT | 0.53.0 | 63.92 ms | 1.261 ms | 1.727 ms | 63.42 ms |
+| TUnit | 0.53.0 | 949.46 ms | 18.931 ms | 23.942 ms | 952.14 ms |
+| NUnit | 4.4.0 | 1,404.03 ms | 23.882 ms | 21.170 ms | 1,401.37 ms |
+| xUnit | 2.9.3 | 1,503.49 ms | 19.233 ms | 17.049 ms | 1,502.09 ms |
+| MSTest | 3.10.1 | 1,343.89 ms | 15.969 ms | 14.937 ms | 1,346.16 ms |
### Scenario: Simple tests with basic operations and assertions
@@ -666,13 +666,13 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |------------:|----------:|-----------:|------------:|
-| TUnit_AOT | 0.52.64 | 99.30 ms | 1.986 ms | 1.858 ms | 99.32 ms |
-| TUnit | 0.52.64 | 554.72 ms | 10.420 ms | 9.237 ms | 555.00 ms |
-| NUnit | 4.3.2 | 794.77 ms | 15.738 ms | 34.545 ms | 783.05 ms |
-| xUnit | 2.9.3 | 1,062.76 ms | 59.316 ms | 168.270 ms | 1,033.66 ms |
-| MSTest | 3.10.1 | 1,478.70 ms | 86.729 ms | 251.615 ms | 1,440.97 ms |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |----------:|----------:|----------:|----------:|
+| TUnit_AOT | 0.53.0 | 81.66 ms | 1.623 ms | 3.888 ms | 79.76 ms |
+| TUnit | 0.53.0 | 537.14 ms | 11.603 ms | 33.477 ms | 529.34 ms |
+| NUnit | 4.4.0 | 732.15 ms | 13.989 ms | 39.683 ms | 712.20 ms |
+| xUnit | 2.9.3 | 753.26 ms | 14.974 ms | 19.471 ms | 746.46 ms |
+| MSTest | 3.10.1 | 679.83 ms | 11.829 ms | 9.236 ms | 680.26 ms |
@@ -691,11 +691,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 32.83 ms | 0.360 ms | 0.337 ms | 32.79 ms |
-| TUnit | 0.52.64 | 942.73 ms | 18.099 ms | 19.365 ms | 942.49 ms |
-| NUnit | 4.3.2 | 1,363.31 ms | 13.903 ms | 13.005 ms | 1,367.44 ms |
-| xUnit | 2.9.3 | 1,436.99 ms | 7.763 ms | 6.061 ms | 1,440.06 ms |
-| MSTest | 3.10.1 | 1,301.31 ms | 8.635 ms | 7.655 ms | 1,300.96 ms |
+| TUnit_AOT | 0.53.0 | 27.96 ms | 0.269 ms | 0.224 ms | 27.91 ms |
+| TUnit | 0.53.0 | 921.09 ms | 17.718 ms | 21.759 ms | 919.49 ms |
+| NUnit | 4.4.0 | 1,341.47 ms | 14.129 ms | 13.217 ms | 1,336.93 ms |
+| xUnit | 2.9.3 | 1,430.95 ms | 11.553 ms | 10.241 ms | 1,430.90 ms |
+| MSTest | 3.10.1 | 1,315.81 ms | 13.377 ms | 12.513 ms | 1,316.90 ms |
@@ -714,11 +714,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 62.62 ms | 0.678 ms | 0.566 ms | 62.45 ms |
-| TUnit | 0.52.64 | 985.26 ms | 19.305 ms | 23.709 ms | 984.45 ms |
-| NUnit | 4.3.2 | 1,380.95 ms | 14.765 ms | 13.812 ms | 1,384.90 ms |
-| xUnit | 2.9.3 | 1,444.05 ms | 17.576 ms | 16.441 ms | 1,446.09 ms |
-| MSTest | 3.10.1 | 1,330.96 ms | 12.821 ms | 11.365 ms | 1,330.73 ms |
+| TUnit_AOT | 0.53.0 | 62.41 ms | 0.108 ms | 0.090 ms | 62.45 ms |
+| TUnit | 0.53.0 | 981.67 ms | 19.224 ms | 28.773 ms | 968.39 ms |
+| NUnit | 4.4.0 | 1,398.73 ms | 19.127 ms | 17.891 ms | 1,402.23 ms |
+| xUnit | 2.9.3 | 1,465.19 ms | 10.334 ms | 9.666 ms | 1,464.70 ms |
+| MSTest | 3.10.1 | 1,339.89 ms | 12.943 ms | 11.474 ms | 1,339.28 ms |
### Scenario: Parameterized tests with multiple test cases using data attributes
@@ -736,13 +736,13 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----------:|---------:|----------:|-----------:|
-| TUnit_AOT | 0.52.64 | NA | NA | NA | NA |
-| TUnit | 0.52.64 | NA | NA | NA | NA |
-| NUnit | 4.3.2 | 1,107.8 ms | 97.71 ms | 288.09 ms | 1,049.4 ms |
-| xUnit | 2.9.3 | 864.3 ms | 34.70 ms | 97.88 ms | 847.2 ms |
-| MSTest | 3.10.1 | 979.2 ms | 65.62 ms | 189.32 ms | 980.0 ms |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |---------:|---------:|---------:|---------:|
+| TUnit_AOT | 0.53.0 | NA | NA | NA | NA |
+| TUnit | 0.53.0 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | 756.1 ms | 17.53 ms | 50.57 ms | 735.3 ms |
+| xUnit | 2.9.3 | 743.6 ms | 8.86 ms | 7.40 ms | 742.5 ms |
+| MSTest | 3.10.1 | 689.9 ms | 13.43 ms | 13.79 ms | 686.7 ms |
Benchmarks with issues:
RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -765,11 +765,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |--------:|---------:|---------:|--------:|
-| TUnit_AOT | 0.52.64 | NA | NA | NA | NA |
-| TUnit | 0.52.64 | NA | NA | NA | NA |
-| NUnit | 4.3.2 | 1.281 s | 0.0078 s | 0.0070 s | 1.283 s |
-| xUnit | 2.9.3 | 1.355 s | 0.0080 s | 0.0074 s | 1.358 s |
-| MSTest | 3.10.1 | 1.233 s | 0.0112 s | 0.0099 s | 1.232 s |
+| TUnit_AOT | 0.53.0 | NA | NA | NA | NA |
+| TUnit | 0.53.0 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | 1.317 s | 0.0115 s | 0.0107 s | 1.317 s |
+| xUnit | 2.9.3 | 1.390 s | 0.0124 s | 0.0116 s | 1.390 s |
+| MSTest | 3.10.1 | 1.259 s | 0.0129 s | 0.0115 s | 1.260 s |
Benchmarks with issues:
RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -792,11 +792,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |--------:|---------:|---------:|--------:|
-| TUnit_AOT | 0.52.64 | NA | NA | NA | NA |
-| TUnit | 0.52.64 | NA | NA | NA | NA |
-| NUnit | 4.3.2 | 1.358 s | 0.0187 s | 0.0166 s | 1.359 s |
-| xUnit | 2.9.3 | 1.406 s | 0.0210 s | 0.0197 s | 1.413 s |
-| MSTest | 3.10.1 | 1.299 s | 0.0099 s | 0.0092 s | 1.298 s |
+| TUnit_AOT | 0.53.0 | NA | NA | NA | NA |
+| TUnit | 0.53.0 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | 1.335 s | 0.0133 s | 0.0118 s | 1.337 s |
+| xUnit | 2.9.3 | 1.400 s | 0.0251 s | 0.0210 s | 1.397 s |
+| MSTest | 3.10.1 | 1.310 s | 0.0118 s | 0.0105 s | 1.309 s |
Benchmarks with issues:
RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -818,13 +818,13 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |----------:|----------:|-----------:|----------:|
-| TUnit_AOT | 0.52.64 | 94.78 ms | 1.114 ms | 0.870 ms | 94.68 ms |
-| TUnit | 0.52.64 | 545.56 ms | 14.362 ms | 41.895 ms | 527.37 ms |
-| NUnit | 4.3.2 | 795.54 ms | 35.025 ms | 97.635 ms | 766.91 ms |
-| xUnit | 2.9.3 | 892.99 ms | 45.795 ms | 134.310 ms | 849.28 ms |
-| MSTest | 3.10.1 | 866.24 ms | 25.115 ms | 72.059 ms | 853.30 ms |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |---------:|---------:|---------:|---------:|
+| TUnit_AOT | 0.53.0 | 102.1 ms | 2.03 ms | 3.85 ms | 101.4 ms |
+| TUnit | 0.53.0 | 659.4 ms | 23.61 ms | 67.75 ms | 665.5 ms |
+| NUnit | 4.4.0 | 715.6 ms | 11.89 ms | 15.46 ms | 712.9 ms |
+| xUnit | 2.9.3 | 736.9 ms | 13.08 ms | 10.21 ms | 735.7 ms |
+| MSTest | 3.10.1 | 679.5 ms | 7.47 ms | 6.62 ms | 678.0 ms |
@@ -843,10 +843,10 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 32.14 ms | 0.164 ms | 0.153 ms | 32.15 ms |
-| TUnit | 0.52.64 | 905.03 ms | 17.804 ms | 21.864 ms | 899.86 ms |
-| NUnit | 4.3.2 | 1,315.09 ms | 8.081 ms | 7.559 ms | 1,316.97 ms |
-| xUnit | 2.9.3 | 1,402.00 ms | 16.940 ms | 15.846 ms | 1,405.79 ms |
+| TUnit_AOT | 0.53.0 | 28.23 ms | 0.409 ms | 0.382 ms | 28.33 ms |
+| TUnit | 0.53.0 | 910.71 ms | 18.195 ms | 24.906 ms | 913.51 ms |
+| NUnit | 4.4.0 | 1,343.34 ms | 18.580 ms | 17.379 ms | 1,343.35 ms |
+| xUnit | 2.9.3 | 1,420.85 ms | 19.898 ms | 18.613 ms | 1,423.29 ms |
| MSTest | 3.10.1 | NA | NA | NA | NA |
Benchmarks with issues:
@@ -869,10 +869,10 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 62.18 ms | 0.700 ms | 0.584 ms | 62.38 ms |
-| TUnit | 0.52.64 | 961.97 ms | 18.876 ms | 25.199 ms | 957.70 ms |
-| NUnit | 4.3.2 | 1,358.06 ms | 16.919 ms | 15.826 ms | 1,349.80 ms |
-| xUnit | 2.9.3 | 1,431.97 ms | 7.020 ms | 5.862 ms | 1,431.08 ms |
+| TUnit_AOT | 0.53.0 | 61.77 ms | 0.921 ms | 0.861 ms | 62.28 ms |
+| TUnit | 0.53.0 | 927.22 ms | 17.791 ms | 23.133 ms | 924.19 ms |
+| NUnit | 4.4.0 | 1,320.01 ms | 12.108 ms | 11.326 ms | 1,319.77 ms |
+| xUnit | 2.9.3 | 1,376.36 ms | 17.148 ms | 13.388 ms | 1,378.72 ms |
| MSTest | 3.10.1 | NA | NA | NA | NA |
Benchmarks with issues:
@@ -894,13 +894,13 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |----------:|----------:|-----------:|----------:|
-| TUnit_AOT | 0.52.64 | 95.75 ms | 1.857 ms | 2.835 ms | 94.40 ms |
-| TUnit | 0.52.64 | 579.37 ms | 28.937 ms | 83.951 ms | 547.72 ms |
-| NUnit | 4.3.2 | 977.92 ms | 37.428 ms | 107.387 ms | 958.20 ms |
-| xUnit | 2.9.3 | 897.98 ms | 20.740 ms | 60.501 ms | 890.85 ms |
-| MSTest | 3.10.1 | 810.10 ms | 16.288 ms | 48.026 ms | 796.36 ms |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |-----------:|---------:|----------:|-----------:|
+| TUnit_AOT | 0.53.0 | 113.4 ms | 6.66 ms | 18.56 ms | 106.7 ms |
+| TUnit | 0.53.0 | 710.7 ms | 36.79 ms | 104.96 ms | 698.0 ms |
+| NUnit | 4.4.0 | 1,066.4 ms | 36.47 ms | 107.53 ms | 1,019.8 ms |
+| xUnit | 2.9.3 | 1,099.9 ms | 33.00 ms | 97.30 ms | 1,053.8 ms |
+| MSTest | 3.10.1 | 992.4 ms | 55.17 ms | 158.30 ms | 950.1 ms |
@@ -919,11 +919,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 31.80 ms | 0.307 ms | 0.272 ms | 31.71 ms |
-| TUnit | 0.52.64 | 904.36 ms | 17.450 ms | 20.773 ms | 910.68 ms |
-| NUnit | 4.3.2 | 1,328.36 ms | 18.041 ms | 15.993 ms | 1,328.14 ms |
-| xUnit | 2.9.3 | 1,414.99 ms | 18.680 ms | 17.473 ms | 1,410.57 ms |
-| MSTest | 3.10.1 | 1,272.61 ms | 12.897 ms | 12.064 ms | 1,274.36 ms |
+| TUnit_AOT | 0.53.0 | 27.46 ms | 0.299 ms | 0.265 ms | 27.45 ms |
+| TUnit | 0.53.0 | 899.85 ms | 17.325 ms | 20.625 ms | 894.63 ms |
+| NUnit | 4.4.0 | 1,350.89 ms | 10.196 ms | 9.039 ms | 1,351.31 ms |
+| xUnit | 2.9.3 | 1,425.09 ms | 13.174 ms | 12.323 ms | 1,419.99 ms |
+| MSTest | 3.10.1 | 1,292.95 ms | 10.551 ms | 9.353 ms | 1,294.30 ms |
@@ -942,11 +942,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 62.23 ms | 0.481 ms | 0.402 ms | 62.36 ms |
-| TUnit | 0.52.64 | 930.90 ms | 18.596 ms | 19.097 ms | 932.36 ms |
-| NUnit | 4.3.2 | 1,339.82 ms | 7.469 ms | 6.987 ms | 1,341.19 ms |
-| xUnit | 2.9.3 | 1,401.46 ms | 26.282 ms | 23.298 ms | 1,395.71 ms |
-| MSTest | 3.10.1 | 1,284.52 ms | 10.047 ms | 8.906 ms | 1,285.01 ms |
+| TUnit_AOT | 0.53.0 | 62.06 ms | 0.751 ms | 0.702 ms | 62.36 ms |
+| TUnit | 0.53.0 | 927.19 ms | 18.258 ms | 27.328 ms | 929.28 ms |
+| NUnit | 4.4.0 | 1,340.22 ms | 15.854 ms | 14.830 ms | 1,338.53 ms |
+| xUnit | 2.9.3 | 1,397.52 ms | 20.354 ms | 19.039 ms | 1,393.20 ms |
+| MSTest | 3.10.1 | 1,279.59 ms | 15.377 ms | 13.632 ms | 1,274.45 ms |
### Scenario: A test that takes 50ms to execute, repeated 100 times
@@ -966,9 +966,9 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.52.64 | NA | NA | NA | NA |
-| TUnit | 0.52.64 | NA | NA | NA | NA |
-| NUnit | 4.3.2 | NA | NA | NA | NA |
+| TUnit_AOT | 0.53.0 | NA | NA | NA | NA |
+| TUnit | 0.53.0 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.1 | NA | NA | NA | NA |
@@ -996,9 +996,9 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.52.64 | NA | NA | NA | NA |
-| TUnit | 0.52.64 | NA | NA | NA | NA |
-| NUnit | 4.3.2 | NA | NA | NA | NA |
+| TUnit_AOT | 0.53.0 | NA | NA | NA | NA |
+| TUnit | 0.53.0 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.1 | NA | NA | NA | NA |
@@ -1026,9 +1026,9 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.52.64 | NA | NA | NA | NA |
-| TUnit | 0.52.64 | NA | NA | NA | NA |
-| NUnit | 4.3.2 | NA | NA | NA | NA |
+| TUnit_AOT | 0.53.0 | NA | NA | NA | NA |
+| TUnit | 0.53.0 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.1 | NA | NA | NA | NA |
@@ -1055,13 +1055,13 @@ Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |---------:|---------:|---------:|---------:|
-| TUnit_AOT | 0.52.64 | 108.6 ms | 2.39 ms | 6.78 ms | 107.0 ms |
-| TUnit | 0.52.64 | 620.3 ms | 16.93 ms | 48.57 ms | 610.0 ms |
-| NUnit | 4.3.2 | 849.8 ms | 16.96 ms | 45.28 ms | 842.0 ms |
-| xUnit | 2.9.3 | 762.9 ms | 14.48 ms | 25.35 ms | 753.5 ms |
-| MSTest | 3.10.1 | 678.0 ms | 8.12 ms | 6.78 ms | 678.7 ms |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |-----------:|---------:|----------:|-----------:|
+| TUnit_AOT | 0.53.0 | 104.4 ms | 3.98 ms | 11.48 ms | 101.1 ms |
+| TUnit | 0.53.0 | 635.7 ms | 22.23 ms | 61.96 ms | 618.5 ms |
+| NUnit | 4.4.0 | 972.7 ms | 36.32 ms | 105.94 ms | 951.4 ms |
+| xUnit | 2.9.3 | 1,032.8 ms | 37.86 ms | 110.45 ms | 1,001.6 ms |
+| MSTest | 3.10.1 | 903.5 ms | 20.45 ms | 58.02 ms | 887.9 ms |
@@ -1080,11 +1080,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 32.09 ms | 0.152 ms | 0.143 ms | 32.09 ms |
-| TUnit | 0.52.64 | 909.35 ms | 17.945 ms | 20.665 ms | 908.33 ms |
-| NUnit | 4.3.2 | 1,311.99 ms | 15.732 ms | 14.715 ms | 1,307.56 ms |
-| xUnit | 2.9.3 | 1,417.74 ms | 17.790 ms | 16.641 ms | 1,409.63 ms |
-| MSTest | 3.10.1 | 1,296.41 ms | 10.906 ms | 10.201 ms | 1,291.17 ms |
+| TUnit_AOT | 0.53.0 | 27.56 ms | 0.423 ms | 0.396 ms | 27.51 ms |
+| TUnit | 0.53.0 | 895.96 ms | 17.227 ms | 21.787 ms | 894.73 ms |
+| NUnit | 4.4.0 | 1,326.51 ms | 13.455 ms | 12.586 ms | 1,324.44 ms |
+| xUnit | 2.9.3 | 1,396.72 ms | 12.348 ms | 11.550 ms | 1,394.86 ms |
+| MSTest | 3.10.1 | 1,276.69 ms | 9.230 ms | 8.182 ms | 1,277.07 ms |
@@ -1103,11 +1103,11 @@ Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.52.64 | 62.39 ms | 0.160 ms | 0.134 ms | 62.39 ms |
-| TUnit | 0.52.64 | 956.30 ms | 19.070 ms | 22.702 ms | 949.75 ms |
-| NUnit | 4.3.2 | 1,350.16 ms | 20.686 ms | 18.338 ms | 1,350.57 ms |
-| xUnit | 2.9.3 | 1,412.25 ms | 14.038 ms | 13.131 ms | 1,412.12 ms |
-| MSTest | 3.10.1 | 1,312.66 ms | 19.996 ms | 18.704 ms | 1,311.36 ms |
+| TUnit_AOT | 0.53.0 | 61.77 ms | 1.119 ms | 1.046 ms | 62.37 ms |
+| TUnit | 0.53.0 | 930.62 ms | 18.025 ms | 22.795 ms | 923.03 ms |
+| NUnit | 4.4.0 | 1,340.33 ms | 12.257 ms | 11.465 ms | 1,338.05 ms |
+| xUnit | 2.9.3 | 1,394.98 ms | 14.102 ms | 13.191 ms | 1,392.72 ms |
+| MSTest | 3.10.1 | 1,290.97 ms | 6.880 ms | 5.745 ms | 1,290.14 ms |
diff --git a/TUnit.AOT.Tests/GenericTypeDefinitionTests.cs b/TUnit.AOT.Tests/GenericTypeDefinitionTests.cs
new file mode 100644
index 0000000000..e1544b313f
--- /dev/null
+++ b/TUnit.AOT.Tests/GenericTypeDefinitionTests.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+
+namespace TUnit.AOT.Tests
+{
+ ///
+ /// Tests to verify that non-generic types like System.Type are not treated as generic type definitions
+ ///
+ public class GenericTypeDefinitionTests
+ {
+ [Test]
+ public void TestMakeGenericType_WithNonGenericType_ShouldCompile()
+ {
+ // This test verifies that the AotTypeResolver doesn't generate invalid code
+ // when MakeGenericType is used with System.Type as an argument (not as the generic definition)
+
+ Type listGenericDefinition = typeof(List<>);
+ Type typeOfType = typeof(Type);
+
+ // This call should not cause the generator to treat System.Type as a generic type definition
+ Type listOfType = listGenericDefinition.MakeGenericType(typeOfType);
+
+ Console.WriteLine($"Successfully created: {listOfType}");
+
+ // Verify the constructed type is correct
+ if (listOfType != typeof(List))
+ {
+ throw new InvalidOperationException("Type construction failed");
+ }
+ }
+
+ [Test]
+ public void TestNonGenericType_ShouldNotBeUsedAsGenericDefinition()
+ {
+ // Verify that System.Type itself is not a generic type
+ Type typeOfType = typeof(Type);
+
+ if (typeOfType.IsGenericType)
+ {
+ throw new InvalidOperationException("System.Type should not be considered a generic type");
+ }
+
+ if (typeOfType.IsGenericTypeDefinition)
+ {
+ throw new InvalidOperationException("System.Type should not be considered a generic type definition");
+ }
+
+ Console.WriteLine("System.Type correctly identified as non-generic");
+ }
+ }
+}
\ No newline at end of file
diff --git a/TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj b/TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj
index 7952e9ef56..aa4fe7e92f 100644
--- a/TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj
+++ b/TUnit.Analyzers.Tests/TUnit.Analyzers.Tests.csproj
@@ -6,6 +6,7 @@
+
diff --git a/TUnit.Assertions.Analyzers.CodeFixers.Tests/TUnit.Assertions.Analyzers.CodeFixers.Tests.csproj b/TUnit.Assertions.Analyzers.CodeFixers.Tests/TUnit.Assertions.Analyzers.CodeFixers.Tests.csproj
index 6f3f6dc246..4a252585c4 100644
--- a/TUnit.Assertions.Analyzers.CodeFixers.Tests/TUnit.Assertions.Analyzers.CodeFixers.Tests.csproj
+++ b/TUnit.Assertions.Analyzers.CodeFixers.Tests/TUnit.Assertions.Analyzers.CodeFixers.Tests.csproj
@@ -10,6 +10,7 @@
+
diff --git a/TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj b/TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj
index f26772930c..0e46e5fed5 100644
--- a/TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj
+++ b/TUnit.Assertions.Analyzers.Tests/TUnit.Assertions.Analyzers.Tests.csproj
@@ -11,6 +11,7 @@
+
diff --git a/TUnit.Assertions.Tests/TUnit.Assertions.Tests.csproj b/TUnit.Assertions.Tests/TUnit.Assertions.Tests.csproj
index 97aaf7325b..735ad9a37d 100644
--- a/TUnit.Assertions.Tests/TUnit.Assertions.Tests.csproj
+++ b/TUnit.Assertions.Tests/TUnit.Assertions.Tests.csproj
@@ -9,6 +9,10 @@
+
+
+
+
\ No newline at end of file
diff --git a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt
index 77bb4ffd7b..fc6e6bc458 100644
--- a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class ConcreteClass1_AssertClassName_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AssertClassName",
@@ -33,12 +32,9 @@ internal sealed class ConcreteClass1_AssertClassName_TestSource_GUID : global::T
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 1,
+ FilePath = @"",
+ LineNumber = 3,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AbstractTests.AbstractBaseClass),
@@ -83,8 +79,8 @@ internal sealed class ConcreteClass1_AssertClassName_TestSource_GUID : global::T
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ConcreteClass1_AssertClassName_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt
index 65e754068c..111c177650 100644
--- a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class ConcreteClass2_SecondTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "SecondTest",
@@ -34,12 +33,9 @@ internal sealed class ConcreteClass2_SecondTest_TestSource_GUID : global::TUnit.
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 11,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2),
@@ -86,8 +82,8 @@ internal sealed class ConcreteClass2_SecondTest_TestSource_GUID : global::TUnit.
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ConcreteClass2_SecondTest_ModuleInitializer_GUID
@@ -111,9 +107,8 @@ internal static class ConcreteClass2_SecondTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class ConcreteClass2_AssertClassName_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AssertClassName",
@@ -138,12 +133,9 @@ internal sealed class ConcreteClass2_AssertClassName_TestSource_GUID : global::T
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 2,
+ FilePath = @"",
+ LineNumber = 3,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AbstractTests.AbstractBaseClass),
@@ -188,8 +180,8 @@ internal sealed class ConcreteClass2_AssertClassName_TestSource_GUID : global::T
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ConcreteClass2_AssertClassName_ModuleInitializer_GUID
@@ -213,9 +205,8 @@ internal static class ConcreteClass2_AssertClassName_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class ConcreteClass2_SecondTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "SecondTest",
@@ -240,12 +231,9 @@ internal sealed class ConcreteClass2_SecondTest_TestSource_GUID : global::TUnit.
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 3,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2),
@@ -292,8 +280,8 @@ internal sealed class ConcreteClass2_SecondTest_TestSource_GUID : global::TUnit.
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ConcreteClass2_SecondTest_ModuleInitializer_GUID
@@ -317,9 +305,8 @@ internal static class ConcreteClass2_SecondTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class ConcreteClass1_AssertClassName_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AssertClassName",
@@ -343,12 +330,9 @@ internal sealed class ConcreteClass1_AssertClassName_TestSource_GUID : global::T
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 1,
+ FilePath = @"",
+ LineNumber = 3,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AbstractTests.AbstractBaseClass),
@@ -393,8 +377,8 @@ internal sealed class ConcreteClass1_AssertClassName_TestSource_GUID : global::T
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ConcreteClass1_AssertClassName_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt
index 54dfa0f022..a5efb752bc 100644
--- a/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class CleanupTests_Test1_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Test1",
@@ -32,12 +31,9 @@ internal sealed class CleanupTests_Test1_TestSource_GUID : global::TUnit.Core.In
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 98,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AfterTests.CleanupTests),
@@ -82,8 +78,8 @@ internal sealed class CleanupTests_Test1_TestSource_GUID : global::TUnit.Core.In
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class CleanupTests_Test1_ModuleInitializer_GUID
@@ -107,9 +103,8 @@ internal static class CleanupTests_Test1_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class CleanupTests_Test2_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Test2",
@@ -132,12 +127,9 @@ internal sealed class CleanupTests_Test2_TestSource_GUID : global::TUnit.Core.In
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 104,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AfterTests.CleanupTests),
@@ -182,8 +174,8 @@ internal sealed class CleanupTests_Test2_TestSource_GUID : global::TUnit.Core.In
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class CleanupTests_Test2_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt
index 54dfa0f022..a5efb752bc 100644
--- a/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class CleanupTests_Test1_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Test1",
@@ -32,12 +31,9 @@ internal sealed class CleanupTests_Test1_TestSource_GUID : global::TUnit.Core.In
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 98,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AfterTests.CleanupTests),
@@ -82,8 +78,8 @@ internal sealed class CleanupTests_Test1_TestSource_GUID : global::TUnit.Core.In
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class CleanupTests_Test1_ModuleInitializer_GUID
@@ -107,9 +103,8 @@ internal static class CleanupTests_Test1_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class CleanupTests_Test2_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Test2",
@@ -132,12 +127,9 @@ internal sealed class CleanupTests_Test2_TestSource_GUID : global::TUnit.Core.In
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 104,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AfterTests.CleanupTests),
@@ -182,8 +174,8 @@ internal sealed class CleanupTests_Test2_TestSource_GUID : global::TUnit.Core.In
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class CleanupTests_Test2_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt
index dcf0ee3a17..fae786f669 100644
--- a/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class ArgsAsArrayTests_Params_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Params",
@@ -34,14 +33,9 @@ internal sealed class ArgsAsArrayTests_Params_TestSource_GUID : global::TUnit.Co
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(string[]),
- },
- TestMethodParameterTypes = new string[]
- {
- "string[]",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 5,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ArgsAsArrayTests),
@@ -149,8 +143,8 @@ internal sealed class ArgsAsArrayTests_Params_TestSource_GUID : global::TUnit.Co
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ArgsAsArrayTests_Params_ModuleInitializer_GUID
@@ -174,9 +168,8 @@ internal static class ArgsAsArrayTests_Params_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class ArgsAsArrayTests_NonParams_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "NonParams",
@@ -201,14 +194,9 @@ internal sealed class ArgsAsArrayTests_NonParams_TestSource_GUID : global::TUnit
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(string[]),
- },
- TestMethodParameterTypes = new string[]
- {
- "string[]",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 15,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ArgsAsArrayTests),
@@ -280,8 +268,8 @@ internal sealed class ArgsAsArrayTests_NonParams_TestSource_GUID : global::TUnit
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ArgsAsArrayTests_NonParams_ModuleInitializer_GUID
@@ -305,9 +293,8 @@ internal static class ArgsAsArrayTests_NonParams_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class ArgsAsArrayTests_ParamsEnumerable_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "ParamsEnumerable",
@@ -332,14 +319,9 @@ internal sealed class ArgsAsArrayTests_ParamsEnumerable_TestSource_GUID : global
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(global::System.Collections.Generic.IEnumerable),
- },
- TestMethodParameterTypes = new string[]
- {
- "global::System.Collections.Generic.IEnumerable",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 25,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ArgsAsArrayTests),
@@ -447,8 +429,8 @@ internal sealed class ArgsAsArrayTests_ParamsEnumerable_TestSource_GUID : global
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ArgsAsArrayTests_ParamsEnumerable_ModuleInitializer_GUID
@@ -472,9 +454,8 @@ internal static class ArgsAsArrayTests_ParamsEnumerable_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class ArgsAsArrayTests_Enumerable_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Enumerable",
@@ -499,14 +480,9 @@ internal sealed class ArgsAsArrayTests_Enumerable_TestSource_GUID : global::TUni
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(global::System.Collections.Generic.IEnumerable),
- },
- TestMethodParameterTypes = new string[]
- {
- "global::System.Collections.Generic.IEnumerable",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 35,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ArgsAsArrayTests),
@@ -578,8 +554,8 @@ internal sealed class ArgsAsArrayTests_Enumerable_TestSource_GUID : global::TUni
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ArgsAsArrayTests_Enumerable_ModuleInitializer_GUID
@@ -603,9 +579,8 @@ internal static class ArgsAsArrayTests_Enumerable_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class ArgsAsArrayTests_Following_Non_Params_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Following_Non_Params",
@@ -630,16 +605,9 @@ internal sealed class ArgsAsArrayTests_Following_Non_Params_TestSource_GUID : gl
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(int),
- typeof(global::System.Collections.Generic.IEnumerable),
- },
- TestMethodParameterTypes = new string[]
- {
- "int",
- "global::System.Collections.Generic.IEnumerable",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 45,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ArgsAsArrayTests),
@@ -718,8 +686,8 @@ internal sealed class ArgsAsArrayTests_Following_Non_Params_TestSource_GUID : gl
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ArgsAsArrayTests_Following_Non_Params_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt
index da4ef431ab..855ff443ec 100644
--- a/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class ArgumentWithImplicitConverterTests_Explicit_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Explicit",
@@ -39,14 +38,9 @@ internal sealed class ArgumentWithImplicitConverterTests_Explicit_TestSource_GUI
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(global::TUnit.TestProject.ExplicitInteger),
- },
- TestMethodParameterTypes = new string[]
- {
- "global::TUnit.TestProject.ExplicitInteger",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 8,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ArgumentWithImplicitConverterTests),
@@ -118,8 +112,8 @@ internal sealed class ArgumentWithImplicitConverterTests_Explicit_TestSource_GUI
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ArgumentWithImplicitConverterTests_Explicit_ModuleInitializer_GUID
@@ -143,9 +137,8 @@ internal static class ArgumentWithImplicitConverterTests_Explicit_ModuleInitiali
namespace TUnit.Generated;
internal sealed class ArgumentWithImplicitConverterTests_Implicit_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Implicit",
@@ -175,14 +168,9 @@ internal sealed class ArgumentWithImplicitConverterTests_Implicit_TestSource_GUI
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(global::TUnit.TestProject.ImplicitInteger),
- },
- TestMethodParameterTypes = new string[]
- {
- "global::TUnit.TestProject.ImplicitInteger",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 17,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ArgumentWithImplicitConverterTests),
@@ -254,8 +242,8 @@ internal sealed class ArgumentWithImplicitConverterTests_Implicit_TestSource_GUI
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ArgumentWithImplicitConverterTests_Implicit_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyAfterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyAfterTests.Test.verified.txt
index bdbddd59c1..a99996daca 100644
--- a/TUnit.Core.SourceGenerator.Tests/AssemblyAfterTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AssemblyAfterTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyBeforeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyBeforeTests.Test.verified.txt
index 697f89847a..608b85551b 100644
--- a/TUnit.Core.SourceGenerator.Tests/AssemblyBeforeTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AssemblyBeforeTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt
index 133989a55e..2c0a474820 100644
--- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "SynchronousTest",
@@ -32,12 +31,9 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 5,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -84,8 +80,8 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
@@ -109,9 +105,8 @@ internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsynchronousTest",
@@ -134,12 +129,9 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 11,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -184,8 +176,8 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
@@ -209,9 +201,8 @@ internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "ValueTaskAsynchronousTest",
@@ -234,12 +225,9 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 17,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -284,8 +272,8 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_ValueTaskAsynchronousTest_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt
index 133989a55e..2c0a474820 100644
--- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "SynchronousTest",
@@ -32,12 +31,9 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 5,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -84,8 +80,8 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
@@ -109,9 +105,8 @@ internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsynchronousTest",
@@ -134,12 +129,9 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 11,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -184,8 +176,8 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
@@ -209,9 +201,8 @@ internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "ValueTaskAsynchronousTest",
@@ -234,12 +225,9 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 17,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -284,8 +272,8 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_ValueTaskAsynchronousTest_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt
index d8fe2d3e42..5fe5e4ff85 100644
--- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "SynchronousTest",
@@ -32,12 +31,9 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 5,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -84,8 +80,8 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
@@ -109,9 +105,8 @@ internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsynchronousTest",
@@ -134,12 +129,9 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 11,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -184,8 +176,8 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
@@ -209,9 +201,8 @@ internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "ValueTaskAsynchronousTest",
@@ -234,12 +225,9 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 17,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -284,8 +272,8 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_ValueTaskAsynchronousTest_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt
index 19a19df1dd..c433716086 100644
--- a/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_SingleValue_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsyncMethodDataSource_SingleValue",
@@ -56,14 +55,9 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Sin
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(int),
- },
- TestMethodParameterTypes = new string[]
- {
- "int",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 8,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests),
@@ -133,8 +127,8 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Sin
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_SingleValue_ModuleInitializer_GUID
@@ -158,9 +152,8 @@ internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Sin
namespace TUnit.Generated;
internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Tuples_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsyncMethodDataSource_Tuples",
@@ -207,16 +200,9 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Tup
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(int),
- typeof(string),
- },
- TestMethodParameterTypes = new string[]
- {
- "int",
- "string",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 15,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests),
@@ -293,8 +279,8 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Tup
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Tuples_ModuleInitializer_GUID
@@ -318,9 +304,8 @@ internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Tup
namespace TUnit.Generated;
internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Enumerable_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsyncMethodDataSource_Enumerable",
@@ -367,14 +352,9 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Enu
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(int),
- },
- TestMethodParameterTypes = new string[]
- {
- "int",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 23,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests),
@@ -444,8 +424,8 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Enu
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Enumerable_ModuleInitializer_GUID
@@ -469,9 +449,8 @@ internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Enu
namespace TUnit.Generated;
internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Func_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsyncMethodDataSource_Func",
@@ -518,14 +497,9 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Fun
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(int),
- },
- TestMethodParameterTypes = new string[]
- {
- "int",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 30,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests),
@@ -595,8 +569,8 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Fun
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Func_ModuleInitializer_GUID
@@ -620,9 +594,8 @@ internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Fun
namespace TUnit.Generated;
internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_WithArguments_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsyncMethodDataSource_WithArguments",
@@ -670,14 +643,9 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Wit
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(int),
- },
- TestMethodParameterTypes = new string[]
- {
- "int",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 37,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests),
@@ -747,8 +715,8 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Wit
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_WithArguments_ModuleInitializer_GUID
@@ -772,9 +740,8 @@ internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Wit
namespace TUnit.Generated;
internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_ExternalClass_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsyncMethodDataSource_ExternalClass",
@@ -821,14 +788,9 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Ext
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(string),
- },
- TestMethodParameterTypes = new string[]
- {
- "string",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 44,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests),
@@ -898,8 +860,8 @@ internal sealed class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Ext
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_ExternalClass_ModuleInitializer_GUID
@@ -923,9 +885,8 @@ internal static class AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Ext
namespace TUnit.Generated;
internal sealed class AsyncMethodDataSourceDrivenTests_ValueTaskMethodDataSource_SingleValue_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "ValueTaskMethodDataSource_SingleValue",
@@ -972,14 +933,9 @@ internal sealed class AsyncMethodDataSourceDrivenTests_ValueTaskMethodDataSource
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(int),
- },
- TestMethodParameterTypes = new string[]
- {
- "int",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 51,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests),
@@ -1049,8 +1005,8 @@ internal sealed class AsyncMethodDataSourceDrivenTests_ValueTaskMethodDataSource
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class AsyncMethodDataSourceDrivenTests_ValueTaskMethodDataSource_SingleValue_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt
index 23a6bb1617..ce0d3d9bc0 100644
--- a/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class AttributeTests_MyTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "MyTest",
@@ -44,12 +43,9 @@ internal sealed class AttributeTests_MyTest_TestSource_GUID : global::TUnit.Core
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 7,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AttributeTests),
@@ -96,8 +92,8 @@ internal sealed class AttributeTests_MyTest_TestSource_GUID : global::TUnit.Core
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class AttributeTests_MyTest_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt
index 133989a55e..2c0a474820 100644
--- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "SynchronousTest",
@@ -32,12 +31,9 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 5,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -84,8 +80,8 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
@@ -109,9 +105,8 @@ internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsynchronousTest",
@@ -134,12 +129,9 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 11,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -184,8 +176,8 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
@@ -209,9 +201,8 @@ internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "ValueTaskAsynchronousTest",
@@ -234,12 +225,9 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 17,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -284,8 +272,8 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_ValueTaskAsynchronousTest_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt
index 133989a55e..2c0a474820 100644
--- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "SynchronousTest",
@@ -32,12 +31,9 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 5,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -84,8 +80,8 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
@@ -109,9 +105,8 @@ internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsynchronousTest",
@@ -134,12 +129,9 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 11,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -184,8 +176,8 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
@@ -209,9 +201,8 @@ internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "ValueTaskAsynchronousTest",
@@ -234,12 +225,9 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 17,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -284,8 +272,8 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_ValueTaskAsynchronousTest_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt
index d8fe2d3e42..5fe5e4ff85 100644
--- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "SynchronousTest",
@@ -32,12 +31,9 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 5,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -84,8 +80,8 @@ internal sealed class BasicTests_SynchronousTest_TestSource_GUID : global::TUnit
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
@@ -109,9 +105,8 @@ internal static class BasicTests_SynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "AsynchronousTest",
@@ -134,12 +129,9 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 11,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -184,8 +176,8 @@ internal sealed class BasicTests_AsynchronousTest_TestSource_GUID : global::TUni
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
@@ -209,9 +201,8 @@ internal static class BasicTests_AsynchronousTest_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "ValueTaskAsynchronousTest",
@@ -234,12 +225,9 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 17,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BasicTests),
@@ -284,8 +272,8 @@ internal sealed class BasicTests_ValueTaskAsynchronousTest_TestSource_GUID : glo
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class BasicTests_ValueTaskAsynchronousTest_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt
index 00a163f9dd..a206736f5e 100644
--- a/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class SetupTests_Test1_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Test1",
@@ -32,12 +31,9 @@ internal sealed class SetupTests_Test1_TestSource_GUID : global::TUnit.Core.Inte
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 98,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests),
@@ -82,8 +78,8 @@ internal sealed class SetupTests_Test1_TestSource_GUID : global::TUnit.Core.Inte
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class SetupTests_Test1_ModuleInitializer_GUID
@@ -107,9 +103,8 @@ internal static class SetupTests_Test1_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class SetupTests_Test2_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Test2",
@@ -132,12 +127,9 @@ internal sealed class SetupTests_Test2_TestSource_GUID : global::TUnit.Core.Inte
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 104,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests),
@@ -182,8 +174,8 @@ internal sealed class SetupTests_Test2_TestSource_GUID : global::TUnit.Core.Inte
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class SetupTests_Test2_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt
index 00a163f9dd..a206736f5e 100644
--- a/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class SetupTests_Test1_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Test1",
@@ -32,12 +31,9 @@ internal sealed class SetupTests_Test1_TestSource_GUID : global::TUnit.Core.Inte
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 98,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests),
@@ -82,8 +78,8 @@ internal sealed class SetupTests_Test1_TestSource_GUID : global::TUnit.Core.Inte
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class SetupTests_Test1_ModuleInitializer_GUID
@@ -107,9 +103,8 @@ internal static class SetupTests_Test1_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class SetupTests_Test2_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Test2",
@@ -132,12 +127,9 @@ internal sealed class SetupTests_Test2_TestSource_GUID : global::TUnit.Core.Inte
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 104,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests),
@@ -182,8 +174,8 @@ internal sealed class SetupTests_Test2_TestSource_GUID : global::TUnit.Core.Inte
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class SetupTests_Test2_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt
index c1adecace1..8a24290cff 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class ClassAndMethodArgumentsTests_Simple_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Simple",
@@ -36,12 +35,9 @@ internal sealed class ClassAndMethodArgumentsTests_Simple_TestSource_GUID : glob
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 8,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassAndMethodArgumentsTests),
@@ -98,8 +94,8 @@ internal sealed class ClassAndMethodArgumentsTests_Simple_TestSource_GUID : glob
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassAndMethodArgumentsTests_Simple_ModuleInitializer_GUID
@@ -123,9 +119,8 @@ internal static class ClassAndMethodArgumentsTests_Simple_ModuleInitializer_GUID
namespace TUnit.Generated;
internal sealed class ClassAndMethodArgumentsTests_WithMethodLevel_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "WithMethodLevel",
@@ -156,14 +151,9 @@ internal sealed class ClassAndMethodArgumentsTests_WithMethodLevel_TestSource_GU
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(string),
- },
- TestMethodParameterTypes = new string[]
- {
- "string",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 11,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassAndMethodArgumentsTests),
@@ -245,8 +235,8 @@ internal sealed class ClassAndMethodArgumentsTests_WithMethodLevel_TestSource_GU
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassAndMethodArgumentsTests_WithMethodLevel_ModuleInitializer_GUID
@@ -270,9 +260,8 @@ internal static class ClassAndMethodArgumentsTests_WithMethodLevel_ModuleInitial
namespace TUnit.Generated;
internal sealed class ClassAndMethodArgumentsTests_IgnoreParameters_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "IgnoreParameters",
@@ -303,14 +292,9 @@ internal sealed class ClassAndMethodArgumentsTests_IgnoreParameters_TestSource_G
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(string),
- },
- TestMethodParameterTypes = new string[]
- {
- "string",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 16,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassAndMethodArgumentsTests),
@@ -392,8 +376,8 @@ internal sealed class ClassAndMethodArgumentsTests_IgnoreParameters_TestSource_G
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassAndMethodArgumentsTests_IgnoreParameters_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt
index 8a14904956..d7c3cb5930 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class ClassConstructorTest_Test_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Test",
@@ -33,12 +32,9 @@ internal sealed class ClassConstructorTest_Test_TestSource_GUID : global::TUnit.
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 8,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassConstructorTest),
@@ -111,8 +107,8 @@ internal sealed class ClassConstructorTest_Test_TestSource_GUID : global::TUnit.
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassConstructorTest_Test_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt
index 9a994d2c84..9bd25a0e2d 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTests_DataSource_Class_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "DataSource_Class",
@@ -35,14 +34,9 @@ internal sealed class ClassDataSourceDrivenTests_DataSource_Class_TestSource_GUI
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(global::TUnit.TestProject.Library.Models.SomeAsyncDisposableClass),
- },
- TestMethodParameterTypes = new string[]
- {
- "global::TUnit.TestProject.Library.Models.SomeAsyncDisposableClass",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 9,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests),
@@ -114,8 +108,8 @@ internal sealed class ClassDataSourceDrivenTests_DataSource_Class_TestSource_GUI
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTests_DataSource_Class_ModuleInitializer_GUID
@@ -139,9 +133,8 @@ internal static class ClassDataSourceDrivenTests_DataSource_Class_ModuleInitiali
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTests_DataSource_Class_Generic_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "DataSource_Class_Generic",
@@ -167,14 +160,9 @@ internal sealed class ClassDataSourceDrivenTests_DataSource_Class_Generic_TestSo
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(global::TUnit.TestProject.Library.Models.SomeAsyncDisposableClass),
- },
- TestMethodParameterTypes = new string[]
- {
- "global::TUnit.TestProject.Library.Models.SomeAsyncDisposableClass",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 16,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests),
@@ -246,8 +234,8 @@ internal sealed class ClassDataSourceDrivenTests_DataSource_Class_Generic_TestSo
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTests_DataSource_Class_Generic_ModuleInitializer_GUID
@@ -271,9 +259,8 @@ internal static class ClassDataSourceDrivenTests_DataSource_Class_Generic_Module
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_1_ClassDataSource_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "IsInitialized_With_1_ClassDataSource",
@@ -299,14 +286,9 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_1_ClassDataS
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(InitializableClass),
- },
- TestMethodParameterTypes = new string[]
- {
- "InitializableClass",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 23,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests),
@@ -376,8 +358,8 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_1_ClassDataS
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTests_IsInitialized_With_1_ClassDataSource_ModuleInitializer_GUID
@@ -401,9 +383,8 @@ internal static class ClassDataSourceDrivenTests_IsInitialized_With_1_ClassDataS
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_2_ClassDataSources_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "IsInitialized_With_2_ClassDataSources",
@@ -429,16 +410,9 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_2_ClassDataS
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(InitializableClass),
- typeof(InitializableClass),
- },
- TestMethodParameterTypes = new string[]
- {
- "InitializableClass",
- "InitializableClass",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 30,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests),
@@ -515,8 +489,8 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_2_ClassDataS
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTests_IsInitialized_With_2_ClassDataSources_ModuleInitializer_GUID
@@ -540,9 +514,8 @@ internal static class ClassDataSourceDrivenTests_IsInitialized_With_2_ClassDataS
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_3_ClassDataSources_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "IsInitialized_With_3_ClassDataSources",
@@ -568,18 +541,9 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_3_ClassDataS
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(InitializableClass),
- typeof(InitializableClass),
- typeof(InitializableClass),
- },
- TestMethodParameterTypes = new string[]
- {
- "InitializableClass",
- "InitializableClass",
- "InitializableClass",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 38,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests),
@@ -663,8 +627,8 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_3_ClassDataS
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTests_IsInitialized_With_3_ClassDataSources_ModuleInitializer_GUID
@@ -688,9 +652,8 @@ internal static class ClassDataSourceDrivenTests_IsInitialized_With_3_ClassDataS
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_4_ClassDataSources_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "IsInitialized_With_4_ClassDataSources",
@@ -716,20 +679,9 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_4_ClassDataS
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(InitializableClass),
- typeof(InitializableClass),
- typeof(InitializableClass),
- typeof(InitializableClass),
- },
- TestMethodParameterTypes = new string[]
- {
- "InitializableClass",
- "InitializableClass",
- "InitializableClass",
- "InitializableClass",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 47,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests),
@@ -820,8 +772,8 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_4_ClassDataS
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTests_IsInitialized_With_4_ClassDataSources_ModuleInitializer_GUID
@@ -845,9 +797,8 @@ internal static class ClassDataSourceDrivenTests_IsInitialized_With_4_ClassDataS
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_5_ClassDataSources_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "IsInitialized_With_5_ClassDataSources",
@@ -873,22 +824,9 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_5_ClassDataS
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(InitializableClass),
- typeof(InitializableClass),
- typeof(InitializableClass),
- typeof(InitializableClass),
- typeof(InitializableClass),
- },
- TestMethodParameterTypes = new string[]
- {
- "InitializableClass",
- "InitializableClass",
- "InitializableClass",
- "InitializableClass",
- "InitializableClass",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 57,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests),
@@ -986,8 +924,8 @@ internal sealed class ClassDataSourceDrivenTests_IsInitialized_With_5_ClassDataS
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTests_IsInitialized_With_5_ClassDataSources_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt
index 681c48b58d..79dbba3439 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTests2_Base_Derived1_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Base_Derived1",
@@ -37,12 +36,9 @@ internal sealed class ClassDataSourceDrivenTests2_Base_Derived1_TestSource_GUID
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 12,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests2),
@@ -101,8 +97,8 @@ internal sealed class ClassDataSourceDrivenTests2_Base_Derived1_TestSource_GUID
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTests2_Base_Derived1_ModuleInitializer_GUID
@@ -126,9 +122,8 @@ internal static class ClassDataSourceDrivenTests2_Base_Derived1_ModuleInitialize
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTests2_Base_Derived2_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "Base_Derived2",
@@ -156,12 +151,9 @@ internal sealed class ClassDataSourceDrivenTests2_Base_Derived2_TestSource_GUID
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- },
- TestMethodParameterTypes = new string[]
- {
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 18,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests2),
@@ -220,8 +212,8 @@ internal sealed class ClassDataSourceDrivenTests2_Base_Derived2_TestSource_GUID
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTests2_Base_Derived2_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt
index 5456cc4afa..3d60135640 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
//
@@ -7,9 +7,8 @@
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "DataSource_Class",
@@ -36,14 +35,9 @@ internal sealed class ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Tes
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(SomeAsyncDisposableClass),
- },
- TestMethodParameterTypes = new string[]
- {
- "SomeAsyncDisposableClass",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 9,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTestsSharedKeyed),
@@ -115,8 +109,8 @@ internal sealed class ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Tes
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_ModuleInitializer_GUID
@@ -140,9 +134,8 @@ internal static class ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Mod
namespace TUnit.Generated;
internal sealed class ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Generic_TestSource_GUID : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource
{
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
{
- var tests = new global::System.Collections.Generic.List();
var metadata = new global::TUnit.Core.TestMetadata
{
TestName = "DataSource_Class_Generic",
@@ -169,14 +162,9 @@ internal sealed class ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Gen
PropertyInjections = new global::TUnit.Core.PropertyInjectionData[]
{
},
- ParameterTypes = new global::System.Type[]
- {
- typeof(SomeAsyncDisposableClass),
- },
- TestMethodParameterTypes = new string[]
- {
- "SomeAsyncDisposableClass",
- },
+ InheritanceDepth = 0,
+ FilePath = @"",
+ LineNumber = 16,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.ClassDataSourceDrivenTestsSharedKeyed),
@@ -248,8 +236,8 @@ internal sealed class ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Gen
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
- tests.Add(metadata);
- return tests;
+ yield return metadata;
+ yield break;
}
}
internal static class ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Generic_ModuleInitializer_GUID
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt
index c6af3cabb0..4b02aa4d66 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt
@@ -17,9 +17,8 @@ internal sealed class ClassTupleDataSourceDrivenTests_DataSource_TupleMethod_Tes
[global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "k__BackingField")]
private static extern ref global::System.ValueTuple GetProperty4BackingField(global::TUnit.TestProject.ClassTupleDataSourceDrivenTests instance);
#endif
- public async global::System.Threading.Tasks.ValueTask> GetTestsAsync(string testSessionId)
+ public async global::System.Collections.Generic.IAsyncEnumerable