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

[cdac] Simplify usage of TestPlaceholderTarget in tests #109873

Merged
merged 7 commits into from
Nov 20, 2024

Conversation

elinor-fung
Copy link
Member

  • Make TestPlaceholderTarget (mock target) constructor take type infos and global values
  • Handle reading of global values in mock target implementation
  • Use Moq for creating a ContractRegistry instead of our own explicit implementation
  • Remove subclasses of TestPlaceholderTarget

@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Nov 15, 2024
@elinor-fung elinor-fung added test-enhancement Improvements of test source code area-Diagnostics-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Nov 15, 2024
@elinor-fung elinor-fung added this to the 10.0.0 milestone Nov 15, 2024
Copy link
Contributor

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

@@ -13,6 +14,7 @@ internal class ExecutionManagerTestBuilder
{
public const ulong ExecutionManagerCodeRangeMapAddress = 0x000a_fff0;

const bool UseFunclets = true;
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed? A const bool seems odd to me. If this is important, let's add a comment what this is trying to capture.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm missing why that is odd? It's just indicating that the test builder (currently) always specifies to use funclets and it is not configurable on the instance.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll move it to something local in a follow-up,.

src/native/managed/cdacreader/tests/PrecodeStubsTests.cs Outdated Show resolved Hide resolved
@elinor-fung elinor-fung merged commit 2eb6a2a into dotnet:main Nov 20, 2024
147 checks passed
@elinor-fung elinor-fung deleted the cdac-testplaceholdertarget branch November 20, 2024 02:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Diagnostics-coreclr test-enhancement Improvements of test source code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants