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:
parent
3083dbce7f
commit
2e6b418fef
24 changed files with 5790 additions and 1 deletions
28
AdventOfCode/AdventOfCode.Test/Day4Test.cs
Normal file
28
AdventOfCode/AdventOfCode.Test/Day4Test.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue