Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit 9dd0474

Browse files
committed
Fix one of the test projects
1 parent 3a55695 commit 9dd0474

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

src/version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<MicrosoftDiagnosticsTracingLibraryVersion>2.0.19</MicrosoftDiagnosticsTracingLibraryVersion>
3+
<MicrosoftDiagnosticsTracingLibraryVersion>2.0.5</MicrosoftDiagnosticsTracingLibraryVersion>
44
<XunitPackageVersion>2.4.0</XunitPackageVersion>
55
</PropertyGroup>
66
</Project>

tests/scenariobenchmark/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
using System.Diagnostics;
88
using System.Runtime.InteropServices;
99

10-
namespace simpleharness
10+
namespace scenariobenchmark
1111
{
1212
public class Program
1313
{

tests/standalonesample/Program.cs

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77

88
public class Program
99
{
10+
#pragma warning disable xUnit1013 // Public method should be marked as test
1011
public static void Main(string[] args)
12+
#pragma warning restore xUnit1013 // Public method should be marked as test
1113
{
1214
using (XunitPerformanceHarness p = new XunitPerformanceHarness(args))
1315
{
@@ -16,44 +18,44 @@ public static void Main(string[] args)
1618
}
1719
}
1820

19-
[Benchmark(InnerIterationCount=10000)]
21+
[Benchmark(InnerIterationCount = 10000)]
2022
public void TestBenchmark()
2123
{
22-
foreach(BenchmarkIteration iter in Benchmark.Iterations)
24+
foreach (BenchmarkIteration iter in Benchmark.Iterations)
2325
{
24-
using(iter.StartMeasurement())
26+
using (iter.StartMeasurement())
2527
{
26-
for(int i=0; i<Benchmark.InnerIterationCount; i++)
28+
for (int i = 0; i < Benchmark.InnerIterationCount; i++)
2729
{
2830
string.Format("{0}{1}{2}{3}", "a", "b", "c", "d");
2931
}
3032
}
3133
}
3234
}
3335

34-
[Benchmark(InnerIterationCount=10000)]
36+
[Benchmark(InnerIterationCount = 10000)]
3537
public void TestBenchmark1()
3638
{
37-
foreach(BenchmarkIteration iter in Benchmark.Iterations)
39+
foreach (BenchmarkIteration iter in Benchmark.Iterations)
3840
{
39-
using(iter.StartMeasurement())
41+
using (iter.StartMeasurement())
4042
{
41-
for(int i=0; i<Benchmark.InnerIterationCount; i++)
43+
for (int i = 0; i < Benchmark.InnerIterationCount; i++)
4244
{
4345
string.Format("{0}{1}{2}{3}", "a", "b", "c", "d");
4446
}
4547
}
4648
}
4749
}
4850

49-
[Benchmark(InnerIterationCount=10000)]
51+
[Benchmark(InnerIterationCount = 10000)]
5052
public void TestBenchmark2()
5153
{
52-
foreach(BenchmarkIteration iter in Benchmark.Iterations)
54+
foreach (BenchmarkIteration iter in Benchmark.Iterations)
5355
{
54-
using(iter.StartMeasurement())
56+
using (iter.StartMeasurement())
5557
{
56-
for(int i=0; i<Benchmark.InnerIterationCount; i++)
58+
for (int i = 0; i < Benchmark.InnerIterationCount; i++)
5759
{
5860
string.Format("{0}{1}{2}{3}", "a", "b", "c", "d");
5961
}

tests/standalonesample/standalonesample.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,11 @@
1010
<TargetFrameworks Condition="'$(OS)' != 'Windows_NT'">netcoreapp2.0</TargetFrameworks>
1111
</PropertyGroup>
1212

13+
<ItemGroup>
14+
<ProjectReference Include="..\..\src\xunit.performance.api\xunit.performance.api.csproj" />
15+
<ProjectReference Include="..\..\src\xunit.performance.core\xunit.performance.core.csproj" />
16+
<ProjectReference Include="..\..\src\xunit.performance.execution\xunit.performance.execution.csproj" />
17+
<ProjectReference Include="..\..\src\xunit.performance.metrics\xunit.performance.metrics.csproj" />
18+
</ItemGroup>
19+
1320
</Project>

0 commit comments

Comments
 (0)