Ejemplo n.º 1
0
 public static void TestExpressionParserWithError(string compiland, GlobalSymbolList symbols, string expectedError)
 {
     using (TestCompilerContext context = TestCompilerContext.Create(compiland, symbols, CompilationFlags.NoDebug))
     {
         context.ParseExpression();
         Assert.IsTrue(context.ErrorCount > 0, "Expecting compiler error");
         Assert.AreEqual(expectedError, context.FirstError);
     }
 }
Ejemplo n.º 2
0
 public static string TestExpressionParser(string compiland, GlobalSymbolList symbols = null)
 {
     using (TestCompilerContext context = TestCompilerContext.Create(compiland, symbols, CompilationFlags.NoDebug))
     {
         context.ParseExpression();
         Assert.AreEqual(0, context.ErrorCount, context.FirstError.ToString());
         return(context.GetCompilerOutput());
     }
 }