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

Add some more testing around shadowing, inheritance, and project boundaries. #86732

Merged
merged 2 commits into from
May 25, 2023

Conversation

jkoritzinsky
Copy link
Member

Initially this was meant to be a test suite to catch #86662, but now it's just regression tests for it and behavior validation tests for other scenarios I thought of at the time.

@jkoritzinsky jkoritzinsky added area-System.Runtime.InteropServices test-enhancement Improvements of test source code source-generator Indicates an issue with a source generator feature labels May 24, 2023
@ghost ghost assigned jkoritzinsky May 24, 2023
@ghost
Copy link

ghost commented May 24, 2023

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Issue Details

Initially this was meant to be a test suite to catch #86662, but now it's just regression tests for it and behavior validation tests for other scenarios I thought of at the time.

Author: jkoritzinsky
Assignees: -
Labels:

area-System.Runtime.InteropServices, test-enhancement, source-generator

Milestone: -

Comment on lines +484 to +488
test.SolutionTransforms.Add((sln, _) =>
{
var additionalProject = sln.Projects.First(proj => proj.Name == "Other");
return additionalProject.WithCompilationOptions(new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary, allowUnsafe: true)).Solution;
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think it's worth it to make a new Test subclass for tests with AdditionProjects?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think doing it manually for the cases where we need it is okay. It's not a lot of packages and it's easy to mess with.

Also I'll probably fix this issue in the Roslyn-SDK at some point and then we can get rid of the solution transform.

Copy link
Member

@jtschuster jtschuster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you!

@jkoritzinsky
Copy link
Member Author

Failures are all known.

@jkoritzinsky jkoritzinsky merged commit 6a66443 into dotnet:main May 25, 2023
@jkoritzinsky jkoritzinsky deleted the chained-inheritance branch May 25, 2023 22:38
@ghost ghost locked as resolved and limited conversation to collaborators Jun 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime.InteropServices source-generator Indicates an issue with a source generator feature test-enhancement Improvements of test source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants