Skip to content

Commit

Permalink
Add some tests (#45230)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekseyTs authored Jun 16, 2020
1 parent c7f09a2 commit 64b18be
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Compilers/CSharp/Test/Semantic/Semantics/RecordTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6804,6 +6804,11 @@ .maxstack 3
Assert.Same(symbol.ContainingSymbol, model.GetEnclosingSymbol(x.SpanStart));
Assert.Contains(symbol, model.LookupSymbols(x.SpanStart, name: "X"));
Assert.Contains("X", model.LookupNames(x.SpanStart));

var baseWithargs = tree.GetRoot().DescendantNodes().OfType<SimpleBaseTypeSyntax>().Single();
Assert.Equal("Base(X, Y)", baseWithargs.ToString());
Assert.Null(model.GetTypeInfo(baseWithargs).Type);
Assert.Null(model.GetSymbolInfo(baseWithargs).Symbol);
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ public void Simple_01()
Assert.True(entryPoint.ReturnsVoid);
AssertEntryPointParameter(entryPoint);
CompileAndVerify(comp, expectedOutput: "Hi!");
Assert.Same(entryPoint, comp.GetEntryPoint(default));
Assert.False(entryPoint.CanBeReferencedByName);
Assert.False(entryPoint.ContainingType.CanBeReferencedByName);
}

private static void AssertEntryPointParameter(SynthesizedSimpleProgramEntryPointSymbol entryPoint)
Expand Down

0 comments on commit 64b18be

Please sign in to comment.