Uh oh!
There was an error while loading. Please reload this page.
[TrimmableTypeMap] Integration parity tests - #10827
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an integration test slice for TrimmableTypeMap scanner parity by building a real-user-types fixture assembly and running side-by-side comparisons against the legacy Cecil-based scanner, then wires these integration tests into the solution and Windows CI.
Changes:
- Add
Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTestsproject with scanner parity/comparison tests (Mono.Android + user fixture). - Add
UserTypesFixtureproject to produce a “real user types” assembly referencing Mono.Android/Java.Interop. - Wire the integration tests into
Xamarin.Android.sln, addInternalsVisibleTo, and run/publish results in the Windows CI steps.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/UserTypesFixture/UserTypesFixture.csproj | New fixture project that compiles user-type edge cases and outputs DLL next to integration tests. |
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/UserTypesFixture/UserTypes.cs | User-type fixture source covering component attributes, nested types, [Export], etc. |
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/ScannerComparisonTests.cs | New parity tests comparing legacy scanner output vs new SRM-based scanner across multiple dimensions. |
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/MockBuildEngine.cs | Minimal IBuildEngine stub for TaskLoggingHelper usage in scanner tests. |
| tests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests/Microsoft.Android.Sdk.TrimmableTypeMap.IntegrationTests.csproj | New xUnit integration test project referencing TrimmableTypeMap + Build.Tasks + fixture build output. |
| src/Xamarin.Android.Build.Tasks/Properties/AssemblyInfo.cs | Adds InternalsVisibleTo for the new integration test assembly. |
| build-tools/automation/yaml-templates/build-windows-steps.yaml | Runs/publishes TrimmableTypeMap integration tests in Windows CI. |
| Xamarin.Android.sln | Adds the new integration test and fixture projects to the solution. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
simonrozsival
commented
Feb 20, 2026
/azp run Xamarin.Android-PR |
|
No pipelines are associated with this pull request. |
simonrozsival
commented
Feb 20, 2026
/azp run Xamarin.Android-PR |
|
No pipelines are associated with this pull request. |
Add IntegrationTests and UserTypesFixture projects to Xamarin.Android.sln. Add CI step to run integration tests and publish results. Add InternalsVisibleTo for the integration test assembly. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove test logging/noise, extract reusable helpers, and split long comparison flows into focused helper methods. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract list-diff logic from [Fact] methods into ComparisonDiffHelper and remove section-divider comments from UserTypes fixture. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- ScannerRunner.cs: TypeMapEntry/MethodEntry/TypeMethodGroup records + scanner logic - TypeDataBuilder.cs: TypeComparisonData record + Cecil/peer type data builders - MarshalMethodDiffHelper.cs: marshal method comparison logic - ComparisonDiffHelper.cs: per-field type comparison helpers - ScannerComparisonTests.Helpers.cs: partial class with assertion helpers + assembly path properties - ScannerComparisonTests.cs: now contains only [Fact] methods Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jonathanpeppers
commented
Feb 20, 2026
This one fails to build with: |
…se, ...) Replace Assert.True(false, message) with Assert.Fail(message) to satisfy the xUnit2020 analyzer rule. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
simonrozsival
commented
Mar 10, 2026
/azp run Xamarin.Android-PR |
|
No pipelines are associated with this pull request. |
Stacked on #10823.
Part of #10798
Scope
Review guide
Two commits — review in order: