3rdparty/NRefactory/ICSharpCode.NRefactory.Tests/CSharp/Parser/Bugs/ParserBugTests.cs
/// <summary>
/// Bug 3155 - Anonymous methods in variable declarations don't produce an ast, if the ';' is missing.
/// </summary>
Bug 3155 - Anonymous methods in variable declarations don't produce an ast, if the ';' is missing.
Bug 3155 - Anonymous methods in variable declarations don ' t produce an ast if the ' ; ' is missing .
[Test]
		public void TestBug3155()
		{
			string code = 
@"using System;
class Test
{
    void Foo ()
    {
        Action<int> act = delegate (int testMe) {
        }
    }
}
";
			var unit = SyntaxTree.Parse(code);
			bool passed = unit.ToString().Trim() == @"using System;
class Test
{
	void Foo ()
	{
		Action<int> act = delegate (int testMe) {
		};
	}
}";
			if (!passed) {
				Console.WriteLine("Expected:" + code);
				Console.WriteLine("Was:" + unit);
			}
			Assert.IsTrue(passed);
		}
[ Test ] public void TestBug3155 ( ) { string code = @"using System;

class Test
{
    void Foo ()
    {
        Action<int> act = delegate (int testMe) {

        }
    }
}
" ; var unit = SyntaxTree . Parse ( code ) ; bool passed = unit . ToString ( ) . Trim ( ) == @"using System;

class Test
{
	void Foo ()
	{
		Action<int> act = delegate (int testMe) {
		};
	}
}" ; if ( ! passed ) { Console . WriteLine ( " " + code ) ; Console . WriteLine ( " " + unit ) ; } Assert . IsTrue ( passed ) ; }
Bug 3155 - Anonymous methods in variable declarations don't produce an ast, if the ';' is missing.
Bug 3155 - Anonymous methods in variable declarations don ' t produce an ast if the ' ; ' is missing .