Skip to content

[TrimmableTypeMap] Refactor NativeTypeMap tests for trimmable typemap#11484

Merged
jonathanpeppers merged 1 commit into
mainfrom
android-issue-11018
May 26, 2026
Merged

[TrimmableTypeMap] Refactor NativeTypeMap tests for trimmable typemap#11484
jonathanpeppers merged 1 commit into
mainfrom
android-issue-11018

Conversation

@simonrozsival
Copy link
Copy Markdown
Member

Summary

  • route NativeTypeMap test lookups through JniRuntime.CurrentRuntime.TypeManager
  • remove NativeTypeMap categories from refactored tests and AndroidValueManager contract tests
  • drop stale NativeTypeMap test exclusions now that no tests use the category

Testing

  • Not run locally; relying on CI per machine-load constraint

Fixes #11018

Use the runtime-registered JniRuntime type manager from NativeTypeMap-tagged tests so they work with either LLVM-IR or trimmable typemap implementations.

Remove stale NativeTypeMap category exclusions after the affected tests no longer require the native typemap path.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 25, 2026 14:30
@simonrozsival simonrozsival added copilot `copilot-cli` or other AIs were used to author this trimmable-type-map labels May 25, 2026
@simonrozsival simonrozsival changed the title Refactor NativeTypeMap tests for trimmable typemap [TrimmableTypeMap[ Refactor NativeTypeMap tests for trimmable typemap May 25, 2026
@simonrozsival simonrozsival changed the title [TrimmableTypeMap[ Refactor NativeTypeMap tests for trimmable typemap [TrimmableTypeMap] Refactor NativeTypeMap tests for trimmable typemap May 25, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the NativeTypeMap-related test coverage so typemap lookups go through the runtime-agnostic JniRuntime.CurrentRuntime.TypeManager, allowing the same tests to run under the trimmable typemap path. This also removes now-stale NativeTypeMap category usage and related category exclusions.

Changes:

  • Update typemap lookup tests in JnienvTest to use JniRuntime.CurrentRuntime.TypeManager APIs instead of native-typemap-specific APIs.
  • Remove [Category ("NativeTypeMap")] from the affected tests/fixtures since they no longer depend on the native typemap implementation.
  • Drop NativeTypeMap from ExcludeCategories in the .NET test runner project since no tests are categorized that way anymore.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
tests/Mono.Android-Tests/Mono.Android-Tests/Mono.Android.NET-Tests.csproj Removes NativeTypeMap from excluded categories for trimmable and NativeAOT configurations.
tests/Mono.Android-Tests/Mono.Android-Tests/Java.Interop/JnienvTest.cs Routes typemap mapping assertions through JniRuntime.CurrentRuntime.TypeManager and removes the NativeTypeMap category from those tests.
tests/Mono.Android-Tests/Java.Interop-Tests/Java.InteropTests/AndroidValueManagerContractTests.cs Removes the NativeTypeMap category from the value manager contract test fixture.

@simonrozsival
Copy link
Copy Markdown
Member Author

/review

@simonrozsival simonrozsival added the ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). label May 26, 2026
@jonathanpeppers jonathanpeppers merged commit b3017e1 into main May 26, 2026
7 checks passed
@jonathanpeppers jonathanpeppers deleted the android-issue-11018 branch May 26, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

copilot `copilot-cli` or other AIs were used to author this ready-to-review This PR is ready to review/merge, I think any CI failures are just flaky (ignorable). trimmable-type-map

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TrimmableTypeMap] Refactor NativeTypeMap tests to use runtime-agnostic type map API

3 participants