Skip to content

Commit

Permalink
Fix build warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Romfos committed Nov 19, 2023
1 parent 15c48a8 commit b4303fe
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ trim_trailing_whitespace = true
indent_size = 4
indent_style = space

[*.{sln,csproj,yml}]
[*.{sln,csproj,fsproj,yml}]
indent_size = 2
indent_style = space

Expand Down
19 changes: 9 additions & 10 deletions NSubstitute.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26730.16
# Visual Studio Version 17
VisualStudioVersion = 17.8.34309.116
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NSubstitute", "src\NSubstitute\NSubstitute.csproj", "{F59BF5FC-52D8-492E-BDE8-244C183B4C92}"
EndProject
Expand All @@ -10,13 +9,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{0E2B9095-7548-462F-9BCC-CD6765B3ED60}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{A8AF7D01-6CE4-47B2-9E23-689A53991C3D}"
ProjectSection(SolutionItems) = preProject
build\build.fsx = build\build.fsx
build\build.sh = build\build.sh
build\ExtractDocs.fsx = build\ExtractDocs.fsx
build\packages.config = build\packages.config
build\build.cmd = build\build.cmd
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{CA2DD4AA-8DCD-42FB-8081-243281AD2956}"
ProjectSection(SolutionItems) = preProject
Expand All @@ -31,6 +23,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NSubstitute.Acceptance.Spec
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NSubstitute.Benchmarks", "tests\NSubstitute.Benchmarks\NSubstitute.Benchmarks.csproj", "{D2D162D4-EF1D-4B40-8736-9228C2FEA16C}"
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "build", "build\build.fsproj", "{E9A24A49-9E13-47CA-8886-044BB55FA05C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -49,6 +43,10 @@ Global
{D2D162D4-EF1D-4B40-8736-9228C2FEA16C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2D162D4-EF1D-4B40-8736-9228C2FEA16C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2D162D4-EF1D-4B40-8736-9228C2FEA16C}.Release|Any CPU.Build.0 = Release|Any CPU
{E9A24A49-9E13-47CA-8886-044BB55FA05C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E9A24A49-9E13-47CA-8886-044BB55FA05C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E9A24A49-9E13-47CA-8886-044BB55FA05C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E9A24A49-9E13-47CA-8886-044BB55FA05C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -57,6 +55,7 @@ Global
{F59BF5FC-52D8-492E-BDE8-244C183B4C92} = {CFB6BF4B-381D-4884-A8E8-D1FA71315BDE}
{8C2300AA-F94C-4005-A359-257C5EAD338E} = {0E2B9095-7548-462F-9BCC-CD6765B3ED60}
{D2D162D4-EF1D-4B40-8736-9228C2FEA16C} = {0E2B9095-7548-462F-9BCC-CD6765B3ED60}
{E9A24A49-9E13-47CA-8886-044BB55FA05C} = {A8AF7D01-6CE4-47B2-9E23-689A53991C3D}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {230E97F1-5246-4D49-8ED9-065F2B154E93}
Expand Down
7 changes: 5 additions & 2 deletions build/build.fsproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<OutputType>Exe</OutputType>
<OutputPath>buildOutput</OutputPath>
</PropertyGroup>

<ItemGroup>
<None Include="build.cmd" />
<None Include="build.sh" />
<Compile Include="ExtractDocs.fs" />
<Compile Include="build.fs" />
</ItemGroup>
Expand All @@ -16,9 +18,10 @@
<PackageReference Include="Microsoft.Build.Framework" Version="17.3.2" />
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="17.3.2" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="17.3.2" />
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.844" />
<PackageReference Include="MSBuild.StructuredLogger" Version="2.1.815" />
<PackageReference Include="Fake.DotNet.Cli" Version="6.0.0" />
<PackageReference Include="Fake.Tools.Git" Version="6.0.0" />
<PackageReference Include="Fake.Core.Target" Version="6.0.0" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion tests/NSubstitute.Benchmarks/ActivationBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace NSubstitute.Benchmarks
{
[ClrJob, CoreJob]
[SimpleJob]
[MemoryDiagnoser]
public class ActivationBenchmark
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace NSubstitute.Benchmarks
{
[ClrJob, CoreJob]
[SimpleJob]
[MemoryDiagnoser]
public class ArgumentSpecificationUsageBenchmark
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace NSubstitute.Benchmarks
{
[ClrJob, CoreJob]
[SimpleJob]
[MemoryDiagnoser]
public class DispatchConfiguredMatchingCallBenchmark
{
Expand All @@ -17,26 +17,26 @@ public DispatchConfiguredMatchingCallBenchmark()
{
_interfaceProxy = Substitute.For<IInterfaceWithSingleMethod>();
_interfaceProxy.IntMethod("42").Returns(42);
_interfaceProxy.When(x => x.VoidMethod("42")).Do(delegate { });
_interfaceProxy.When(x => x.VoidMethod("42")).Do(delegate { });

_abstractClassProxy = Substitute.For<AbstractClassWithSingleMethod>();
_abstractClassProxy.IntMethod("42").Returns(42);
_abstractClassProxy.When(x => x.VoidMethod("42")).Do(delegate { });
_abstractClassProxy.When(x => x.VoidMethod("42")).Do(delegate { });

_classPartialProxy = Substitute.For<ClassWithSingleMethod>();
_classPartialProxy.IntMethod("42").Returns(42);
_classPartialProxy.When(x => x.VoidMethod("42")).Do(delegate { });
_classPartialProxy.When(x => x.VoidMethod("42")).Do(delegate { });

_intDelegateProxy = Substitute.For<IntDelegate>();
_intDelegateProxy.Invoke("42").Returns(42);

_voidDelegateProxy = Substitute.For<VoidDelegate>();
_voidDelegateProxy.When(x => x.Invoke("42")).Do(delegate { });
_voidDelegateProxy.When(x => x.Invoke("42")).Do(delegate { });
}

[Benchmark]
public int DispatchInterfaceProxyCall_Int() => _interfaceProxy.IntMethod("42");

[Benchmark]
public int DispatchAbstractClassProxyCall_Int() => _abstractClassProxy.IntMethod("42");

Expand All @@ -48,7 +48,7 @@ public DispatchConfiguredMatchingCallBenchmark()

[Benchmark]
public void DispatchInterfaceProxyCall_Void() => _interfaceProxy.VoidMethod("42");

[Benchmark]
public void DispatchAbstractClassProxyCall_Void() => _abstractClassProxy.VoidMethod("42");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace NSubstitute.Benchmarks
{
[ClrJob, CoreJob]
[SimpleJob]
[MemoryDiagnoser]
public class DispatchConfiguredNonMatchingCallBenchmark
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace NSubstitute.Benchmarks
{
[ClrJob, CoreJob]
[SimpleJob]
[MemoryDiagnoser]
public class DispatchNonConfiguredCallBenchmark
{
Expand All @@ -24,7 +24,7 @@ public DispatchNonConfiguredCallBenchmark()

[Benchmark]
public int DispatchInterfaceProxyCall_Int() => _interfaceProxy.IntMethod(null);

[Benchmark]
public int DispatchAbstractClassProxyCall_Int() => _abstractClassProxy.IntMethod(null);

Expand All @@ -36,7 +36,7 @@ public DispatchNonConfiguredCallBenchmark()

[Benchmark]
public void DispatchInterfaceProxyCall_Void() => _interfaceProxy.VoidMethod(null);

[Benchmark]
public void DispatchAbstractClassProxyCall_Void() => _abstractClassProxy.VoidMethod(null);

Expand Down
12 changes: 5 additions & 7 deletions tests/NSubstitute.Benchmarks/NSubstitute.Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0</TargetFrameworks>
<StartupObject>NSubstitute.Benchmarks.Program</StartupObject>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<Compile Remove="BenchmarkDotNet.Artifacts\**" />
<EmbeddedResource Remove="BenchmarkDotNet.Artifacts\**" />
<None Remove="BenchmarkDotNet.Artifacts\**" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.4" />
<ProjectReference Include="..\..\src\NSubstitute\NSubstitute.csproj" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion tests/NSubstitute.Benchmarks/ToStringCallBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace NSubstitute.Benchmarks
{
[ClrJob, CoreJob]
[SimpleJob]
[MemoryDiagnoser]
public class ToStringCallBenchmark
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace NSubstitute.Benchmarks
{
[ClrJob, CoreJob]
[SimpleJob]
[MemoryDiagnoser]
public class VerifyReceivedCallBenchmark
{
Expand Down

0 comments on commit b4303fe

Please sign in to comment.