Skip to content

Commit 31f00c8

Browse files
committed
Cleanup and beta2 preparations
1 parent 4a31cf2 commit 31f00c8

25 files changed

+39
-67
lines changed

Experimental/tests-performance/CodeJam.Experimental-Tests.Performance.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
<HintPath>..\..\packages\BenchmarkDotNet.0.9.5\lib\net46\BenchmarkDotNet.dll</HintPath>
3636
<Private>True</Private>
3737
</Reference>
38-
<Reference Include="JetBrains.Annotations, Version=10.1.4.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
39-
<HintPath>..\..\packages\JetBrains.Annotations.10.1.4\lib\net20\JetBrains.Annotations.dll</HintPath>
40-
<Private>True</Private>
41-
</Reference>
4238
<Reference Include="Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
4339
<Reference Include="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
4440
<Reference Include="Microsoft.Build.Utilities.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
@@ -53,6 +49,9 @@
5349
<Reference Include="System.Xml" />
5450
</ItemGroup>
5551
<ItemGroup>
52+
<Compile Include="..\..\Jetbrains.Annotations.cs">
53+
<Link>Jetbrains.Annotations.cs</Link>
54+
</Compile>
5655
<Compile Include="Properties\AssemblyInfo.cs" />
5756
<Compile Include="RangesV2\RangeBoundaryBaseCase.cs" />
5857
<Compile Include="RangesV2\RangeBoundaryFactoryPerfTests.cs" />
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="BenchmarkDotNet" version="0.9.5" targetFramework="net461" />
4-
<package id="JetBrains.Annotations" version="10.1.4" targetFramework="net461" />
54
<package id="NUnit" version="3.2.1" targetFramework="net461" />
6-
<package id="System.Runtime" version="4.0.20" targetFramework="net461" requireReinstallation="true" />
75
</packages>

Experimental/tests/CodeJam.Experimental-Tests.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@
3131
<WarningLevel>4</WarningLevel>
3232
</PropertyGroup>
3333
<ItemGroup>
34-
<Reference Include="JetBrains.Annotations, Version=10.1.4.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
35-
<HintPath>..\..\packages\JetBrains.Annotations.10.1.4\lib\net20\JetBrains.Annotations.dll</HintPath>
36-
<Private>True</Private>
37-
</Reference>
3834
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
3935
<HintPath>..\..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
4036
<Private>True</Private>

Experimental/tests/packages.config

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="JetBrains.Annotations" version="10.1.4" targetFramework="net452" />
43
<package id="NUnit" version="3.2.1" targetFramework="net452" />
5-
<package id="System.Runtime" version="4.0.0" targetFramework="net452" />
64
</packages>

Main/src/Collections/ComparerBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static Func<T,int> GetGetHashCodeFunc()
6464
=> GetGetHashCodeFunc(TypeAccessor.GetAccessor<T>().Members);
6565

6666
// ReSharper disable once StaticMemberInGenericType
67-
static readonly int _randomSeed = Objects.Random.Next();
67+
private static readonly int _randomSeed = Objects.Random.Next();
6868

6969
/// <summary>
7070
/// Returns GetHashCode function for provided members for type T to compare.
@@ -102,7 +102,7 @@ public static Func<T,int> GetGetHashCodeFunc(IEnumerable<MemberAccessor> members
102102
return l.Compile();
103103
}
104104

