Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c2eae69
chore: update xunit related package version to v3 with mtp v2
filzrev Mar 7, 2026
942cd36
chore: add using Xunit.Sdk statement for XunitSerializable
filzrev Mar 7, 2026
6911467
chore: fix xUnit3003 analyzer errors
filzrev Mar 7, 2026
00491de
chore: modify theorydata related incompatible codes
filzrev Mar 7, 2026
e1a18c2
chore: add global.json to use Microsoft.Testing.Platform by dotnet test
filzrev Mar 28, 2026
1147c2e
chore: add tests/.editorconfig
filzrev Mar 29, 2026
1edee5f
chore: fix custom inlinedata attribute
filzrev Mar 29, 2026
d4b513b
chore: fix wasm related tests
filzrev Mar 29, 2026
7760b3b
chore: suppress MSB3277 warnings
filzrev Mar 30, 2026
20aa49c
chore: migrate multipleframeworks tests to tunit
filzrev Mar 30, 2026
79bf33b
chore: update build project to support mtp
filzrev Mar 30, 2026
8cc49ca
chore: suppress auto-entrypoint generation of benchmark project templ…
filzrev Mar 30, 2026
aa02e74
chore: fix run-tests-selected workflow
filzrev Apr 2, 2026
42f11f6
chore: add PreferNativeArm64 setting to Directory.Build.targets
filzrev Apr 3, 2026
77adb57
chore: cleanup compile item references and file name
filzrev Apr 6, 2026
98cda78
chore: add diagnostic logs and collect as artifacts
filzrev Apr 6, 2026
6a87b31
chore: update generate-coverage-report.yaml
filzrev Apr 6, 2026
2868d01
chore: temporary skip disassemble tests for macos
filzrev Apr 6, 2026
0dea2c6
chore: add isinprocess condition to skip tests
filzrev Apr 9, 2026
ec591b9
chore: add consolecapture setting and parallel setting
filzrev Jun 1, 2026
2173658
chore: modify test to use dotnet run for simple output
filzrev Jun 2, 2026
011e071
chore: set default diag log level to warning and add --no-launchprofi…
filzrev Jun 3, 2026
73e3276
chore: update parallel settings that introduced on xunit v3 4.0.0-pre…
filzrev Jul 19, 2026
0141d13
chore: fix build error on build project
filzrev Jul 19, 2026
08337d4
chore: remove ConsoleLogger to avoid dupicated log lines if [assembly…
filzrev Jul 19, 2026
4e4a740
chore: add launchsettings.json per test projects
filzrev Jul 19, 2026
5c99fe6
chore: fix ci error with line ending differences
filzrev Jul 19, 2026
6c29068
chore: add setting to skip test when no test data
filzrev Jul 19, 2026
7a248e2
chore: disable mtp and xunit entrypoint generation on benchmark project
filzrev Jul 19, 2026
9071359
chore: add testconfig.json
filzrev Jul 20, 2026
9b8afba
chore: add telemetry/progress disable verification for some tests
filzrev Jul 22, 2026
5619495
chore: disable progress on CI execution to avoid extra memory allocat…
filzrev Jul 22, 2026
92c2e4e
chore: remove unused test filter and add parameters
filzrev Jul 22, 2026
373ec95
chore: add setting to suppress dotnet cli telemetry
filzrev Jul 23, 2026
1bb582a
chore: add skip setting for flaky test
filzrev Jul 23, 2026
01cd99a
chore: temporary disable longRunningTest detection background worker
filzrev Jul 24, 2026
fe1b732
chore: modify test condition for flaky tests
filzrev Jul 24, 2026
808f312
chore: remove temporary workaround setting for macos from ThreadingDi…
filzrev Jul 24, 2026
ac301e9
chore: remove validation logics because flaky test is reproduced on w…
filzrev Jul 25, 2026
9c3b2dd
chore: update PerfonarTest based on latest update
filzrev Jul 28, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Verify snapshot files must keep LF line endings on every platform.
# Verify.XunitV3 rejects a verified file that contains a CR with core.autocrlf.
*.verified.* text eol=lf
*.received.* text eol=lf
20 changes: 10 additions & 10 deletions .github/workflows/generate-coverage-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
type: boolean
description: Set `true` to skip integration tests.
default: true

concurrency:
group: ${{ github.workflow }}-${{ github.event.inputs.skip_integration_tests }}-${{ github.head_ref || github.ref || github.run_id }}
cancel-in-progress: true
Expand Down Expand Up @@ -49,13 +49,13 @@ jobs:

- name: Collect Code Coverage
run: |
dotnet coverage connect bdn_coverage "dotnet test tests/BenchmarkDotNet.Tests -c Release --no-build --framework net10.0"
dotnet coverage connect bdn_coverage "dotnet test tests/BenchmarkDotNet.Analyzers.Tests -c Release --no-build --framework net10.0"
dotnet coverage connect bdn_coverage "dotnet test --project tests/BenchmarkDotNet.Tests -c Release --no-build --framework net10.0 --no-ansi --output Detailed"
dotnet coverage connect bdn_coverage "dotnet test --project tests/BenchmarkDotNet.Analyzers.Tests -c Release --no-build --framework net10.0 --no-ansi --output Detailed"

- name: Collect Code Coverage for BenchmarkDotNet.IntegrationTests
if: ${{ github.event.inputs.skip_integration_tests == 'false'}}
run: |
dotnet coverage connect bdn_coverage "dotnet test tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net10.0"
dotnet coverage connect bdn_coverage "dotnet test --project tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net10.0 --no-ansi --output Detailed"

- name: Shutdown dotnet-coverage server.
run: dotnet coverage shutdown bdn_coverage --timeout 60000
Expand All @@ -77,7 +77,7 @@ jobs:
- name: Setup additional tools for Wasm/NativeAot tests
if: ${{ github.event.inputs.skip_integration_tests == 'false'}}
uses: ./.github/actions/setup-additional-tools

- name: Install dotnet-coverage
run: dotnet tool install --global dotnet-coverage

Expand All @@ -89,13 +89,13 @@ jobs:

- name: Collect Code Coverage
run: |
dotnet coverage connect bdn_coverage "dotnet test tests/BenchmarkDotNet.Tests -c Release --no-build --framework net472"
dotnet coverage connect bdn_coverage "dotnet test tests/BenchmarkDotNet.Analyzers.Tests -c Release --no-build --framework net472"
dotnet coverage connect bdn_coverage "dotnet test --project tests/BenchmarkDotNet.Tests -c Release --no-build --framework net472 --no-ansi --output Detailed"
dotnet coverage connect bdn_coverage "dotnet test --project tests/BenchmarkDotNet.Analyzers.Tests -c Release --no-build --framework net472 --no-ansi --output Detailed"

- name: Collect Code Coverage for BenchmarkDotNet.IntegrationTests
if: ${{ github.event.inputs.skip_integration_tests == 'false'}}
- name: Collect Code Coverage for BenchmarkDotNet.IntegrationTests
if: ${{ github.event.inputs.skip_integration_tests == 'false'}}
run: |
dotnet coverage connect bdn_coverage 'dotnet test tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net472'
dotnet coverage connect bdn_coverage 'dotnet test --project tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net472 --no-ansi --output Detailed

- name: Shutdown dotnet-coverage server.
run: dotnet coverage shutdown bdn_coverage --timeout 60000
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/run-tests-selected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,13 @@ jobs:
run: |
$PSNativeCommandUseErrorActionPreference = $true
$iterationCount = ${{ inputs.iteration_count }}

Write-Host ("OSArchitecture" + [System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)

foreach($i in 1..$iterationCount) {
Write-Output ('##[group]Executing Iteration: {0}/${{ inputs.iteration_count }}' -f $i)

dotnet test -c Release --framework ${{ inputs.framework }} --filter ${{ inputs.filter }} -tl:off --no-build --logger "console;verbosity=normal"

dotnet test -c Release --framework ${{ inputs.framework }} --no-build --filter "${{ inputs.filter }}" --no-ansi --progress off --output Detailed
Write-Output '##[endgroup]'
}

Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/run-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ jobs:
if: always()
with:
name: test-windows-core-trx-${{ github.run_id }}-${{ matrix.os }}
path: "**/*.trx"
path: |
**/*.trx
**/log_*.diag

test-windows-full:
strategy:
Expand Down Expand Up @@ -100,7 +102,9 @@ jobs:
if: always()
with:
name: test-windows-full-trx-${{ github.run_id }}-${{ matrix.os }}
path: "**/*.trx"
path: |
**/*.trx
**/log_*.diag

test-linux:
strategy:
Expand Down Expand Up @@ -136,7 +140,9 @@ jobs:
if: always()
with:
name: test-linux-trx-${{ github.run_id }}-${{ matrix.os }}
path: "**/*.trx"
path: |
**/*.trx
**/log_*.diag

test-macos:
name: test-macos (${{ matrix.os.arch }})
Expand Down Expand Up @@ -177,7 +183,9 @@ jobs:
if: always()
with:
name: test-macos(${{ matrix.os.arch }})-trx-${{ github.run_id }}
path: "**/*.trx"
path: |
**/*.trx
**/log_*.diag

test-pack:
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions BenchmarkDotNet.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<Project Path="templates/BenchmarkDotNet.Templates.csproj" />
</Folder>
<Folder Name="/tests/">
<File Path="tests/.editorconfig" />
<File Path="tests/Directory.Build.props" />
<File Path="tests/Directory.Build.targets" />
<Project Path="tests/BenchmarkDotNet.Analyzers.Tests/BenchmarkDotNet.Analyzers.Tests.csproj" />
Expand Down
29 changes: 23 additions & 6 deletions build/BenchmarkDotNet.Build/Runners/UnitTestRunner.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
using BenchmarkDotNet.Build.Helpers;
using Cake.Common.Diagnostics;
using Cake.Common.Tools.DotNet;
using Cake.Common.Tools.DotNet.Test;
using Cake.Common.Tools.DotNet.Run;
using Cake.Core;
using Cake.Core.IO;
using System.Linq;
using System.Runtime.InteropServices;

namespace BenchmarkDotNet.Build.Runners;
Expand Down Expand Up @@ -32,19 +34,34 @@ public class UnitTestRunner(BuildContext context)
private DirectoryPath TestOutputDirectory { get; } = context.RootDirectory
.Combine("TestResults");

private DotNetTestSettings GetTestSettingsParameters(FilePath logFile, string tfm)
private DotNetRunSettings GetTestSettingsParameters(FilePath logFile, string tfm)
{
var settings = new DotNetTestSettings
// Enabled `Trace` level logging when debug logging is enabled on GitHub Actions.
// https://docs.github.com/en/actions/how-tos/monitor-workflows/enable-debug-logging
var diagnosticVerbosity = context.Environment.GetEnvironmentVariable("ACTIONS_STEP_DEBUG") == "true"
? "Trace"
: "Warning"; // Logging Warning/Error/Critical level logs by default.

var settings = new DotNetRunSettings
{
Configuration = context.BuildConfiguration,
Framework = tfm,
NoBuild = true,
NoRestore = true,
Loggers = new[] { "trx", $"trx;LogFileName={logFile.FullPath}", "console;verbosity=detailed" },
EnvironmentVariables =
{
["Platform"] = "" // force the tool to not look for the .dll in platform-specific directory
}
},
ArgumentCustomization = args
=> args.Append("--report-xunit-trx")
.AppendSwitchQuoted("--report-xunit-trx-filename", System.IO.Path.GetFileName(logFile.FullPath))
.Append("--no-ansi")
.AppendSwitch("--progress", "off")
.AppendSwitch("--output", "Detailed")
.AppendSwitch("--show-stdout", "Failed")
.Append("--diagnostic")
.AppendSwitch("--diagnostic-verbosity", diagnosticVerbosity)
.Append("--no-launch-profile"),
};
return settings;
}
Expand All @@ -58,7 +75,7 @@ private void RunTests(FilePath projectFile, string alias, string tfm)
var settings = GetTestSettingsParameters(trxFile, tfm);

context.Information($"Run tests for {projectFile} ({tfm}), result file: '{trxFile}'");
context.DotNetTest(projectFile.FullPath, settings);
context.DotNetRun(projectFile.FullPath, settings);
}

