Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
e1b5c82
chore: update xunit related package version to v3 with mtp v2
filzrev Mar 7, 2026
70e9ca1
chore: add using Xunit.Sdk statement for XunitSerializable
filzrev Mar 7, 2026
623c6f5
chore: fix xUnit3003 analyzer errors
filzrev Mar 7, 2026
8bb19b9
chore: remove unittests project dependency from integration tests pro…
filzrev Mar 7, 2026
6681ab8
chore: modify theorydata related incompatible codes
filzrev Mar 7, 2026
a434cd2
chore: add global.json to use Microsoft.Testing.Platform by dotnet test
filzrev Mar 28, 2026
564f758
chore: add tests/.editorconfig
filzrev Mar 29, 2026
74c510a
chore: fix custom inlinedata attribute
filzrev Mar 29, 2026
9e102ff
chore: fix wasm related tests
filzrev Mar 29, 2026
167d6af
chore: suppress MSB3277 warnings
filzrev Mar 30, 2026
8fb8ae9
chore: migrate multipleframeworks tests to tunit
filzrev Mar 30, 2026
16815c6
chore: update build project to support mtp
filzrev Mar 30, 2026
f708cc6
chore: suppress auto-entrypoint generation of benchmark project templ…
filzrev Mar 30, 2026
2847bd4
chore: add setting to suppress entrypoint generation for NativeAot
filzrev Apr 1, 2026
c6b706e
chore: fix run-tests-selected workflow
filzrev Apr 2, 2026
9678bf5
chore: add setting for ci on windows-11-arm
filzrev Apr 3, 2026
a390f61
chore: move PreferNativeArm64 setting to Directory.Build.targets
filzrev Apr 3, 2026
1541ca6
chore: cleanup compile item references and file name
filzrev Apr 6, 2026
9e92029
chore: temporary skip disassemble tests for macos
filzrev Apr 6, 2026
7ccc9b0
chore: add diagnostic logs and collect as artifacts
filzrev Apr 6, 2026
830e8a5
chore: update generate-coverage-report.yaml
filzrev Apr 6, 2026
6fb8bfd
chore: add isinprocess condition to skip tests
filzrev Apr 9, 2026
9855dc5
chore: modify test filter to exclude all wasm tests
filzrev Apr 9, 2026
bdc6595
chore: add setting to use native mtp entrypoint
filzrev Apr 12, 2026
f5fda24
chore: remove mtp trx report package and use xunit's trx reporter ins…
filzrev Apr 15, 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
12 changes: 6 additions & 6 deletions .github/workflows/generate-coverage-report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ jobs:

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

- 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 net8.0 --filter "(FullyQualifiedName!~DotMemoryTests) & (FullyQualifiedName!~DotTraceTests) & (FullyQualifiedName!~WasmIsSupported) & (FullyQualifiedName!~WasmSupportsInProcessDiagnosers)"'
dotnet coverage connect bdn_coverage 'dotnet test --project tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net8.0 --filter-query "/*/*/(!*DotMemoryTests)&(!*DotTraceTests)&(!*WasmTests)"' --no-ansi --output Detailed

- name: Shutdown dotnet-coverage server.
run: dotnet coverage shutdown bdn_coverage --timeout 60000
Expand Down Expand Up @@ -80,13 +80,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"
dotnet coverage connect bdn_coverage "dotnet test --project tests/BenchmarkDotNet.Analyzers.Tests -c Release --no-build --framework net472"

- 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 --filter "(FullyQualifiedName!~DotMemoryTests) & (FullyQualifiedName!~DotTraceTests) & (FullyQualifiedName!~WasmIsSupported) & (FullyQualifiedName!~WasmSupportsInProcessDiagnosers)"'
dotnet coverage connect bdn_coverage 'dotnet test --project tests/BenchmarkDotNet.IntegrationTests -c Release --no-build --framework net472 --filter-query "/*/*/(!*DotMemoryTests)&(!*DotTraceTests)&(!*WasmTests)"' --no-ansi --output Detailed

