Skip to content

Commit

Permalink
Added tests for out and ref completion in local function
Browse files Browse the repository at this point in the history
Tests in response to issue dotnet#22253
  • Loading branch information
chborl committed Sep 27, 2017
1 parent 7236847 commit 8e22a51
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,5 +405,13 @@ void main(out goo) { }

await VerifyKeywordAsync(text);
}

[WorkItem(22253, "https://github.com/dotnet/roslyn/issues/22253")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public async Task TestInLocalFunction()
{
await VerifyKeywordAsync(AddInsideMethod(
@"void F(int x, $$"));
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -822,6 +822,15 @@ public async Task TestInConditionalExpressionFalseBranch()
await VerifyKeywordWithRefsAsync(AddInsideMethod(@"
int x = 0;
ref int y = ref true ? ref x : $$"));
}

[WorkItem(22253, "https://github.com/dotnet/roslyn/issues/22253")]
[Fact, Trait(Traits.Feature, Traits.Features.KeywordRecommending)]
public async Task TestInLocalMethod()
{
await VerifyKeywordWithRefsAsync(AddInsideMethod(
@" void Goo(int test, $$) "));

}
}
}

0 comments on commit 8e22a51

Please sign in to comment.