Code formatting and warning fixing.
This commit is contained in:
@@ -1,24 +1,24 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>AdventOfCode2017.Tests</RootNamespace>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<RootNamespace>AdventOfCode2017.Tests</RootNamespace>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
|
||||
<PackageReference Include="xunit" Version="2.6.3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AdventOfCode2017\AdventOfCode2017.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0"/>
|
||||
<PackageReference Include="xunit" Version="2.6.3"/>
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\AdventOfCode2017\AdventOfCode2017.csproj"/>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -9,7 +9,7 @@ public class Day01_Tests
|
||||
{
|
||||
Day01 day01 = new();
|
||||
|
||||
string result = day01.ResolvePart1(new[] { "1122", });
|
||||
string result = day01.ResolvePart1(["1122"]);
|
||||
|
||||
Assert.Equal("3", result);
|
||||
}
|
||||
@@ -19,7 +19,7 @@ public class Day01_Tests
|
||||
{
|
||||
Day01 day01 = new();
|
||||
|
||||
string result = day01.ResolvePart1(new[] { "1111", });
|
||||
string result = day01.ResolvePart1(["1111"]);
|
||||
|
||||
Assert.Equal("4", result);
|
||||
}
|
||||
@@ -29,7 +29,7 @@ public class Day01_Tests
|
||||
{
|
||||
Day01 day01 = new();
|
||||
|
||||
string result = day01.ResolvePart1(new[] { "1234", });
|
||||
string result = day01.ResolvePart1(["1234"]);
|
||||
|
||||
Assert.Equal("0", result);
|
||||
}
|
||||
@@ -39,7 +39,7 @@ public class Day01_Tests
|
||||
{
|
||||
Day01 day01 = new();
|
||||
|
||||
string result = day01.ResolvePart1(new[] { "91212129", });
|
||||
string result = day01.ResolvePart1(["91212129"]);
|
||||
|
||||
Assert.Equal("9", result);
|
||||
}
|
||||
@@ -47,13 +47,13 @@ public class Day01_Tests
|
||||
#endregion ResolvePart1
|
||||
|
||||
#region ResolvePart2
|
||||
|
||||
|
||||
[Fact]
|
||||
public void ResolvePart2__Test1()
|
||||
{
|
||||
Day01 day01 = new();
|
||||
|
||||
string result = day01.ResolvePart2(new[] { "1212", });
|
||||
string result = day01.ResolvePart2(["1212"]);
|
||||
|
||||
Assert.Equal("6", result);
|
||||
}
|
||||
@@ -63,7 +63,7 @@ public class Day01_Tests
|
||||
{
|
||||
Day01 day01 = new();
|
||||
|
||||
string result = day01.ResolvePart2(new[] { "1221", });
|
||||
string result = day01.ResolvePart2(["1221"]);
|
||||
|
||||
Assert.Equal("0", result);
|
||||
}
|
||||
@@ -73,7 +73,7 @@ public class Day01_Tests
|
||||
{
|
||||
Day01 day01 = new();
|
||||
|
||||
string result = day01.ResolvePart2(new[] { "123425", });
|
||||
string result = day01.ResolvePart2(["123425"]);
|
||||
|
||||
Assert.Equal("4", result);
|
||||
}
|
||||
@@ -83,7 +83,7 @@ public class Day01_Tests
|
||||
{
|
||||
Day01 day01 = new();
|
||||
|
||||
string result = day01.ResolvePart2(new[] { "123123", });
|
||||
string result = day01.ResolvePart2(["123123"]);
|
||||
|
||||
Assert.Equal("12", result);
|
||||
}
|
||||
@@ -93,7 +93,7 @@ public class Day01_Tests
|
||||
{
|
||||
Day01 day01 = new();
|
||||
|
||||
string result = day01.ResolvePart2(new[] { "12131415", });
|
||||
string result = day01.ResolvePart2(["12131415"]);
|
||||
|
||||
Assert.Equal("4", result);
|
||||
}
|
||||
|
||||
@@ -7,11 +7,11 @@ public class Day02_Tests
|
||||
{
|
||||
Day02 day02 = new();
|
||||
|
||||
string result = day02.ResolvePart1(new[] {
|
||||
string result = day02.ResolvePart1([
|
||||
"5 1 9 5",
|
||||
"7 5 3",
|
||||
"2 4 6 8",
|
||||
});
|
||||
]);
|
||||
|
||||
Assert.Equal("18", result);
|
||||
}
|
||||
@@ -21,11 +21,11 @@ public class Day02_Tests
|
||||
{
|
||||
Day02 day02 = new();
|
||||
|
||||
string result = day02.ResolvePart2(new[] {
|
||||
string result = day02.ResolvePart2([
|
||||
"5 9 2 8",
|
||||
"9 4 7 3",
|
||||
"3 8 6 5",
|
||||
});
|
||||
]);
|
||||
|
||||
Assert.Equal("9", result);
|
||||
}
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="MSTest.TestAdapter" version="1.3.2" targetFramework="net461" />
|
||||
<package id="MSTest.TestFramework" version="1.3.2" targetFramework="net461" />
|
||||
</packages>
|
||||
Reference in New Issue
Block a user