KEMBAR78
Add specific test coverage for activation by kennykerr · Pull Request #3697 · microsoft/windows-rs · GitHub
Skip to content

Conversation

@kennykerr
Copy link
Collaborator

This update adds specific test coverage for component and factory activation. While activation is tested indirectly in various ways, having a specific test suite makes it clear that this is about testing activation itself and lets us provide targeted tests for edge cases not otherwise covered by other test scenarios in a meaningful way. Some specifics:

  • The only actual behavior change here is that the activation support in windows-core is changed to only preserve the HRESULT returned by RoGetActivationFactory as apposed to whatever COM error object is currently on the thread. The logic here is that RoGetActivationFactory does not produce a COM error object but merely returns an HRESULT so this is unnecessary. I am also trying to move away from the overuse of COM error objects as much as possible. I originally copied this behavior from C++/WinRT which assumes COM error objects everywhere. I implemented it that way because that is the norm for WinRT.

  • Specific activation success and failure tests are included with deliberate coverage of the search path fallback logic.

  • Specific tests for the factory helper function are also provided. Previously this was only "tested" via the sample_consent sample crate.

@kennykerr kennykerr merged commit 05879ec into master Aug 5, 2025
29 checks passed
@kennykerr kennykerr deleted the test_activation branch August 5, 2025 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant