diff --git a/.idea/.idea.TUnit/.idea/copilot.data.migration.agent.xml b/.idea/.idea.TUnit/.idea/copilot.data.migration.agent.xml
new file mode 100644
index 0000000000..4ea72a911a
--- /dev/null
+++ b/.idea/.idea.TUnit/.idea/copilot.data.migration.agent.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/.idea.TUnit/.idea/copilot.data.migration.edit.xml b/.idea/.idea.TUnit/.idea/copilot.data.migration.edit.xml
new file mode 100644
index 0000000000..8648f9401a
--- /dev/null
+++ b/.idea/.idea.TUnit/.idea/copilot.data.migration.edit.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.serena/.gitignore b/.serena/.gitignore
new file mode 100644
index 0000000000..14d86ad623
--- /dev/null
+++ b/.serena/.gitignore
@@ -0,0 +1 @@
+/cache
diff --git a/.serena/cache/csharp/document_symbols_cache_v23-06-25.pkl b/.serena/cache/csharp/document_symbols_cache_v23-06-25.pkl
index d1b24b7ca5..e0cad6d197 100644
Binary files a/.serena/cache/csharp/document_symbols_cache_v23-06-25.pkl and b/.serena/cache/csharp/document_symbols_cache_v23-06-25.pkl differ
diff --git a/Directory.Packages.props b/Directory.Packages.props
index 1bb577f4a7..6869e21c35 100644
--- a/Directory.Packages.props
+++ b/Directory.Packages.props
@@ -1,97 +1,98 @@
-
- true
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
- all
- runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md
deleted file mode 100644
index 1594260393..0000000000
--- a/KNOWN_ISSUES.md
+++ /dev/null
@@ -1,37 +0,0 @@
-# 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 6f28bbe491..4089db1b4f 100644
--- a/README.md
+++ b/README.md
@@ -429,21 +429,21 @@ dotnet add package TUnit --prerelease
```
-BenchmarkDotNet v0.15.2, macOS Sequoia 15.5 (24F74) [Darwin 24.5.0]
+BenchmarkDotNet v0.15.2, macOS Sequoia 15.6 (24G84) [Darwin 24.6.0]
Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|------------- |-------- |--------:|---------:|---------:|--------:|
-| Build_TUnit | 0.57.24 | 2.065 s | 0.1725 s | 0.4976 s | 1.982 s |
-| Build_NUnit | 4.4.0 | 1.828 s | 0.1465 s | 0.4226 s | 1.827 s |
-| Build_xUnit | 2.9.3 | 1.522 s | 0.0958 s | 0.2793 s | 1.490 s |
-| Build_MSTest | 3.10.4 | 1.445 s | 0.0720 s | 0.2112 s | 1.374 s |
+| Build_TUnit | 0.57.65 | 1.511 s | 0.1533 s | 0.4325 s | 1.365 s |
+| Build_NUnit | 4.4.0 | 1.621 s | 0.1212 s | 0.3498 s | 1.619 s |
+| Build_xUnit | 2.9.3 | 1.517 s | 0.1183 s | 0.3431 s | 1.426 s |
+| Build_MSTest | 3.10.4 | 1.648 s | 0.1234 s | 0.3620 s | 1.601 s |
@@ -453,19 +453,19 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|------------- |-------- |--------:|---------:|---------:|--------:|
-| Build_TUnit | 0.57.24 | 1.869 s | 0.0368 s | 0.0626 s | 1.854 s |
-| Build_NUnit | 4.4.0 | 1.535 s | 0.0128 s | 0.0113 s | 1.531 s |
-| Build_xUnit | 2.9.3 | 1.542 s | 0.0179 s | 0.0149 s | 1.541 s |
-| Build_MSTest | 3.10.4 | 1.512 s | 0.0169 s | 0.0141 s | 1.509 s |
+| Build_TUnit | 0.57.65 | 1.825 s | 0.0328 s | 0.0574 s | 1.802 s |
+| Build_NUnit | 4.4.0 | 1.513 s | 0.0180 s | 0.0159 s | 1.510 s |
+| Build_xUnit | 2.9.3 | 1.523 s | 0.0099 s | 0.0092 s | 1.521 s |
+| Build_MSTest | 3.10.4 | 1.517 s | 0.0094 s | 0.0083 s | 1.517 s |
@@ -475,19 +475,19 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4052) (Hyper-V)
AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|------------- |-------- |--------:|---------:|---------:|--------:|
-| Build_TUnit | 0.57.24 | 1.895 s | 0.0374 s | 0.0665 s | 1.881 s |
-| Build_NUnit | 4.4.0 | 1.606 s | 0.0298 s | 0.0264 s | 1.607 s |
-| Build_xUnit | 2.9.3 | 1.596 s | 0.0160 s | 0.0150 s | 1.599 s |
-| Build_MSTest | 3.10.4 | 1.608 s | 0.0167 s | 0.0157 s | 1.603 s |
+| Build_TUnit | 0.57.65 | 1.889 s | 0.0373 s | 0.0754 s | 1.871 s |
+| Build_NUnit | 4.4.0 | 1.591 s | 0.0193 s | 0.0171 s | 1.590 s |
+| Build_xUnit | 2.9.3 | 1.619 s | 0.0310 s | 0.0392 s | 1.610 s |
+| Build_MSTest | 3.10.4 | 1.610 s | 0.0287 s | 0.0268 s | 1.599 s |
### Scenario: Tests focused on assertion performance and validation
@@ -496,19 +496,19 @@ Runtime=.NET 9.0
```
-BenchmarkDotNet v0.15.2, macOS Sequoia 15.5 (24F74) [Darwin 24.5.0]
+BenchmarkDotNet v0.15.2, macOS Sequoia 15.6 (24G84) [Darwin 24.6.0]
Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.57.24 | NA | NA | NA | NA |
-| TUnit | 0.57.24 | NA | NA | NA | NA |
+| TUnit_AOT | 0.57.65 | NA | NA | NA | NA |
+| TUnit | 0.57.65 | NA | NA | NA | NA |
| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.4 | NA | NA | NA | NA |
@@ -528,17 +528,17 @@ Benchmarks with issues:
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.57.24 | NA | NA | NA | NA |
-| TUnit | 0.57.24 | NA | NA | NA | NA |
+| TUnit_AOT | 0.57.65 | NA | NA | NA | NA |
+| TUnit | 0.57.65 | NA | NA | NA | NA |
| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.4 | NA | NA | NA | NA |
@@ -558,17 +558,17 @@ Benchmarks with issues:
BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4052) (Hyper-V)
AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.57.24 | NA | NA | NA | NA |
-| TUnit | 0.57.24 | NA | NA | NA | NA |
+| TUnit_AOT | 0.57.65 | NA | NA | NA | NA |
+| TUnit | 0.57.65 | NA | NA | NA | NA |
| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.4 | NA | NA | NA | NA |
@@ -587,22 +587,22 @@ Benchmarks with issues:
```
-BenchmarkDotNet v0.15.2, macOS Sequoia 15.5 (24F74) [Darwin 24.5.0]
+BenchmarkDotNet v0.15.2, macOS Sequoia 15.6 (24G84) [Darwin 24.6.0]
Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----------:|----------:|----------:|-----------:|
-| TUnit_AOT | 0.57.24 | 215.6 ms | 14.87 ms | 43.15 ms | 213.9 ms |
-| TUnit | 0.57.24 | 789.9 ms | 59.44 ms | 171.50 ms | 744.7 ms |
-| NUnit | 4.4.0 | 1,567.0 ms | 151.39 ms | 444.00 ms | 1,423.6 ms |
-| xUnit | 2.9.3 | 1,274.8 ms | 79.27 ms | 231.22 ms | 1,219.6 ms |
-| MSTest | 3.10.4 | 1,272.5 ms | 123.48 ms | 354.29 ms | 1,227.9 ms |
+| TUnit_AOT | 0.57.65 | 246.9 ms | 24.35 ms | 71.79 ms | 246.7 ms |
+| TUnit | 0.57.65 | 1,015.6 ms | 72.56 ms | 211.65 ms | 968.6 ms |
+| NUnit | 4.4.0 | 1,426.7 ms | 125.11 ms | 364.97 ms | 1,353.7 ms |
+| xUnit | 2.9.3 | 1,389.0 ms | 104.94 ms | 307.78 ms | 1,298.8 ms |
+| MSTest | 3.10.4 | 1,467.2 ms | 78.71 ms | 230.85 ms | 1,457.0 ms |
@@ -612,20 +612,20 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 29.02 ms | 0.409 ms | 0.383 ms | 28.93 ms |
-| TUnit | 0.57.24 | 976.24 ms | 19.365 ms | 18.114 ms | 978.34 ms |
-| NUnit | 4.4.0 | 1,368.18 ms | 14.624 ms | 13.680 ms | 1,368.58 ms |
-| xUnit | 2.9.3 | 1,471.50 ms | 16.876 ms | 15.786 ms | 1,466.35 ms |
-| MSTest | 3.10.4 | 1,339.35 ms | 18.397 ms | 17.209 ms | 1,338.87 ms |
+| TUnit_AOT | 0.57.65 | 28.40 ms | 0.261 ms | 0.231 ms | 28.43 ms |
+| TUnit | 0.57.65 | 956.42 ms | 18.967 ms | 21.082 ms | 950.66 ms |
+| NUnit | 4.4.0 | 1,349.53 ms | 15.744 ms | 13.957 ms | 1,348.72 ms |
+| xUnit | 2.9.3 | 1,456.35 ms | 26.979 ms | 27.705 ms | 1,449.97 ms |
+| MSTest | 3.10.4 | 1,302.83 ms | 19.019 ms | 16.859 ms | 1,301.11 ms |
@@ -635,20 +635,20 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4052) (Hyper-V)
AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 65.19 ms | 1.265 ms | 1.893 ms | 64.95 ms |
-| TUnit | 0.57.24 | 1,031.11 ms | 19.896 ms | 22.912 ms | 1,024.97 ms |
-| NUnit | 4.4.0 | 1,448.81 ms | 14.974 ms | 14.007 ms | 1,450.70 ms |
-| xUnit | 2.9.3 | 1,546.58 ms | 11.472 ms | 10.731 ms | 1,546.14 ms |
-| MSTest | 3.10.4 | 1,369.38 ms | 10.885 ms | 9.090 ms | 1,372.15 ms |
+| TUnit_AOT | 0.57.65 | 63.13 ms | 1.262 ms | 1.296 ms | 62.44 ms |
+| TUnit | 0.57.65 | 992.56 ms | 19.604 ms | 24.793 ms | 988.67 ms |
+| NUnit | 4.4.0 | 1,372.23 ms | 14.888 ms | 13.926 ms | 1,372.98 ms |
+| xUnit | 2.9.3 | 1,470.50 ms | 16.520 ms | 15.453 ms | 1,469.98 ms |
+| MSTest | 3.10.4 | 1,308.63 ms | 13.112 ms | 12.265 ms | 1,310.87 ms |
### Scenario: Simple tests with basic operations and assertions
@@ -657,22 +657,22 @@ Runtime=.NET 9.0
```
-BenchmarkDotNet v0.15.2, macOS Sequoia 15.5 (24F74) [Darwin 24.5.0]
+BenchmarkDotNet v0.15.2, macOS Sequoia 15.6 (24G84) [Darwin 24.6.0]
Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----------:|----------:|----------:|-----------:|
-| TUnit_AOT | 0.57.24 | 205.5 ms | 17.73 ms | 52.00 ms | 195.8 ms |
-| TUnit | 0.57.24 | 988.7 ms | 103.38 ms | 303.19 ms | 918.7 ms |
-| NUnit | 4.4.0 | 1,287.6 ms | 140.36 ms | 404.96 ms | 1,171.8 ms |
-| xUnit | 2.9.3 | 1,081.4 ms | 54.54 ms | 157.35 ms | 1,034.3 ms |
-| MSTest | 3.10.4 | 1,112.1 ms | 75.59 ms | 219.30 ms | 1,106.3 ms |
+| TUnit_AOT | 0.57.65 | 195.9 ms | 21.53 ms | 63.14 ms | 175.8 ms |
+| TUnit | 0.57.65 | 1,052.3 ms | 75.71 ms | 223.23 ms | 1,023.1 ms |
+| NUnit | 4.4.0 | 1,438.3 ms | 138.37 ms | 405.81 ms | 1,376.3 ms |
+| xUnit | 2.9.3 | 1,387.7 ms | 91.45 ms | 268.20 ms | 1,352.5 ms |
+| MSTest | 3.10.4 | 1,443.9 ms | 82.10 ms | 239.50 ms | 1,424.0 ms |
@@ -682,20 +682,20 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 27.28 ms | 0.496 ms | 0.464 ms | 27.08 ms |
-| TUnit | 0.57.24 | 968.46 ms | 18.823 ms | 17.607 ms | 966.27 ms |
-| NUnit | 4.4.0 | 1,344.21 ms | 8.838 ms | 8.267 ms | 1,344.79 ms |
-| xUnit | 2.9.3 | 1,421.52 ms | 11.041 ms | 10.328 ms | 1,423.52 ms |
-| MSTest | 3.10.4 | 1,287.97 ms | 11.257 ms | 9.979 ms | 1,287.26 ms |
+| TUnit_AOT | 0.57.65 | 25.85 ms | 0.361 ms | 0.320 ms | 25.80 ms |
+| TUnit | 0.57.65 | 957.14 ms | 19.060 ms | 22.689 ms | 950.47 ms |
+| NUnit | 4.4.0 | 1,310.07 ms | 9.769 ms | 9.138 ms | 1,305.77 ms |
+| xUnit | 2.9.3 | 1,383.96 ms | 14.563 ms | 13.622 ms | 1,387.67 ms |
+| MSTest | 3.10.4 | 1,251.67 ms | 10.380 ms | 9.710 ms | 1,251.34 ms |
@@ -705,20 +705,20 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4052) (Hyper-V)
AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 61.14 ms | 1.197 ms | 1.899 ms | 62.27 ms |
-| TUnit | 0.57.24 | 1,029.01 ms | 19.699 ms | 24.912 ms | 1,020.23 ms |
-| NUnit | 4.4.0 | 1,389.48 ms | 19.476 ms | 18.218 ms | 1,390.31 ms |
-| xUnit | 2.9.3 | 1,467.00 ms | 14.576 ms | 13.634 ms | 1,469.37 ms |
-| MSTest | 3.10.4 | 1,350.82 ms | 12.123 ms | 11.340 ms | 1,348.95 ms |
+| TUnit_AOT | 0.57.65 | 62.20 ms | 0.597 ms | 0.529 ms | 62.36 ms |
+| TUnit | 0.57.65 | 1,101.86 ms | 21.606 ms | 32.995 ms | 1,108.25 ms |
+| NUnit | 4.4.0 | 1,519.96 ms | 29.731 ms | 34.238 ms | 1,525.15 ms |
+| xUnit | 2.9.3 | 1,579.46 ms | 31.501 ms | 30.938 ms | 1,582.17 ms |
+| MSTest | 3.10.4 | 1,460.47 ms | 27.903 ms | 28.654 ms | 1,457.01 ms |
### Scenario: Parameterized tests with multiple test cases using data attributes
@@ -727,22 +727,22 @@ Runtime=.NET 9.0
```
-BenchmarkDotNet v0.15.2, macOS Sequoia 15.5 (24F74) [Darwin 24.5.0]
+BenchmarkDotNet v0.15.2, macOS Sequoia 15.6 (24G84) [Darwin 24.6.0]
Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |---------:|---------:|---------:|---------:|
-| TUnit_AOT | 0.57.24 | NA | NA | NA | NA |
-| TUnit | 0.57.24 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | 890.9 ms | 47.84 ms | 140.3 ms | 849.9 ms |
-| xUnit | 2.9.3 | 882.3 ms | 36.86 ms | 108.1 ms | 849.1 ms |
-| MSTest | 3.10.4 | 968.4 ms | 63.73 ms | 185.9 ms | 916.2 ms |
+| TUnit_AOT | 0.57.65 | NA | NA | NA | NA |
+| TUnit | 0.57.65 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | 869.5 ms | 25.52 ms | 74.84 ms | 864.7 ms |
+| xUnit | 2.9.3 | 893.7 ms | 14.42 ms | 12.78 ms | 892.3 ms |
+| MSTest | 3.10.4 | 824.3 ms | 16.16 ms | 30.75 ms | 827.2 ms |
Benchmarks with issues:
RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -756,20 +756,20 @@ Benchmarks with issues:
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |--------:|---------:|---------:|--------:|
-| TUnit_AOT | 0.57.24 | NA | NA | NA | NA |
-| TUnit | 0.57.24 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | 1.308 s | 0.0135 s | 0.0126 s | 1.302 s |
-| xUnit | 2.9.3 | 1.379 s | 0.0138 s | 0.0129 s | 1.375 s |
-| MSTest | 3.10.4 | 1.254 s | 0.0115 s | 0.0108 s | 1.254 s |
+| TUnit_AOT | 0.57.65 | NA | NA | NA | NA |
+| TUnit | 0.57.65 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | 1.315 s | 0.0190 s | 0.0177 s | 1.312 s |
+| xUnit | 2.9.3 | 1.404 s | 0.0105 s | 0.0093 s | 1.406 s |
+| MSTest | 3.10.4 | 1.263 s | 0.0159 s | 0.0141 s | 1.265 s |
Benchmarks with issues:
RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -783,20 +783,20 @@ Benchmarks with issues:
BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4052) (Hyper-V)
AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |--------:|---------:|---------:|--------:|
-| TUnit_AOT | 0.57.24 | NA | NA | NA | NA |
-| TUnit | 0.57.24 | NA | NA | NA | NA |
-| NUnit | 4.4.0 | 1.333 s | 0.0131 s | 0.0122 s | 1.331 s |
-| xUnit | 2.9.3 | 1.388 s | 0.0139 s | 0.0116 s | 1.391 s |
-| MSTest | 3.10.4 | 1.314 s | 0.0260 s | 0.0449 s | 1.296 s |
+| TUnit_AOT | 0.57.65 | NA | NA | NA | NA |
+| TUnit | 0.57.65 | NA | NA | NA | NA |
+| NUnit | 4.4.0 | 1.372 s | 0.0158 s | 0.0140 s | 1.370 s |
+| xUnit | 2.9.3 | 1.462 s | 0.0147 s | 0.0138 s | 1.467 s |
+| MSTest | 3.10.4 | 1.319 s | 0.0101 s | 0.0079 s | 1.321 s |
Benchmarks with issues:
RuntimeBenchmarks.TUnit_AOT: Job-YNJDZW(Runtime=.NET 9.0)
@@ -809,22 +809,22 @@ Benchmarks with issues:
```
-BenchmarkDotNet v0.15.2, macOS Sequoia 15.5 (24F74) [Darwin 24.5.0]
+BenchmarkDotNet v0.15.2, macOS Sequoia 15.6 (24G84) [Darwin 24.6.0]
Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |---------:|---------:|---------:|---------:|
-| TUnit_AOT | 0.57.24 | 102.9 ms | 1.84 ms | 2.70 ms | 101.6 ms |
-| TUnit | 0.57.24 | 542.3 ms | 7.76 ms | 6.48 ms | 542.9 ms |
-| NUnit | 4.4.0 | 728.1 ms | 7.08 ms | 6.27 ms | 728.0 ms |
-| xUnit | 2.9.3 | 752.8 ms | 11.80 ms | 10.46 ms | 753.8 ms |
-| MSTest | 3.10.4 | 687.2 ms | 10.94 ms | 10.23 ms | 685.3 ms |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |-----------:|---------:|----------:|-----------:|
+| TUnit_AOT | 0.57.65 | 282.8 ms | 23.36 ms | 68.88 ms | 292.7 ms |
+| TUnit | 0.57.65 | 1,021.2 ms | 74.27 ms | 217.82 ms | 981.7 ms |
+| NUnit | 4.4.0 | 1,135.5 ms | 30.24 ms | 87.26 ms | 1,129.8 ms |
+| xUnit | 2.9.3 | 1,214.0 ms | 37.97 ms | 104.58 ms | 1,221.6 ms |
+| MSTest | 3.10.4 | 963.0 ms | 33.33 ms | 90.67 ms | 951.2 ms |
@@ -834,19 +834,19 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 27.07 ms | 0.485 ms | 0.539 ms | 27.05 ms |
-| TUnit | 0.57.24 | 939.73 ms | 18.717 ms | 23.671 ms | 933.43 ms |
-| NUnit | 4.4.0 | 1,304.30 ms | 13.060 ms | 12.216 ms | 1,300.81 ms |
-| xUnit | 2.9.3 | 1,366.76 ms | 7.899 ms | 7.389 ms | 1,367.51 ms |
+| TUnit_AOT | 0.57.65 | 25.84 ms | 0.298 ms | 0.279 ms | 25.77 ms |
+| TUnit | 0.57.65 | 946.61 ms | 18.764 ms | 21.609 ms | 945.39 ms |
+| NUnit | 4.4.0 | 1,303.23 ms | 6.576 ms | 5.830 ms | 1,304.83 ms |
+| xUnit | 2.9.3 | 1,373.62 ms | 12.321 ms | 10.922 ms | 1,373.85 ms |
| MSTest | 3.10.4 | NA | NA | NA | NA |
Benchmarks with issues:
@@ -860,19 +860,19 @@ Benchmarks with issues:
BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4052) (Hyper-V)
AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 61.69 ms | 1.172 ms | 1.350 ms | 62.36 ms |
-| TUnit | 0.57.24 | 1,084.28 ms | 21.435 ms | 29.340 ms | 1,085.06 ms |
-| NUnit | 4.4.0 | 1,461.71 ms | 26.486 ms | 36.254 ms | 1,449.49 ms |
-| xUnit | 2.9.3 | 1,529.14 ms | 20.700 ms | 19.362 ms | 1,524.25 ms |
+| TUnit_AOT | 0.57.65 | 53.88 ms | 1.075 ms | 1.397 ms | 53.76 ms |
+| TUnit | 0.57.65 | 1,016.64 ms | 19.695 ms | 22.681 ms | 1,015.71 ms |
+| NUnit | 4.4.0 | 1,353.95 ms | 9.623 ms | 8.530 ms | 1,355.93 ms |
+| xUnit | 2.9.3 | 1,424.95 ms | 27.795 ms | 29.740 ms | 1,416.50 ms |
| MSTest | 3.10.4 | NA | NA | NA | NA |
Benchmarks with issues:
@@ -885,22 +885,22 @@ Benchmarks with issues:
```
-BenchmarkDotNet v0.15.2, macOS Sequoia 15.5 (24F74) [Darwin 24.5.0]
+BenchmarkDotNet v0.15.2, macOS Sequoia 15.6 (24G84) [Darwin 24.6.0]
Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |---------:|---------:|----------:|---------:|
-| TUnit_AOT | 0.57.24 | 126.6 ms | 5.18 ms | 14.61 ms | 126.7 ms |
-| TUnit | 0.57.24 | 546.6 ms | 9.43 ms | 8.82 ms | 547.1 ms |
-| NUnit | 4.4.0 | 871.7 ms | 52.50 ms | 153.97 ms | 810.4 ms |
-| xUnit | 2.9.3 | 911.9 ms | 26.82 ms | 79.07 ms | 909.9 ms |
-| MSTest | 3.10.4 | 750.7 ms | 14.96 ms | 33.15 ms | 746.1 ms |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |-----------:|----------:|----------:|-----------:|
+| TUnit_AOT | 0.57.65 | 156.1 ms | 8.28 ms | 24.28 ms | 149.5 ms |
+| TUnit | 0.57.65 | 1,003.4 ms | 75.85 ms | 216.40 ms | 967.4 ms |
+| NUnit | 4.4.0 | 1,538.4 ms | 142.24 ms | 417.17 ms | 1,423.0 ms |
+| xUnit | 2.9.3 | 1,243.9 ms | 58.92 ms | 170.94 ms | 1,242.2 ms |
+| MSTest | 3.10.4 | 1,273.8 ms | 110.74 ms | 317.74 ms | 1,223.6 ms |
@@ -910,20 +910,20 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 25.75 ms | 0.321 ms | 0.284 ms | 25.72 ms |
-| TUnit | 0.57.24 | 948.67 ms | 18.705 ms | 22.267 ms | 951.05 ms |
-| NUnit | 4.4.0 | 1,328.79 ms | 15.702 ms | 14.688 ms | 1,326.58 ms |
-| xUnit | 2.9.3 | 1,406.24 ms | 7.430 ms | 6.204 ms | 1,407.50 ms |
-| MSTest | 3.10.4 | 1,271.67 ms | 10.432 ms | 9.758 ms | 1,268.96 ms |
+| TUnit_AOT | 0.57.65 | 26.30 ms | 0.168 ms | 0.149 ms | 26.29 ms |
+| TUnit | 0.57.65 | 945.49 ms | 18.799 ms | 22.379 ms | 943.12 ms |
+| NUnit | 4.4.0 | 1,321.94 ms | 10.563 ms | 9.881 ms | 1,322.25 ms |
+| xUnit | 2.9.3 | 1,394.78 ms | 9.010 ms | 8.428 ms | 1,394.10 ms |
+| MSTest | 3.10.4 | 1,271.70 ms | 9.700 ms | 9.073 ms | 1,270.76 ms |
@@ -933,20 +933,20 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4052) (Hyper-V)
AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 58.43 ms | 1.165 ms | 2.880 ms | 57.46 ms |
-| TUnit | 0.57.24 | 1,020.35 ms | 20.368 ms | 22.639 ms | 1,012.48 ms |
-| NUnit | 4.4.0 | 1,379.94 ms | 18.763 ms | 17.550 ms | 1,378.05 ms |
-| xUnit | 2.9.3 | 1,469.48 ms | 27.796 ms | 27.299 ms | 1,460.47 ms |
-| MSTest | 3.10.4 | 1,405.20 ms | 17.441 ms | 15.461 ms | 1,410.30 ms |
+| TUnit_AOT | 0.57.65 | 61.76 ms | 1.043 ms | 0.976 ms | 62.36 ms |
+| TUnit | 0.57.65 | 1,050.87 ms | 20.881 ms | 24.047 ms | 1,049.79 ms |
+| NUnit | 4.4.0 | 1,429.72 ms | 13.654 ms | 12.104 ms | 1,433.31 ms |
+| xUnit | 2.9.3 | 1,446.62 ms | 17.306 ms | 16.188 ms | 1,443.57 ms |
+| MSTest | 3.10.4 | 1,318.66 ms | 12.503 ms | 11.695 ms | 1,319.96 ms |
### Scenario: A test that takes 50ms to execute, repeated 100 times
@@ -955,19 +955,19 @@ Runtime=.NET 9.0
```
-BenchmarkDotNet v0.15.2, macOS Sequoia 15.5 (24F74) [Darwin 24.5.0]
+BenchmarkDotNet v0.15.2, macOS Sequoia 15.6 (24G84) [Darwin 24.6.0]
Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.57.24 | NA | NA | NA | NA |
-| TUnit | 0.57.24 | NA | NA | NA | NA |
+| TUnit_AOT | 0.57.65 | NA | NA | NA | NA |
+| TUnit | 0.57.65 | NA | NA | NA | NA |
| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.4 | NA | NA | NA | NA |
@@ -987,17 +987,17 @@ Benchmarks with issues:
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.57.24 | NA | NA | NA | NA |
-| TUnit | 0.57.24 | NA | NA | NA | NA |
+| TUnit_AOT | 0.57.65 | NA | NA | NA | NA |
+| TUnit | 0.57.65 | NA | NA | NA | NA |
| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.4 | NA | NA | NA | NA |
@@ -1017,17 +1017,17 @@ Benchmarks with issues:
BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4052) (Hyper-V)
AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |-----:|------:|-------:|-------:|
-| TUnit_AOT | 0.57.24 | NA | NA | NA | NA |
-| TUnit | 0.57.24 | NA | NA | NA | NA |
+| TUnit_AOT | 0.57.65 | NA | NA | NA | NA |
+| TUnit | 0.57.65 | NA | NA | NA | NA |
| NUnit | 4.4.0 | NA | NA | NA | NA |
| xUnit | 2.9.3 | NA | NA | NA | NA |
| MSTest | 3.10.4 | NA | NA | NA | NA |
@@ -1046,22 +1046,22 @@ Benchmarks with issues:
```
-BenchmarkDotNet v0.15.2, macOS Sequoia 15.5 (24F74) [Darwin 24.5.0]
+BenchmarkDotNet v0.15.2, macOS Sequoia 15.6 (24G84) [Darwin 24.6.0]
Apple M1 (Virtual), 1 CPU, 3 logical and 3 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), Arm64 RyuJIT AdvSIMD
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), Arm64 RyuJIT AdvSIMD
Runtime=.NET 9.0
```
-| Method | Version | Mean | Error | StdDev | Median |
-|---------- |-------- |-----------:|---------:|----------:|-----------:|
-| TUnit_AOT | 0.57.24 | 166.8 ms | 19.39 ms | 57.18 ms | 143.2 ms |
-| TUnit | 0.57.24 | 1,040.1 ms | 98.72 ms | 284.83 ms | 1,014.4 ms |
-| NUnit | 4.4.0 | 1,163.5 ms | 76.14 ms | 214.75 ms | 1,111.1 ms |
-| xUnit | 2.9.3 | 1,152.3 ms | 45.92 ms | 131.01 ms | 1,138.9 ms |
-| MSTest | 3.10.4 | 1,074.1 ms | 65.22 ms | 190.24 ms | 1,042.7 ms |
+| Method | Version | Mean | Error | StdDev | Median |
+|---------- |-------- |-----------:|----------:|----------:|-----------:|
+| TUnit_AOT | 0.57.65 | 187.8 ms | 10.71 ms | 30.54 ms | 190.1 ms |
+| TUnit | 0.57.65 | 1,113.5 ms | 85.26 ms | 248.70 ms | 1,061.1 ms |
+| NUnit | 4.4.0 | 1,530.1 ms | 107.54 ms | 317.09 ms | 1,503.3 ms |
+| xUnit | 2.9.3 | 1,314.0 ms | 67.51 ms | 199.05 ms | 1,302.3 ms |
+| MSTest | 3.10.4 | 1,112.3 ms | 81.43 ms | 237.55 ms | 1,083.6 ms |
@@ -1071,20 +1071,20 @@ Runtime=.NET 9.0
BenchmarkDotNet v0.15.2, Linux Ubuntu 24.04.3 LTS (Noble Numbat)
AMD EPYC 7763, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 27.22 ms | 0.535 ms | 0.833 ms | 27.27 ms |
-| TUnit | 0.57.24 | 960.21 ms | 17.493 ms | 16.363 ms | 963.80 ms |
-| NUnit | 4.4.0 | 1,334.68 ms | 9.249 ms | 8.652 ms | 1,332.05 ms |
-| xUnit | 2.9.3 | 1,391.21 ms | 13.163 ms | 12.313 ms | 1,388.89 ms |
-| MSTest | 3.10.4 | 1,272.16 ms | 13.746 ms | 12.858 ms | 1,271.26 ms |
+| TUnit_AOT | 0.57.65 | 26.88 ms | 0.154 ms | 0.129 ms | 26.86 ms |
+| TUnit | 0.57.65 | 964.14 ms | 18.784 ms | 18.448 ms | 969.71 ms |
+| NUnit | 4.4.0 | 1,329.60 ms | 9.400 ms | 8.793 ms | 1,333.00 ms |
+| xUnit | 2.9.3 | 1,395.85 ms | 8.020 ms | 7.502 ms | 1,396.99 ms |
+| MSTest | 3.10.4 | 1,276.36 ms | 8.271 ms | 7.736 ms | 1,276.65 ms |
@@ -1092,22 +1092,22 @@ Runtime=.NET 9.0
```
-BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4052) (Hyper-V)
+BenchmarkDotNet v0.15.2, Windows 10 (10.0.20348.4171) (Hyper-V)
AMD EPYC 7763 2.44GHz, 1 CPU, 4 logical and 2 physical cores
-.NET SDK 9.0.304
- [Host] : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
- Job-YNJDZW : .NET 9.0.8 (9.0.825.36511), X64 RyuJIT AVX2
+.NET SDK 9.0.305
+ [Host] : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
+ Job-YNJDZW : .NET 9.0.9 (9.0.925.41916), X64 RyuJIT AVX2
Runtime=.NET 9.0
```
| Method | Version | Mean | Error | StdDev | Median |
|---------- |-------- |------------:|----------:|----------:|------------:|
-| TUnit_AOT | 0.57.24 | 52.80 ms | 1.042 ms | 0.975 ms | 52.98 ms |
-| TUnit | 0.57.24 | 1,014.34 ms | 20.095 ms | 26.129 ms | 1,007.50 ms |
-| NUnit | 4.4.0 | 1,348.52 ms | 6.670 ms | 6.239 ms | 1,351.84 ms |
-| xUnit | 2.9.3 | 1,411.12 ms | 11.775 ms | 11.014 ms | 1,409.01 ms |
-| MSTest | 3.10.4 | 1,309.57 ms | 14.812 ms | 13.855 ms | 1,314.12 ms |
+| TUnit_AOT | 0.57.65 | 57.01 ms | 1.137 ms | 3.317 ms | 57.65 ms |
+| TUnit | 0.57.65 | 1,004.72 ms | 18.438 ms | 31.805 ms | 1,005.44 ms |
+| NUnit | 4.4.0 | 1,335.75 ms | 16.565 ms | 15.495 ms | 1,333.72 ms |
+| xUnit | 2.9.3 | 1,382.34 ms | 14.540 ms | 13.600 ms | 1,385.97 ms |
+| MSTest | 3.10.4 | 1,277.11 ms | 7.443 ms | 6.962 ms | 1,278.63 ms |
diff --git a/TUnit.Analyzers.Tests/DynamicTestAwaitExpressionSuppressorTests.cs b/TUnit.Analyzers.Tests/DynamicTestAwaitExpressionSuppressorTests.cs
index 0559faedc0..6769a6e4a9 100644
--- a/TUnit.Analyzers.Tests/DynamicTestAwaitExpressionSuppressorTests.cs
+++ b/TUnit.Analyzers.Tests/DynamicTestAwaitExpressionSuppressorTests.cs
@@ -17,95 +17,95 @@ await AnalyzerTestHelpers
using System.Threading.Tasks;
using TUnit;
using TUnit.Core;
-
+
namespace TUnit.TestProject.DynamicTests;
-
+
public class Basic
{
public void SomeMethod()
{
Console.Out.WriteLine(@"Hello, World!");
}
-
+
public async ValueTask SomeMethod_ValueTask()
{
await default(ValueTask);
Console.WriteLine(@"Hello, World!");
}
-
+
public async Task SomeMethod_Task()
{
await Task.CompletedTask;
Console.WriteLine(@"Hello, World!");
}
-
+
public void SomeMethod_Args(int a, string b, bool c)
{
Console.WriteLine(@"Hello, World!");
}
-
+
public async ValueTask SomeMethod_ValueTask_Args(int a, string b, bool c)
{
await default(ValueTask);
Console.WriteLine(@"Hello, World!");
}
-
+
public async Task SomeMethod_Task_Args(int a, string b, bool c)
{
await Task.CompletedTask;
Console.WriteLine(@"Hello, World!");
}
-
+
#pragma warning disable TUnitWIP0001
[DynamicTestBuilder]
#pragma warning restore TUnitWIP0001
public async Task BuildTests(DynamicTestBuilderContext context)
{
await Task.Delay(TimeSpan.FromSeconds(0.5));
-
- context.AddTest(new DynamicTestInstance
+
+ context.AddTest(new DynamicTest
{
TestMethod = @class => @class.SomeMethod(),
TestMethodArguments = [],
Attributes = [new RepeatAttribute(5)]
});
-
- context.AddTest(new DynamicTestInstance
+
+ context.AddTest(new DynamicTest
{
TestMethod = @class => {|#0:@class.SomeMethod_Task()|},
TestMethodArguments = [],
Attributes = [new RepeatAttribute(5)]
});
-
- context.AddTest(new DynamicTestInstance
+
+ context.AddTest(new DynamicTest
{
TestMethod = @class => {|#1:@class.SomeMethod_ValueTask()|},
TestMethodArguments = [],
Attributes = [new RepeatAttribute(5)]
});
-
- context.AddTest(new DynamicTestInstance
+
+ context.AddTest(new DynamicTest
{
TestMethod = @class => @class.SomeMethod_Args(1, "test", true),
TestMethodArguments = [2, "test", false],
Attributes = [new RepeatAttribute(5)]
});
-
- context.AddTest(new DynamicTestInstance
+
+ context.AddTest(new DynamicTest
{
TestMethod = @class => {|#2:@class.SomeMethod_Task_Args(1, "test", true)|},
TestMethodArguments = [2, "test", false],
Attributes = [new RepeatAttribute(5)]
});
-
- context.AddTest(new DynamicTestInstance
+
+ context.AddTest(new DynamicTest
{
TestMethod = @class => {|#3:@class.SomeMethod_ValueTask_Args(1, "test", true)|},
TestMethodArguments = [2, "test", false],
Attributes = [new RepeatAttribute(5)]
});
-
- context.AddTest(new DynamicTestInstance
+
+ context.AddTest(new DynamicTest
{
TestMethod = @class => {|#4:@class.SomeMethod_ValueTask_Args(1, "test", true)|},
TestMethodArguments = [2, "test", false],
diff --git a/TUnit.Analyzers/DependsOnConflictAnalyzer.cs b/TUnit.Analyzers/DependsOnConflictAnalyzer.cs
index 02d03cae75..e30f22ce48 100644
--- a/TUnit.Analyzers/DependsOnConflictAnalyzer.cs
+++ b/TUnit.Analyzers/DependsOnConflictAnalyzer.cs
@@ -42,7 +42,7 @@ private void AnalyzeSymbol(SymbolAnalysisContext context)
{
var method = (IMethodSymbol) context.Symbol;
- AttributeData[] dependsOnAttributes = GetDependsOnAttributes(method).Concat(GetDependsOnAttributes(method.ReceiverType ?? method.ContainingType)).ToArray();
+ var dependsOnAttributes = GetDependsOnAttributes(method).Concat(GetDependsOnAttributes(method.ReceiverType ?? method.ContainingType)).ToArray();
var dependencies = GetDependencies(context, new Chain(method), method, dependsOnAttributes);
diff --git a/TUnit.Analyzers/DynamicTestAwaitExpressionSuppressor.cs b/TUnit.Analyzers/DynamicTestAwaitExpressionSuppressor.cs
index ddcbbddc3f..19145cbd2c 100644
--- a/TUnit.Analyzers/DynamicTestAwaitExpressionSuppressor.cs
+++ b/TUnit.Analyzers/DynamicTestAwaitExpressionSuppressor.cs
@@ -29,7 +29,7 @@ public override void ReportSuppressions(SuppressionAnalysisContext context)
continue;
}
- if (namedTypeSymbol.Name == "DynamicTest" || namedTypeSymbol.Name == "DynamicTestInstance")
+ if (namedTypeSymbol.Name == "DynamicTest" || namedTypeSymbol.Name == "DynamicTest")
{
Suppress(context, diagnostic);
}
diff --git a/TUnit.Analyzers/Migrators/XUnitMigrationAnalyzer.cs b/TUnit.Analyzers/Migrators/XUnitMigrationAnalyzer.cs
index e494001d50..989b05edc6 100644
--- a/TUnit.Analyzers/Migrators/XUnitMigrationAnalyzer.cs
+++ b/TUnit.Analyzers/Migrators/XUnitMigrationAnalyzer.cs
@@ -80,7 +80,7 @@ private void AnalyzeSyntax(SyntaxNodeAnalysisContext context)
var members = namedTypeSymbol.GetMembers();
- ITypeSymbol[] types = members.OfType().Where(x => x.Type.ContainingNamespace?.Name.StartsWith("Xunit") is true).Select(x => x.Type)
+ var types = members.OfType().Where(x => x.Type.ContainingNamespace?.Name.StartsWith("Xunit") is true).Select(x => x.Type)
.Concat(members.OfType().Where(x => x.ReturnType.ContainingNamespace?.Name.StartsWith("Xunit") is true).Select(x => x.ReturnType))
.Concat(members.OfType().Where(x => x.Type.ContainingNamespace?.Name.StartsWith("Xunit") is true).Select(x => x.Type))
.ToArray();
diff --git a/TUnit.Analyzers/TestDataAnalyzer.cs b/TUnit.Analyzers/TestDataAnalyzer.cs
index 8815e178de..07d0b731b3 100644
--- a/TUnit.Analyzers/TestDataAnalyzer.cs
+++ b/TUnit.Analyzers/TestDataAnalyzer.cs
@@ -295,7 +295,7 @@ private static bool IsInAttributeClass(INamedTypeSymbol? typeSymbol)
private ImmutableArray GetTypes(ImmutableArray parameters, IPropertySymbol? propertySymbol)
{
- IEnumerable types = parameters.Select(x => x.Type).Concat(new[] { propertySymbol?.Type }).Where(t => t != null);
+ var types = parameters.Select(x => x.Type).Concat(new[] { propertySymbol?.Type }).Where(t => t != null);
return types.OfType().ToImmutableArray().WithoutCancellationTokenParameter();
}
diff --git a/TUnit.Assertions.SourceGenerator.Tests/AssertionMethodGeneratorTests.GeneratesCharAssertions.DotNet8_0.verified.txt b/TUnit.Assertions.SourceGenerator.Tests/AssertionMethodGeneratorTests.GeneratesCharAssertions.DotNet8_0.verified.txt
new file mode 100644
index 0000000000..251c9ef060
--- /dev/null
+++ b/TUnit.Assertions.SourceGenerator.Tests/AssertionMethodGeneratorTests.GeneratesCharAssertions.DotNet8_0.verified.txt
@@ -0,0 +1,522 @@
+[
+#nullable enable
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using TUnit.Assertions.AssertConditions;
+using TUnit.Assertions.AssertConditions.Interfaces;
+using TUnit.Assertions.AssertionBuilders;
+using TUnit.Assertions.Extensions;
+
+namespace TUnit.Assertions.Extensions;
+
+public class CharIsDigitWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsDigitWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsDigit(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsDigit");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsDigit";
+ }
+}
+
+public class CharIsLetterWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLetterWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLetter(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLetter");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLetter";
+ }
+}
+
+public class CharIsLetterOrDigitWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLetterOrDigitWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLetterOrDigit(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLetterOrDigit");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLetterOrDigit";
+ }
+}
+
+public class CharIsLowerWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLowerWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLower(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLower");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLower";
+ }
+}
+
+public class CharIsUpperWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsUpperWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsUpper(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsUpper");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsUpper";
+ }
+}
+
+public class CharIsNumberWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsNumberWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsNumber(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNumber");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsNumber";
+ }
+}
+
+public class CharIsPunctuationWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsPunctuationWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsPunctuation(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsPunctuation");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsPunctuation";
+ }
+}
+
+public class CharIsSeparatorWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsSeparatorWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsSeparator(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSeparator");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsSeparator";
+ }
+}
+
+public class CharIsSymbolWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsSymbolWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsSymbol(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSymbol");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsSymbol";
+ }
+}
+
+public class CharIsWhiteSpaceWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsWhiteSpaceWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsWhiteSpace(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsWhiteSpace");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsWhiteSpace";
+ }
+}
+
+public class CharIsControlWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsControlWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsControl(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsControl");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsControl";
+ }
+}
+
+public class CharIsHighSurrogateWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsHighSurrogateWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsHighSurrogate(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsHighSurrogate");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsHighSurrogate";
+ }
+}
+
+public class CharIsLowSurrogateWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLowSurrogateWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLowSurrogate(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLowSurrogate");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLowSurrogate";
+ }
+}
+
+public class CharIsSurrogateWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsSurrogateWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsSurrogate(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSurrogate");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsSurrogate";
+ }
+}
+
+public static partial class CharAssertionExtensions
+{
+ public static InvokableValueAssertionBuilder IsDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsDigitWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsDigitWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLetter(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLetter(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLetterOrDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterOrDigitWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLetterOrDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterOrDigitWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLower(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowerWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLower(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowerWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsUpper(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsUpperWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotUpper(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsUpperWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNumber(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsNumberWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotNumber(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsNumberWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsPunctuation(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsPunctuationWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotPunctuation(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsPunctuationWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsSeparator(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSeparatorWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotSeparator(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSeparatorWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsSymbol(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSymbolWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotSymbol(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSymbolWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsWhiteSpace(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsWhiteSpaceWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotWhiteSpace(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsWhiteSpaceWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsControl(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsControlWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotControl(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsControlWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsHighSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsHighSurrogateWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotHighSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsHighSurrogateWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLowSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowSurrogateWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLowSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowSurrogateWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSurrogateWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSurrogateWithCharAssertCondition(true),
+ []);
+ }
+
+}
+
+]
\ No newline at end of file
diff --git a/TUnit.Assertions.SourceGenerator.Tests/AssertionMethodGeneratorTests.GeneratesCharAssertions.DotNet9_0.verified.txt b/TUnit.Assertions.SourceGenerator.Tests/AssertionMethodGeneratorTests.GeneratesCharAssertions.DotNet9_0.verified.txt
new file mode 100644
index 0000000000..251c9ef060
--- /dev/null
+++ b/TUnit.Assertions.SourceGenerator.Tests/AssertionMethodGeneratorTests.GeneratesCharAssertions.DotNet9_0.verified.txt
@@ -0,0 +1,522 @@
+[
+#nullable enable
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using TUnit.Assertions.AssertConditions;
+using TUnit.Assertions.AssertConditions.Interfaces;
+using TUnit.Assertions.AssertionBuilders;
+using TUnit.Assertions.Extensions;
+
+namespace TUnit.Assertions.Extensions;
+
+public class CharIsDigitWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsDigitWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsDigit(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsDigit");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsDigit";
+ }
+}
+
+public class CharIsLetterWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLetterWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLetter(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLetter");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLetter";
+ }
+}
+
+public class CharIsLetterOrDigitWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLetterOrDigitWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLetterOrDigit(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLetterOrDigit");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLetterOrDigit";
+ }
+}
+
+public class CharIsLowerWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLowerWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLower(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLower");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLower";
+ }
+}
+
+public class CharIsUpperWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsUpperWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsUpper(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsUpper");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsUpper";
+ }
+}
+
+public class CharIsNumberWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsNumberWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsNumber(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNumber");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsNumber";
+ }
+}
+
+public class CharIsPunctuationWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsPunctuationWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsPunctuation(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsPunctuation");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsPunctuation";
+ }
+}
+
+public class CharIsSeparatorWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsSeparatorWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsSeparator(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSeparator");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsSeparator";
+ }
+}
+
+public class CharIsSymbolWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsSymbolWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsSymbol(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSymbol");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsSymbol";
+ }
+}
+
+public class CharIsWhiteSpaceWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsWhiteSpaceWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsWhiteSpace(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsWhiteSpace");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsWhiteSpace";
+ }
+}
+
+public class CharIsControlWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsControlWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsControl(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsControl");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsControl";
+ }
+}
+
+public class CharIsHighSurrogateWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsHighSurrogateWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsHighSurrogate(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsHighSurrogate");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsHighSurrogate";
+ }
+}
+
+public class CharIsLowSurrogateWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLowSurrogateWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLowSurrogate(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLowSurrogate");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLowSurrogate";
+ }
+}
+
+public class CharIsSurrogateWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsSurrogateWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsSurrogate(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSurrogate");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsSurrogate";
+ }
+}
+
+public static partial class CharAssertionExtensions
+{
+ public static InvokableValueAssertionBuilder IsDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsDigitWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsDigitWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLetter(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLetter(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLetterOrDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterOrDigitWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLetterOrDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterOrDigitWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLower(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowerWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLower(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowerWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsUpper(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsUpperWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotUpper(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsUpperWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNumber(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsNumberWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotNumber(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsNumberWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsPunctuation(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsPunctuationWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotPunctuation(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsPunctuationWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsSeparator(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSeparatorWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotSeparator(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSeparatorWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsSymbol(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSymbolWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotSymbol(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSymbolWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsWhiteSpace(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsWhiteSpaceWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotWhiteSpace(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsWhiteSpaceWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsControl(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsControlWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotControl(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsControlWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsHighSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsHighSurrogateWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotHighSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsHighSurrogateWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLowSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowSurrogateWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLowSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowSurrogateWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSurrogateWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotSurrogate(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSurrogateWithCharAssertCondition(true),
+ []);
+ }
+
+}
+
+]
\ No newline at end of file
diff --git a/TUnit.Assertions.SourceGenerator.Tests/AssertionMethodGeneratorTests.GeneratesCharAssertions.Net4_7.verified.txt b/TUnit.Assertions.SourceGenerator.Tests/AssertionMethodGeneratorTests.GeneratesCharAssertions.Net4_7.verified.txt
new file mode 100644
index 0000000000..251c9ef060
--- /dev/null
+++ b/TUnit.Assertions.SourceGenerator.Tests/AssertionMethodGeneratorTests.GeneratesCharAssertions.Net4_7.verified.txt
@@ -0,0 +1,522 @@
+[
+#nullable enable
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Threading.Tasks;
+using TUnit.Assertions.AssertConditions;
+using TUnit.Assertions.AssertConditions.Interfaces;
+using TUnit.Assertions.AssertionBuilders;
+using TUnit.Assertions.Extensions;
+
+namespace TUnit.Assertions.Extensions;
+
+public class CharIsDigitWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsDigitWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsDigit(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsDigit");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsDigit";
+ }
+}
+
+public class CharIsLetterWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLetterWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLetter(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLetter");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLetter";
+ }
+}
+
+public class CharIsLetterOrDigitWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLetterOrDigitWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLetterOrDigit(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLetterOrDigit");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLetterOrDigit";
+ }
+}
+
+public class CharIsLowerWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLowerWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLower(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLower");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLower";
+ }
+}
+
+public class CharIsUpperWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsUpperWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsUpper(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsUpper");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsUpper";
+ }
+}
+
+public class CharIsNumberWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsNumberWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsNumber(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsNumber");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsNumber";
+ }
+}
+
+public class CharIsPunctuationWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsPunctuationWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsPunctuation(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsPunctuation");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsPunctuation";
+ }
+}
+
+public class CharIsSeparatorWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsSeparatorWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsSeparator(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSeparator");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsSeparator";
+ }
+}
+
+public class CharIsSymbolWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsSymbolWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsSymbol(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSymbol");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsSymbol";
+ }
+}
+
+public class CharIsWhiteSpaceWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsWhiteSpaceWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsWhiteSpace(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsWhiteSpace");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsWhiteSpace";
+ }
+}
+
+public class CharIsControlWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsControlWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsControl(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsControl");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsControl";
+ }
+}
+
+public class CharIsHighSurrogateWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsHighSurrogateWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsHighSurrogate(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsHighSurrogate");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsHighSurrogate";
+ }
+}
+
+public class CharIsLowSurrogateWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsLowSurrogateWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsLowSurrogate(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsLowSurrogate");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsLowSurrogate";
+ }
+}
+
+public class CharIsSurrogateWithCharAssertCondition : BaseAssertCondition
+{
+ private readonly bool _negated;
+
+ public CharIsSurrogateWithCharAssertCondition(bool negated = false)
+ {
+ _negated = negated;
+ }
+
+ protected override ValueTask GetResult(char actualValue, Exception? exception, AssertionMetadata assertionMetadata)
+ {
+ var result = char.IsSurrogate(actualValue);
+ var condition = _negated ? result : !result;
+ return AssertionResult.FailIf(condition, $"'{actualValue}' was expected {(_negated ? "not " : "")}to satisfy IsSurrogate");
+ }
+
+ protected internal override string GetExpectation()
+ {
+ return $"{(_negated ? "not " : "")}to satisfy IsSurrogate";
+ }
+}
+
+public static partial class CharAssertionExtensions
+{
+ public static InvokableValueAssertionBuilder IsDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsDigitWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsDigitWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLetter(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLetter(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLetterOrDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterOrDigitWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLetterOrDigit(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLetterOrDigitWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsLower(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowerWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotLower(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsLowerWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsUpper(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsUpperWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotUpper(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsUpperWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNumber(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsNumberWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotNumber(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsNumberWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsPunctuation(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsPunctuationWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotPunctuation(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsPunctuationWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsSeparator(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSeparatorWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotSeparator(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSeparatorWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsSymbol(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSymbolWithCharAssertCondition(false),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder IsNotSymbol(this IValueSource valueSource)
+ {
+ return valueSource.RegisterAssertion(
+ new CharIsSymbolWithCharAssertCondition(true),
+ []);
+ }
+
+ public static InvokableValueAssertionBuilder