105-
class Comparer : EqualityComparer<T>
105+
private class Comparer : EqualityComparer<T>
106106
{
107107
public Comparer(Func<T,T,bool> equals, Func<T,int> getHashCode)
108108
{
@@ -120,7 +120,7 @@ public override int GetHashCode(T obj)
120120
=> obj == null ? 0 : _getHashCode(obj);
121121
}
122122

123-
static Comparer _equalityComparer;
123+
private static Comparer _equalityComparer;
124124

125125
/// <summary>
126126
/// Returns implementations of the <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> generic interface

Main/src/Objects.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace CodeJam
55
internal static class Objects
66
{
77
[ThreadStatic]
8-
static Random _random;
8+
private static Random _random;
99

1010
public static Random Random
1111
=> _random ?? (_random = new Random(unchecked((int)DateTime.Now.Ticks)));

Main/tests-performance/CalibrationBenchmarks/JitOptimizedSwitchPerfTests.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class JitOptimizedSwitchPerfTests
4040
[CompetitionBaseline]
4141
public int Test0000Baseline()
4242
{
43-
int a = 0;
43+
var a = 0;
4444
for (var i = 0; i < Count; i++)
4545
{
4646
a = DefaultAction(a);
@@ -53,7 +53,7 @@ public int Test0000Baseline()
5353
[SuppressMessage("ReSharper", "ConditionIsAlwaysTrueOrFalse")]
5454
public int Test0101ConstDisabledFeature()
5555
{
56-
int a = 0;
56+
var a = 0;
5757
for (var i = 0; i < Count; i++)
5858
{
5959
#pragma warning disable 162
@@ -70,7 +70,7 @@ public int Test0101ConstDisabledFeature()
7070
[SuppressMessage("ReSharper", "ConditionIsAlwaysTrueOrFalse")]
7171
public int Test0102IfConstDisabledFeature()
7272
{
73-
int a = 0;
73+
var a = 0;
7474
for (var i = 0; i < Count; i++)
7575
{
7676
#pragma warning disable 162
@@ -86,7 +86,7 @@ public int Test0102IfConstDisabledFeature()
8686
[CompetitionBenchmark(0.97, 1.04)]
8787
public int Test0201DisabledFeature()
8888
{
89-
int a = 0;
89+
var a = 0;
9090
for (var i = 0; i < Count; i++)
9191
{
9292
if (_featureDisabled && FeatureCheck(a))
@@ -99,7 +99,7 @@ public int Test0201DisabledFeature()
9999
[CompetitionBenchmark(0.97, 1.04)]
100100
public int Test0202IfDisabledFeature()
101101
{
102-
int a = 0;
102+
var a = 0;
103103
for (var i = 0; i < Count; i++)
104104
{
105105
if (_featureDisabled)
@@ -113,7 +113,7 @@ public int Test0202IfDisabledFeature()
113113
[CompetitionBenchmark(0.98, 1.05)]
114114
public int Test0203NotEnabledFeature()
115115
{
116-
int a = 0;
116+
var a = 0;
117117
for (var i = 0; i < Count; i++)
118118
{
119119
if (!_featureEnabled && FeatureCheck(a))
@@ -126,7 +126,7 @@ public int Test0203NotEnabledFeature()
126126
[CompetitionBenchmark(1.85, 1.98)]
127127
public int Test0301MutableFeature()
128128
{
129-
int a = 0;
129+
var a = 0;
130130
for (var i = 0; i < Count; i++)
131131
{
132132
if (_featureMutable && FeatureCheck(a))
@@ -139,7 +139,7 @@ public int Test0301MutableFeature()
139139
[CompetitionBenchmark(1.86, 1.98)]
140140
public int Test0301IfMutableFeature()
141141
{
142-
int a = 0;
142+
var a = 0;
143143
for (var i = 0; i < Count; i++)
144144
{
145145
if (_featureMutable)
@@ -153,7 +153,7 @@ public int Test0301IfMutableFeature()
153153
[CompetitionBenchmark(14.93, 15.87)]
154154
public int Test0301EnabledFeature()
155155
{
156-
int a = 0;
156+
var a = 0;
157157
for (var i = 0; i < Count; i++)
158158
{
159159
if (_featureEnabled && FeatureCheck(a))
@@ -166,7 +166,7 @@ public int Test0301EnabledFeature()
166166
[CompetitionBenchmark(14.94, 15.88)]
167167
public int Test0302IfEnabledFeature()
168168
{
169-
int a = 0;
169+
var a = 0;
170170
for (var i = 0; i < Count; i++)
171171
{
172172
if (_featureEnabled)

Main/tests-performance/CodeJam.Main-Tests.Performance.csproj

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
<HintPath>..\..\packages\BenchmarkDotNet.0.9.5\lib\net46\BenchmarkDotNet.dll</HintPath>
3636
<Private>True</Private>
3737
</Reference>
38-
<Reference Include="JetBrains.Annotations, Version=10.1.4.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
39-
<HintPath>..\..\packages\JetBrains.Annotations.10.1.4\lib\net20\JetBrains.Annotations.dll</HintPath>
40-
<Private>True</Private>
41-
</Reference>
4238
<Reference Include="Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
4339
<Reference Include="Microsoft.Build.Framework, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
4440
<Reference Include="Microsoft.Build.Utilities.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
@@ -58,6 +54,9 @@
5854
<Reference Include="System.Xml.Linq" />
5955
</ItemGroup>
6056
<ItemGroup>
57+
<Compile Include="..\..\Jetbrains.Annotations.cs">
58+
<Link>Jetbrains.Annotations.cs</Link>
59+
</Compile>
6160
<Compile Include="Algorithms\LowerBoundPerfTests.cs" />
6261
<Compile Include="Arithmetic\OperatorsLessOrGreaterPerfTests.generated.cs">
6362
<DependentUpon>OperatorsLessOrGreaterPerfTests.tt</DependentUpon>
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="BenchmarkDotNet" version="0.9.5" targetFramework="net461" />
4-
<package id="JetBrains.Annotations" version="10.1.4" targetFramework="net452" />
54
<package id="Microsoft.DiaSymReader" version="1.0.7" targetFramework="net452" />
65
<package id="NUnit" version="3.2.1" targetFramework="net452" />
7-
<package id="System.Runtime" version="4.0.20" targetFramework="net461" requireReinstallation="true" />
86
</packages>

Main/tests/CodeJam.Main-Tests.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
3434
</PropertyGroup>
3535
<ItemGroup>
36-
<Reference Include="JetBrains.Annotations, Version=10.1.4.0, Culture=neutral, PublicKeyToken=1010a0d8d6380325, processorArchitecture=MSIL">
37-
<HintPath>..\..\packages\JetBrains.Annotations.10.1.4\lib\net20\JetBrains.Annotations.dll</HintPath>
38-
<Private>True</Private>
39-
</Reference>
4036
<Reference Include="nunit.framework, Version=3.2.1.0, Culture=neutral, PublicKeyToken=2638cd05610744eb, processorArchitecture=MSIL">
4137
<HintPath>..\..\packages\NUnit.3.2.1\lib\net45\nunit.framework.dll</HintPath>
4238
<Private>True</Private>
@@ -45,6 +41,9 @@
4541
<Reference Include="System.Core" />
4642
</ItemGroup>
4743
<ItemGroup>
44+
<Compile Include="..\..\Jetbrains.Annotations.cs">
45+
<Link>Jetbrains.Annotations.cs</Link>
46+
</Compile>
4847
<Compile Include="Algorithms\PartitionPointTest.cs" />
4948
<Compile Include="Algorithms\LowerBoundTest.cs" />
5049
<Compile Include="Algorithms\SwapTest.cs" />
@@ -79,7 +78,7 @@
7978
<Compile Include="Expressions\ExpressionExtensionsTests.cs" />
8079
<Compile Include="IO\TempDataTests.cs" />
8180
<Compile Include="DisposableTests.cs" />
82-
<Compile Include="QueryableExtensionsTests.cs" />
81+
<Compile Include="Collections\QueryableExtensionsTests.cs" />
8382
<Compile Include="Reflection\AssemblyExtensionsTest.cs" />
8483
<Compile Include="Reflection\CreateInstanceTests.cs" />
8584
<Compile Include="Expressions\ExprTests.cs" />

0 commit comments

Comments
 (0)