[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); }
public void FixBrackets_ExceptionOnTooManyRightBracks() => Standardizer.FixBrackets("(32*7)+4(3)+17)");
[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); }