コード例 #1
0
 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()));
         }
 }
コード例 #2
0
ファイル: LlpgGeneralTestsBase.cs プロジェクト: Shaykh/Loyc
		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()));
			}
		}
コード例 #3
0
ファイル: LlpgGeneralTestsBase.cs プロジェクト: dadhi/ecsharp
 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()));
         }
 }