Browse files

Enabled async tests.

  • Loading branch information...
1 parent e4c70d4 commit 7b542f4eb2786e7253ea5d1931dddd99263a8a49 @mkrueger mkrueger committed Sep 30, 2011
View
2 ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/AnonymousMethodExpressionTests.cs
@@ -69,7 +69,7 @@ public void SimpleAnonymousMethod()
Assert.IsTrue(ame.Body.Statements.First() is ReturnStatement);
}
- [Test, Ignore("async/await not yet supported")]
+ [Test]
public void AsyncAnonymousMethod()
{
AnonymousMethodExpression ame = Parse("async delegate {}");
View
4 ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/LambdaExpressionTests.cs
@@ -120,7 +120,7 @@ public void LambdaExpressionContainingConditionalExpression()
}});
}
- [Test, Ignore("async/await not yet supported")]
+ [Test]
public void AsyncLambdaExpression()
{
ParseUtilCSharp.AssertExpression(
@@ -132,7 +132,7 @@ public void AsyncLambdaExpression()
});
}
- [Test, Ignore("async/await not yet supported")]
+ [Test]
public void AsyncLambdaExpressionWithMultipleParameters()
{
ParseUtilCSharp.AssertExpression(
View
4 ICSharpCode.NRefactory.Tests/CSharp/Parser/Expression/UnaryOperatorExpressionTests.cs
@@ -92,7 +92,7 @@ public void AddressOf()
TestUnaryOperatorExpressionTest("&a", UnaryOperatorType.AddressOf);
}
- [Test, Ignore("async/await not yet supported")]
+ [Test]
public void Await()
{
ParseUtilCSharp.AssertExpression(
@@ -104,7 +104,7 @@ public void Await()
});
}
- [Test, Ignore("async/await not yet supported")]
+ [Test]
public void AwaitAwait()
{
ParseUtilCSharp.AssertExpression(
View
6 ICSharpCode.NRefactory.Tests/CSharp/Parser/ParseUtil.cs
@@ -35,6 +35,8 @@ public static class ParseUtilCSharp
CSharpParser parser = new CSharpParser();
CompilationUnit cu = parser.Parse(new StringReader(code));
+ if (parser.HasErrors)
+ parser.ErrorPrinter.Errors.ForEach (err => Console.WriteLine (err.Message));
Assert.AreEqual(expectErrors, parser.HasErrors, "HasErrors");
AstNode node = cu.Children.Single();
@@ -56,6 +58,8 @@ public static void AssertGlobal(string code, AstNode expectedNode)
CSharpParser parser = new CSharpParser();
var statements = parser.ParseStatements(new StringReader(stmt));
+ if (parser.HasErrors)
+ parser.ErrorPrinter.Errors.ForEach (err => Console.WriteLine (err.Message));
Assert.AreEqual(expectErrors, parser.HasErrors, "HasErrors");
AstNode statement = statements.Single();
@@ -77,6 +81,8 @@ public static void AssertStatement(string code, CSharp.Statement expectedStmt)
CSharpParser parser = new CSharpParser();
AstNode parsedExpression = parser.ParseExpression(new StringReader(expr));
+ if (parser.HasErrors)
+ parser.ErrorPrinter.Errors.ForEach (err => Console.WriteLine (err.Message));
Assert.AreEqual(expectErrors, parser.HasErrors, "HasErrors");
if (expectErrors && parsedExpression == null)
return default (T);
View
4 ICSharpCode.NRefactory.Tests/CSharp/Parser/TypeMembers/MethodDeclarationTests.cs
@@ -356,7 +356,7 @@ public void OptionalParameterTest()
}});
}
- [Test, Ignore("async/await not yet supported")]
+ [Test]
public void AsyncMethod()
{
ParseUtilCSharp.AssertTypeMember(
@@ -369,7 +369,7 @@ public void AsyncMethod()
});
}
- [Test, Ignore("async/await not yet supported")]
+ [Test, Ignore("parser bug, reported upstream.")]
public void AsyncAsyncAsync()
{
ParseUtilCSharp.AssertTypeMember(

0 comments on commit 7b542f4

Please sign in to comment.