AIO commit

Sorry for the late commit, forgot to commit and push it on Saturday 7th.
Thank god there are moodle reminders
This commit is contained in:
MarcUs7i 2024-12-31 23:47:08 +01:00
parent 3083dbce7f
commit 2e6b418fef
24 changed files with 5790 additions and 1 deletions

View file

@ -0,0 +1,28 @@
namespace AdventOfCode.Test;
public sealed class Day4Test
{
[Fact]
public void Part1()
{
const string Input = "MMMSXXMASM\nMSAMXMSMSA\nAMXSXMAAMM\nMSAMASMSMX\nXMASAMXAMM\nXXAMMXXAMA\nSMSMSASXSS\nSAXAMASAAA\nMAMMMXMMMM\nMXMXAXMASX";
const int Expected = 18;
var day4 = new Day4();
var result = day4.Part1(Input);
Assert.Equal(Expected, result);
}
[Fact]
public void Part2()
{
const string Input = ".M.S......\n..A..MSMS.\n.M.S.MAA..\n..A.ASMSM.\n.M.S.M....\n..........\nS.S.S.S.S.\n.A.A.A.A..\nM.M.M.M.M.\n..........";
const int Expected = 9;
var day4 = new Day4();
var result = day4.Part2(Input);
Assert.Equal(Expected, result);
}
}