private void RunUnitTests(string tfm)
Expand Down
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
8 changes: 4 additions & 4 deletions src/BenchmarkDotNet/Exporters/HtmlExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ public class HtmlExporter : ExporterBase
{
private const string CssDefinition = @"
<style type=""text/css"">
table { border-collapse: collapse; display: block; width: 100%; overflow: auto; }
td, th { padding: 6px 13px; border: 1px solid #ddd; text-align: right; }
tr { background-color: #fff; border-top: 1px solid #ccc; }
tr:nth-child(even) { background: #f8f8f8; }
table { border-collapse: collapse; display: block; width: 100%; overflow: auto; }
td, th { padding: 6px 13px; border: 1px solid #ddd; text-align: right; }
tr { background-color: #fff; border-top: 1px solid #ccc; }
tr:nth-child(even) { background: #f8f8f8; }
</style>";

protected override string FileExtension => "html";
Expand Down
2 changes: 1 addition & 1 deletion src/BenchmarkDotNet/Templates/MonoAOTLLVMCsProj.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk" DefaultTarget="Publish">
<Project Sdk="Microsoft.NET.Sdk" DefaultTarget="Publish">
<PropertyGroup>
<OriginalCSProjPath>$CSPROJPATH$</OriginalCSProjPath>
<MonoPropsPath>$([System.IO.Path]::ChangeExtension('$(OriginalCSProjPath)', '.Mono.props'))</MonoPropsPath>
Expand Down
4 changes: 3 additions & 1 deletion src/BenchmarkDotNet/Templates/WasmCsProj.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="$SDKNAME$" DefaultTargets="publish">
<Project Sdk="$SDKNAME$" DefaultTargets="publish">
<PropertyGroup>
<OriginalCSProjPath>$CSPROJPATH$</OriginalCSProjPath>
<WasmPropsPath>$([System.IO.Path]::ChangeExtension('$(OriginalCSProjPath)', '.Wasm.props'))</WasmPropsPath>
Expand Down Expand Up @@ -26,6 +26,8 @@ $CORECLR_OVERRIDES$
<!-- Suppress warning for nuget package used in old (unsupported) tfm. -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<StartupObject>BenchmarkDotNet.Autogenerated.UniqueProgramName</StartupObject>
<!-- Suppress error NETSDK1084: There is no application host available for the specified RuntimeIdentifier 'browser-wasm'. -->
<UseAppHost>false</UseAppHost>
</PropertyGroup>

<ItemGroup>
Expand Down
11 changes: 11 additions & 0 deletions tests/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = false

# C# files
[*.cs]
# xUnit1051: Calls to methods which accept CancellationToken should use TestContext.Current.CancellationToken to allow test cancellation to be more responsive.
dotnet_diagnostic.xUnit1051.severity = suggestion

# Verify settings
[*.{received,verified}.{txt}]
charset = utf-8-bom
trim_trailing_whitespace = false
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ public async Task Providing_expected_value_type_should_not_trigger_diagnostic(
{
var testCode = /* lang=c#-test */ $$"""
using DifferentNamespace;

using BenchmarkDotNet.Attributes;

public class BenchmarkClass
Expand Down Expand Up @@ -1114,7 +1114,7 @@ public void BenchmarkMethod({{integerValueAndType.Value2}} a)
}

public static IEnumerable<string> DummyAttributeUsage
=> DummyAttributeUsageTheoryData;
=> DummyAttributeUsageTheoryData.Select(x => x.Data);

public static TheoryData<string> EmptyArgumentsAttributeUsagesWithMismatchingValueCount()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public class BenchmarkClass
}

public static TheoryData<string> UniqueParameterAttributeUsages
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => (tdr[1] as string)!)];
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => tdr.Data.Item2)];

public static TheoryData<string, int, int[]> DuplicateSameParameterAttributeUsages
=> DuplicateSameAttributeUsagesTheoryData;
Expand Down Expand Up @@ -321,7 +321,7 @@ public class BenchmarkClass
await RunAsync();
}

public static TheoryData<string> UniqueParameterAttributeUsages => [.. UniqueParameterAttributesTheoryData.Select(tdr => (tdr[1] as string)!)];
public static TheoryData<string> UniqueParameterAttributeUsages => [.. UniqueParameterAttributesTheoryData.Select(tdr => tdr.Data.Item2)];

public static TheoryData<string, int, int[]> DuplicateSameParameterAttributeUsages => DuplicateSameAttributeUsagesTheoryData;

Expand Down Expand Up @@ -480,21 +480,19 @@ public static IEnumerable<object[]> DuplicateAttributeUsageCountsAndNonPublicCla
=> CombinationsGenerator.CombineArguments(DuplicateParameterAttributeUsageCounts, NonPublicClassMemberAccessModifiers);

public static TheoryData<string> UniqueParameterAttributeUsages
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => (tdr[1] as string)!)];
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => tdr.Data.Item2)];

public static IEnumerable<(string AttributeName, string AttributeUsage)> UniqueParameterAttributes
=> UniqueParameterAttributesTheoryData.Select(tdr => ((tdr[0] as string)!, (tdr[1] as string)!));
=> UniqueParameterAttributesTheoryData.Select(tdr => (tdr.Data.Item1, tdr.Data.Item2));

public static IEnumerable<string> NonPublicClassMemberAccessModifiers
#pragma warning disable IDE0028 // Simplify collection initialization
=> new NonPublicClassMemberAccessModifiersTheoryData();
#pragma warning restore IDE0028 // Simplify collection initialization
=> new NonPublicClassMemberAccessModifiersTheoryData().Select(x => x.Data);

public static IEnumerable<(string CurrentUniqueAttributeUsage, int CurrentUniqueAttributeUsagePosition, int[] Counts)> DuplicateSameParameterAttributeUsages
=> DuplicateSameAttributeUsagesTheoryData.Select(tdr => ((tdr[0] as string)!, (int)tdr[1], (tdr[2] as int[])!));
=> DuplicateSameAttributeUsagesTheoryData.Select(tdr => (tdr.Data.Item1, tdr.Data.Item2, tdr.Data.Item3));

public static IEnumerable<int[]> DuplicateParameterAttributeUsageCounts
=> DuplicateAttributeUsageCountsTheoryData;
=> DuplicateAttributeUsageCountsTheoryData.Select(x => x.Data);
}

public class PropertyMustBePublic : AnalyzerTestFixture<GeneralParameterAttributesAnalyzer>
Expand Down Expand Up @@ -649,18 +647,16 @@ public static IEnumerable<object[]> DuplicateAttributeUsageCountsAndNonPublicCla
=> CombinationsGenerator.CombineArguments(DuplicateParameterAttributeUsageCounts, NonPublicClassMemberAccessModifiers);

public static TheoryData<string> UniqueParameterAttributeUsages
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => (tdr[1] as string)!)];
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => tdr.Data.Item2)];

public static IEnumerable<(string AttributeName, string AttributeUsage)> UniqueParameterAttributes
=> UniqueParameterAttributesTheoryData.Select(tdr => ((tdr[0] as string)!, (tdr[1] as string)!));
=> UniqueParameterAttributesTheoryData.Select(tdr => (tdr.Data.Item1, tdr.Data.Item2));

public static IEnumerable<string> NonPublicClassMemberAccessModifiers
#pragma warning disable IDE0028 // Simplify collection initialization
=> new NonPublicClassMemberAccessModifiersTheoryData();
#pragma warning restore IDE0028 // Simplify collection initialization
=> new NonPublicClassMemberAccessModifiersTheoryData().Select(x => x.Data);

public static IEnumerable<(string CurrentUniqueAttributeUsage, int CurrentUniqueAttributeUsagePosition, int[] Counts)> DuplicateSameParameterAttributeUsages
=> DuplicateSameAttributeUsagesTheoryData.Select(tdr => ((tdr[0] as string)!, (int)tdr[1], (tdr[2] as int[])!));
=> DuplicateSameAttributeUsagesTheoryData.Select(tdr => (tdr.Data.Item1, tdr.Data.Item2, tdr.Data.Item3));

public static TheoryData<int[]> DuplicateParameterAttributeUsageCounts
=> DuplicateAttributeUsageCountsTheoryData;
Expand Down Expand Up @@ -814,7 +810,7 @@ public class BenchmarkClass
}

public static TheoryData<string> UniqueParameterAttributeUsages
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => (tdr[1] as string)!)];
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => tdr.Data.Item2)];

public static TheoryData<string, string> UniqueParameterAttributes
=> UniqueParameterAttributesTheoryData;
Expand Down Expand Up @@ -952,7 +948,7 @@ public class BenchmarkClass
}

public static TheoryData<string> UniqueParameterAttributeUsages
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => (tdr[1] as string)!)];
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => tdr.Data.Item2)];

public static TheoryData<string, string> UniqueParameterAttributes
=> UniqueParameterAttributesTheoryData;
Expand Down Expand Up @@ -1114,7 +1110,7 @@ public class BenchmarkClass
}

public static TheoryData<string> UniqueParameterAttributeUsages
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => (tdr[1] as string)!)];
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => tdr.Data.Item2)];

public static TheoryData<string, string> UniqueParameterAttributes
=> UniqueParameterAttributesTheoryData;
Expand Down Expand Up @@ -1279,20 +1275,20 @@ public static IEnumerable<object[]> DuplicateAttributeUsageCountsAndNonPublicPro
=> CombinationsGenerator.CombineArguments(DuplicateParameterAttributeUsageCounts, NonPublicPropertySetters());

public static TheoryData<string> UniqueParameterAttributeUsages
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => (tdr[1] as string)!)];
=> [.. UniqueParameterAttributesTheoryData.Select(tdr => tdr.Data.Item2)];

public static IEnumerable<(string AttributeName, string AttributeUsage)> UniqueParameterAttributes
=> UniqueParameterAttributesTheoryData.Select(tdr => ((tdr[0] as string)!, (tdr[1] as string)!));
=> UniqueParameterAttributesTheoryData.Select(tdr => (tdr.Data.Item1, tdr.Data.Item2));

public static IEnumerable<(string CurrentUniqueAttributeUsage, int CurrentUniqueAttributeUsagePosition, int[] Counts)> DuplicateSameParameterAttributeUsages
=> DuplicateSameAttributeUsagesTheoryData.Select(tdr => ((tdr[0] as string)!, (int)tdr[1], (tdr[2] as int[])!));
=> DuplicateSameAttributeUsagesTheoryData.Select(tdr => (tdr.Data.Item1, tdr.Data.Item2, tdr.Data.Item3));

public static TheoryData<int[]> DuplicateParameterAttributeUsageCounts
=> DuplicateAttributeUsageCountsTheoryData;

public static IEnumerable<string> NonPublicPropertySetters()
=> new NonPublicPropertySetterAccessModifiersTheoryData()
.Select<string, string>(m => $"{{ get; {m} set; }}")
.Select(m => $"{{ get; {m.Data} set; }}")
.Concat(["{ get; }", "=> 0;"]);

public static TheoryData<string> NonPublicPropertySettersTheoryData()
Expand Down Expand Up @@ -1487,7 +1483,7 @@ private static IEnumerable<int[]> GenerateDuplicateAttributeUsageCombinations(Th
private static ReadOnlyCollection<(string CurrentUniqueAttributeUsage, int CurrentUniqueAttributeUsagePosition, int[] Counts)> GenerateDuplicateSameAttributeUsageCombinations(TheoryData<string, string> uniqueAttributeUsages)
{
var uniqueAttributeUsagesList = uniqueAttributeUsages
.Select(tdr => (tdr[1] as string)!)
.Select(tdr => tdr.Data.Item2)
.ToList()
.AsReadOnly();

Expand Down
Loading