Add 2026 Day05 solution and tests
This commit is contained in:
1 parent
120f3ac96c
commit
f158e24247
2 files changed
+176
No files matched your search
@@ -0,0 +1,47 @@
|
||||
using AdvenOfCode.Contracts;
|
||||
|
||||
namespace AoC_2026.Tests;
|
||||
|
||||
public class Day05Test
|
||||
{
|
||||
private readonly IPuzzleSolver<long> _sut;
|
||||
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
private readonly string TestInputPath = @$"{rootPath}/AoC-PuzzleInputs/2026/Test/day05.txt";
|
||||
private readonly string ProdInputPath = @$"{rootPath}/AoC-PuzzleInputs/2026/Prod/day05.txt";
|
||||
|
||||
public Day05Test()
|
||||
{
|
||||
_sut = new Day05();
|
||||
}
|
||||
[Fact]
|
||||
public void Part01_Test_equals_4268()
|
||||
{
|
||||
var actual = _sut.SolvePart1(TestInputPath);
|
||||
|
||||
Assert.Equal(4268, actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Part01_Prod_equals_18957()
|
||||
{
|
||||
var actual = _sut.SolvePart1(ProdInputPath);
|
||||
|
||||
Assert.Equal(18957, actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Part02_Test_equals_35332647()
|
||||
{
|
||||
var actual = _sut.SolvePart2(TestInputPath);
|
||||
|
||||
Assert.Equal(35332647, actual);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Part02_Prod_equals_40767683()
|
||||
{
|
||||
var actual = _sut.SolvePart2(ProdInputPath);
|
||||
|
||||
Assert.Equal(40767683, actual);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user