Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing raw-literal #91

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
var e = XElement.Parse(
"""
<root>
<child Value="hi" />
<child Value="hi" />
</root>
"""
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ public partial class CompileTimeCreationTests : RequestDelegateCreationTests
public async Task SupportsRoutePatternInVariable()
{
var source = """
var route = "/hello";
app.MapGet(route, () =>
{
return "Hello world!";
});
""";
var route = "/hello";
app.MapGet(route, () =>
{
return "Hello world!";
});
""";
var (result, compilation) = await RunGeneratorAsync(source);
var endpoint = GetEndpointFromCompilation(compilation);

Expand All @@ -34,12 +34,12 @@ public async Task SupportsRoutePatternInVariable()
public async Task SupportsRoutePatternInConst()
{
var source = """
const string route = "/hello";
app.MapGet(route, () =>
{
return "Hello world!";
});
""";
const string route = "/hello";
app.MapGet(route, () =>
{
return "Hello world!";
});
""";
var (result, compilation) = await RunGeneratorAsync(source);
var endpoint = GetEndpointFromCompilation(compilation);

Expand All @@ -60,15 +60,15 @@ public async Task SupportsRoutePatternInConst()
public async Task SupportsComputedRoutePattern()
{
var source = """
for (int i = 0; i < 5; i++)
{
var route = $"/hello/{i}";
app.MapGet(route, () =>
{
for (int i = 0; i < 5; i++)
{
var route = $"/hello/{i}";
app.MapGet(route, () =>
{
return $"Hello world!";
});
}
""";
});
}
""";
var (result, compilation) = await RunGeneratorAsync(source);
var endpoints = GetEndpointsFromCompilation(compilation);

Expand Down
Loading