Ejemplo n.º 1
0
 public void GoldWorks()
 {
     Assert.Equal(231L, Day18.EvaluateAdvanced("1 + 2 * 3 + 4 * 5 + 6"));
     Assert.Equal(51L, Day18.EvaluateAdvanced("1 + (2 * 3) + (4 * (5 + 6))"));
     Assert.Equal(46L, Day18.EvaluateAdvanced("2 * 3 + (4 * 5)"));
     Assert.Equal(1445L, Day18.EvaluateAdvanced("5 + (8 * 3 + 9 + 3 * 4 * 3)"));
     Assert.Equal(669060L, Day18.EvaluateAdvanced("5 * 9 * (7 * 3 * 3 + 9 * 3 + (8 + 6 * 4))"));
     Assert.Equal(23340L, Day18.EvaluateAdvanced("((2 + 4 * 9) * (6 + 9 * 8 + 6) + 6) + 2 + 4 * 2"));
 }