public void Day14DockingData_Part1_Ok() { var lines = DailyDataUtilities.ReadLinesFromFile("Day14Data.txt"); Assert.Equal(580, lines.Length); var sut = new DockingDataUnit(); long lval = 0; foreach (var line in lines) { lval = sut.ProcessData(line); } lval = sut.Sum(); Assert.Equal(13865835758282, lval); }
public void Day14_Example1_Ok() { string[] lines = new string[] { "mask = XXXXXXXXXXXXXXXXXXXXXXXXXXXXX1XXXX0X", "mem[8] = 11", "mem[7] = 101", "mem[8] = 0" }; var sut = new DockingDataUnit(); long lval = 0; foreach (var line in lines) { lval = sut.ProcessData(line); } lval = sut.Sum(); Assert.Equal(165, lval); }