Skip to content

Commit b4f115e

Browse files
format
1 parent 5267924 commit b4f115e

11 files changed

Lines changed: 236 additions & 167 deletions

File tree

CommonExtendedObjectsTests/IntArrayTests.cs

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,45 +166,58 @@ public void CompareIntArrayvsIntArrayDotNetPerformance()
166166
var genericArray = new UnmanagedArray<int>(Size);
167167
stopwatch.Restart();
168168

169-
for (int i = 0; i < Size; i++)
169+
for (var i = 0; i < Size; i++)
170+
{
170171
genericArray[i] = i;
172+
}
171173

172174
long genericSum = 0;
173-
for (int i = 0; i < Size; i++)
175+
for (var i = 0; i < Size; i++)
176+
{
174177
genericSum += genericArray[i];
178+
}
175179

176180
stopwatch.Stop();
177181
var genericTime = stopwatch.ElapsedMilliseconds;
178182
genericArray.Dispose();
179183

180184
Trace.WriteLine($"UnmanagedArray<int> time: {genericTime} ms");
181185
Assert.AreEqual(expected, genericSum, "UnmanagedArray sum mismatch");
182-
183186
}
184187

185188
/// <summary>
186-
/// Indexings the should work for int array.
189+
/// Indexings the should work for int array.
187190
/// </summary>
188191
[TestMethod]
189-
public void IndexingShouldWorkForIntArray() => RunIndexingTest(new IntArray(5));
192+
public void IndexingShouldWorkForIntArray()
193+
{
194+
RunIndexingTest(new IntArray(5));
195+
}
190196

191197
/// <summary>
192-
/// Indexings the should work for unmanaged array.
198+
/// Indexings the should work for unmanaged array.
193199
/// </summary>
194200
[TestMethod]
195-
public void IndexingShouldWorkForUnmanagedArray() => RunIndexingTest(new UnmanagedArray<int>(5));
201+
public void IndexingShouldWorkForUnmanagedArray()
202+
{
203+
RunIndexingTest(new UnmanagedArray<int>(5));
204+
}
196205

197206
/// <summary>
198-
/// Runs the indexing test.
207+
/// Runs the indexing test.
199208
/// </summary>
200209
/// <param name="arr">The arr.</param>
201210
private static void RunIndexingTest(IUnmanagedArray<int> arr)
202211
{
203-
for (int i = 0; i < arr.Length; i++)
212+
for (var i = 0; i < arr.Length; i++)
213+
{
204214
arr[i] = i * 10;
215+
}
205216

206-
for (int i = 0; i < arr.Length; i++)
217+
for (var i = 0; i < arr.Length; i++)
218+
{
207219
Assert.AreEqual(i * 10, arr[i]);
220+
}
208221

209222
arr.Dispose();
210223
}
0 Bytes
Loading
0 Bytes
Loading

DataFormatter/DataFormatter.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFramework>net5.0</TargetFramework>
55
<Company>Lone Wanderer Productions</Company>
66
<Authors>Wayfarer</Authors>
77
<Copyright>Lone Wanderer Productions</Copyright>
88
</PropertyGroup>
9-
10-
<ItemGroup>
9+
10+
<ItemGroup>
1111
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
1212
<_Parameter1>CommonLibraryTests</_Parameter1>
1313
</AssemblyAttribute>
1414
</ItemGroup>
15-
16-
</Project>
15+
16+
</Project>

ExtendedSystemObjects/IUnmanagedArray.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ namespace ExtendedSystemObjects
1212
{
1313
/// <inheritdoc />
1414
/// <summary>
15-
/// Interface to make unmanaged arrays interchangeable.
15+
/// Interface to make unmanaged arrays interchangeable.
1616
/// </summary>
1717
/// <typeparam name="T">Generic Type</typeparam>
1818
/// <seealso cref="T:System.IDisposable" />

0 commit comments

Comments
 (0)