protected void Test(string input, string expected, IMessageSink sink = null, IParsingService parser = null) { using (ParsingService.PushCurrent(parser ?? LesLanguageService.Value)) using (LNode.PushPrinter(Ecs.EcsNodePrinter.PrintPlainCSharp)) { var c = new TestCompiler(sink ?? _sink, new UString(input)); c.Run(); Assert.AreEqual(StripExtraWhitespace(expected), StripExtraWhitespace(c.Output.ToString())); } }
protected void Test(string input, string expected, IMessageSink sink = null, IParsingService parser = null) { using (ParsingService.SetDefault(parser ?? Les2LanguageService.Value)) using (LNode.SetPrinter(EcsLanguageService.WithPlainCSharpPrinter)) { var c = new TestCompiler(sink ?? _sink, new UString(input), "LeMP.les2.to.ecs"); c.Run(); Assert.AreEqual(StripExtraWhitespace(expected), StripExtraWhitespace(c.Output.ToString())); } }