Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
e0f633e
chore: update xunit related package version to v3 with mtp v2
filzrev Mar 7, 2026
7e75da5
chore: add using Xunit.Sdk statement for XunitSerializable
filzrev Mar 7, 2026
116fb7e
chore: fix xUnit3003 analyzer errors
filzrev Mar 7, 2026
39122cd
chore: modify theorydata related incompatible codes
filzrev Mar 7, 2026
272f11c
chore: add global.json to use Microsoft.Testing.Platform by dotnet test
filzrev Mar 28, 2026
7f62a6c
chore: add tests/.editorconfig
filzrev Mar 29, 2026
6bd6700
chore: fix custom inlinedata attribute
filzrev Mar 29, 2026
12a0d5a
chore: fix wasm related tests
filzrev Mar 29, 2026
72cae34
chore: suppress MSB3277 warnings
filzrev Mar 30, 2026
6bb570e
chore: migrate multipleframeworks tests to tunit
filzrev Mar 30, 2026
b4f1d70
chore: update build project to support mtp
filzrev Mar 30, 2026
9f38556
chore: suppress auto-entrypoint generation of benchmark project templ…
filzrev Mar 30, 2026
fda5891
chore: fix run-tests-selected workflow
filzrev Apr 2, 2026
a05f583
chore: add PreferNativeArm64 setting to Directory.Build.targets
filzrev Apr 3, 2026
e08cb24
chore: add diagnostic logs and collect as artifacts
filzrev Apr 6, 2026
351c485
chore: update generate-coverage-report.yaml
filzrev Apr 6, 2026
9ff9ee8
chore: temporary skip disassemble tests for macos
filzrev Apr 6, 2026
1e82495
chore: add isinprocess condition to skip tests
filzrev Apr 9, 2026
fdf082e
chore: add consolecapture setting and parallel setting
filzrev Jun 1, 2026
6390e4b
chore: modify test to use dotnet run for simple output
filzrev Jun 2, 2026
354a7b1
chore: set default diag log level to warning and add --no-launchprofi…
filzrev Jun 3, 2026
f4830e7
chore: update parallel settings that introduced on xunit v3 4.0.0-pre…
filzrev Jul 19, 2026
7a6f85e
chore: fix build error on build project
filzrev Jul 19, 2026
ef4c208
chore: remove ConsoleLogger to avoid dupicated log lines if [assembly…
filzrev Jul 19, 2026
65d565c
chore: add launchsettings.json per test projects
filzrev Jul 19, 2026
b6c13f6
chore: fix ci error with line ending differences
filzrev Jul 19, 2026
7ef05f9
chore: add setting to skip test when no test data
filzrev Jul 19, 2026
8935246
chore: disable mtp and xunit entrypoint generation on benchmark project
filzrev Jul 19, 2026
eb938c8
chore: add testconfig.json
filzrev Jul 20, 2026
60b091d
chore: add telemetry/progress disable verification for some tests
filzrev Jul 22, 2026
3df7c99
chore: disable progress on CI execution to avoid extra memory allocat…
filzrev Jul 22, 2026
9113ebe
chore: remove unused test filter and add parameters
filzrev Jul 22, 2026
8f55da0
chore: add setting to suppress dotnet cli telemetry
filzrev Jul 23, 2026
66cbd5c
chore: add skip setting for flaky test
filzrev Jul 23, 2026
2cfd1ec
chore: temporary disable longRunningTest detection background worker
filzrev Jul 24, 2026
fb3004a
chore: modify test condition for flaky tests
filzrev Jul 24, 2026
3d1ea49
chore: remove temporary workaround setting for macos from ThreadingDi…
filzrev Jul 24, 2026
ecd7ecc
chore: remove validation logics because flaky test is reproduced on w…
filzrev Jul 25, 2026
da917fe
chore: update PerfonarTest based on latest update
filzrev Jul 28, 2026
8103677
chore: pass cancellationtoken to benchmark executor
filzrev Aug 1, 2026
10521e4
chore: skip apphost verification on `browser-wasi` runtime also
filzrev Aug 1, 2026
cdb7856
chore: add default cli options on testconfig.json
filzrev Aug 14, 2026
673fcb0
chore: update test related package deps
filzrev Aug 15, 2026
46b9173
chore: add System.Configuration reference for .NET Framework
filzrev Sep 2, 2026
817d57f
chore: skip flaky memorydiagnoser tests on win-arm64-netfx
filzrev Sep 15, 2026
a5f88c7
chore: restore overwritten wasm template file on rebase
filzrev Sep 15, 2026
e0306a9
chore: cleanup memorydiagnoser tests skip conditions
filzrev Sep 16, 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 @@ -29,6 +29,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
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 @@ -633,7 +633,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 @@ -1188,7 +1188,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
@@ -1,4 +1,4 @@
using BenchmarkDotNet.Analyzers;
using BenchmarkDotNet.Analyzers;
using BenchmarkDotNet.Analyzers.Attributes;
using BenchmarkDotNet.Analyzers.Tests.Fixtures;
using Microsoft.CodeAnalysis;
Expand Down Expand Up @@ -191,7 +191,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 @@ -353,7 +353,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 @@ -512,21 +512,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 @@ -681,18 +679,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 as string)!)];

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 @@ -846,7 +842,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 @@ -984,7 +980,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 @@ -1149,20 +1145,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; }}")
=> new NonPublicPropertySetterAccessModifiersTheoryData().Select(x => x.Data)
.Select(m => $"{{ get; {m} set; }}")
.Concat(["{ get; }", "=> 0;"]);

public static TheoryData<string> NonPublicPropertySettersTheoryData()
Expand Down Expand Up @@ -1904,7 +1900,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
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ public class BenchmarkClass
}

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

public static IEnumerable<string> InvalidTypes =>
[
Expand Down Expand Up @@ -149,9 +147,7 @@ public class BenchmarkClass
}

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

public static IEnumerable<string> NonEnumStructs =>
[
Expand Down Expand Up @@ -249,9 +245,7 @@ public class BenchmarkClass
}

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

public static IEnumerable<string> NonEnumOrBoolStructs =>
[
Expand Down
Loading
Loading