Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cston committed Sep 20, 2021
1 parent 90cc297 commit 313c99e
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4902,8 +4902,8 @@ static void Main()
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "int").WithArguments("lambda return type", "10.0").WithLocation(10, 12));

var expectedOutput =
@"System.Func`1[System.Int32]
System.Linq.Expressions.Expression`1[System.Func`1[System.Int32]]
$@"System.Func`1[System.Int32]
{s_expressionOfTDelegateTypeName}[System.Func`1[System.Int32]]
";
CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput);
CompileAndVerify(source, expectedOutput: expectedOutput);
Expand Down Expand Up @@ -4936,9 +4936,12 @@ static void Main()
// F2(int (i) => i);
Diagnostic(ErrorCode.ERR_FeatureNotAvailableInVersion9, "int").WithArguments("lambda return type", "10.0").WithLocation(10, 12));

var expressionType = ExecutionConditionUtil.IsDesktop ?
"System.Linq.Expressions.Expression`1" :
"System.Linq.Expressions.Expression1`1";
var expectedOutput =
@"System.Func`2[System.Int32,System.Int32]
System.Linq.Expressions.Expression`1[System.Func`2[System.Int32,System.Int32]]
$@"System.Func`2[System.Int32,System.Int32]
{expressionType}[System.Func`2[System.Int32,System.Int32]]
";
CompileAndVerify(source, parseOptions: TestOptions.Regular10, expectedOutput: expectedOutput);
CompileAndVerify(source, expectedOutput: expectedOutput);
Expand Down

0 comments on commit 313c99e

Please sign in to comment.