public static bool Test(string expresion, string[] variables) { try { CalculadoraRPN calc = new CalculadoraRPN(); Random ran = new Random(); for (int i = 0; i < variables.Length; i++) { calc.DefinirVariable(variables[i], ran.Next()); } calc.EvaluarExpresion(expresion).ToString(); return true; } catch { return false; } }
public static bool Test() { string expresion = "G x * raizcuarta sin"; try { CalculadoraRPN calc = new CalculadoraRPN(); calc.EvaluarExpresion(expresion).ToString(); return true; } catch { return false; } }