Skip to content

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

Merged
jkoritzinsky merged 2 commits into
dotnet:mainfrom
jkoritzinsky:chained-inheritance
May 25, 2023
Merged

Add some more testing around shadowing, inheritance, and project boundaries.#86732
jkoritzinsky merged 2 commits into
dotnet:mainfrom
jkoritzinsky:chained-inheritance

Conversation

@jkoritzinsky

Copy link
Copy Markdown
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.

@jkoritzinskyjkoritzinsky 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

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
MemberAuthor

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.

@jtschusterjtschuster left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
MemberAuthor

Failures are all known.

@jkoritzinsky
jkoritzinsky merged commit 6a66443 into dotnet:mainMay 25, 2023
@jkoritzinsky
jkoritzinsky deleted the chained-inheritance branch May 25, 2023 22:38
@ghostghost locked as resolved and limited conversation to collaborators Jun 25, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Runtime.InteropServicessource-generatorIndicates an issue with a source generator featuretest-enhancementImprovements of test source code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@jkoritzinsky@jtschuster