Exemplo n.º 1
0
        [DataRow("32(97-8+84)((", "32(97-8+84)")] // Multiple trailing left brackets
        public void FixBrackets_StripsEndLeftBrackets(string equation, string expected)
        {
            var actual = Standardizer.FixBrackets(equation);

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
 public void FixBrackets_ExceptionOnTooManyRightBracks()
 => Standardizer.FixBrackets("(32*7)+4(3)+17)");
Exemplo n.º 3
0
        [DataRow("365(37+94(32", "365(37+94(32))")] // Multiple missing right brackets
        public void FixBrackets_AppendsRightBrackets(string equation, string expected)
        {
            var actual = Standardizer.FixBrackets(equation);

            Assert.AreEqual(expected, actual);
        }