- name: Shutdown dotnet-coverage server.
run: dotnet coverage shutdown bdn_coverage --timeout 60000
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/run-tests-selected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ on:
- net472
filter:
type: string
description: Test filter text (It's used for `dotnet test --filter`) Use default value when running all tests
description: Test filter text (It's used for `dotnet test --filter-method`) Use default value when running all tests
required: true
default: "BenchmarkDotNet"
iteration_count:
Expand Down Expand Up @@ -83,12 +83,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-method "${{ inputs.filter }}" --no-ansi
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 @@ -52,7 +52,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 @@ -94,7 +96,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 @@ -129,7 +133,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 @@ -169,7 +175,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
2 changes: 2 additions & 0 deletions BenchmarkDotNet.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
<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" />
<Project Path="tests/BenchmarkDotNet.Exporters.Plotting.Tests/BenchmarkDotNet.Exporters.Plotting.Tests.csproj" />
<Project Path="tests/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly/BenchmarkDotNet.IntegrationTests.ConfigPerAssembly.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion build/BenchmarkDotNet.Build/BenchmarkDotNet.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<NoWarn>$(NoWarn);CA2007</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Frosting" Version="6.0.0" />
<PackageReference Include="Cake.Frosting" Version="6.1.0" />
<PackageReference Include="Cake.FileHelpers" Version="7.0.0" />
<PackageReference Include="Cake.Git" Version="5.0.1" />
<PackageReference Include="Docfx.App" Version="2.78.5" />
Expand Down
13 changes: 11 additions & 2 deletions build/BenchmarkDotNet.Build/Runners/UnitTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
using Cake.Common.Diagnostics;
using Cake.Common.Tools.DotNet;
using Cake.Common.Tools.DotNet.Test;
using Cake.Core;
using Cake.Core.IO;
using System.Linq;
using System.Runtime.InteropServices;

namespace BenchmarkDotNet.Build.Runners;
Expand Down Expand Up @@ -41,11 +43,18 @@ private DotNetTestSettings GetTestSettingsParameters(FilePath logFile, string tf
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
}
},
PathType = DotNetTestPathType.Auto,
ArgumentCustomization = args
=> args.Append("--report-xunit-trx")
.AppendSwitchQuoted("--report-xunit-trx-filename", System.IO.Path.GetFileName(logFile.FullPath))
.Append("--no-ansi")
.AppendSwitch("--output", "Detailed")
.Append("--diagnostic")
.AppendSwitch("--diagnostic-verbosity", "Trace")
};
return settings;
}
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"
}
}
1 change: 1 addition & 0 deletions src/BenchmarkDotNet/Templates/CsProj.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<!-- Suppress warning for nuget package used in old (unsupported) tfm. -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<StartupObject>BenchmarkDotNet.Autogenerated.UniqueProgramName</StartupObject>
<IsTestingPlatformApplication>false</IsTestingPlatformApplication>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 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 All @@ -21,6 +21,7 @@
<SelfContained>true</SelfContained>
<!-- Suppress warning for nuget package used in old (unsupported) tfm. -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<IsTestingPlatformApplication>false</IsTestingPlatformApplication>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions src/BenchmarkDotNet/Templates/R2RCsProj.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
<StartupObject>BenchmarkDotNet.Autogenerated.UniqueProgramName</StartupObject>
<!-- workaround for 'Found multiple publish output files with the same relative path.' error -->
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
<IsTestingPlatformApplication>false</IsTestingPlatformApplication>
</PropertyGroup>

<PropertyGroup>
Expand Down
3 changes: 2 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,7 @@ $CORECLR_OVERRIDES$
<!-- Suppress warning for nuget package used in old (unsupported) tfm. -->
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings>
<StartupObject>BenchmarkDotNet.Autogenerated.UniqueProgramName</StartupObject>
<IsTestingPlatformApplication>false</IsTestingPlatformApplication>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions src/BenchmarkDotNet/Toolchains/NativeAot/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,10 @@ private string GenerateProjectForNuGetBuild(string projectFilePath, BuildPartiti
<SuppressTfmSupportBuildWarnings>true</SuppressTfmSupportBuildWarnings> <!-- Suppress warning for nuget package used in old (unsupported) tfm. -->
{GetInstructionSetSettings(buildPartition)}
</PropertyGroup>
<PropertyGroup>
<IsTestingPlatformApplication>false</IsTestingPlatformApplication>
<XunitAutoGeneratedEntryPoint>false</XunitAutoGeneratedEntryPoint>
</PropertyGroup>
{GetRuntimeSettings(buildPartition.RepresentativeBenchmarkCase.Job.Environment.Gc, buildPartition.Resolver)}
<ItemGroup>
<Compile Include="{Path.GetFileName(artifactsPaths.ProgramCodePath)}" Exclude="bin\**;obj\**;**\*.xproj;packages\**" />
Expand Down
7 changes: 7 additions & 0 deletions tests/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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

Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,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 @@ -1110,7 +1110,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
Loading