Skip to content

Commit 2ead2c5

Browse files
committed
Add a test case where fusion manifest is used to support activation without regfree
1 parent 3734b0e commit 2ead2c5

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

test/test_cpp20/activation_without_regfree.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ TEST_CASE("activation_withoug_regfree_system_type")
1414
REQUIRE_NOTHROW(Uri(L"https://bing.com"));
1515
}
1616

17+
TEST_CASE("activation_manifested_avoiding_regfree")
18+
{
19+
bool fusionRegistrationWorked{ false };
20+
try
21+
{
22+
// app.manifest has registration for the Simple runtimeclass so activation should succeed.
23+
Simple s{};
24+
fusionRegistrationWorked = true;
25+
}
26+
catch (...)
27+
{
28+
}
29+
REQUIRE(fusionRegistrationWorked);
30+
}
31+
1732
TEST_CASE("activation_withoug_regfree_fails")
1833
{
1934
bool threwException{ false };

test/test_cpp20/app.manifest

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
2+
<file name="test_component.dll">
3+
<activatableClass
4+
name="test_component.Simple"
5+
threadingModel="both"
6+
xmlns="urn:schemas-microsoft-com:winrt.v1"
7+
/>
8+
</file>
9+
</assembly>

test/test_cpp20/test_cpp20.vcxproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@
286286
</ClCompile>
287287
<ClCompile Include="ranges.cpp" />
288288
</ItemGroup>
289+
<ItemGroup>
290+
<Manifest Include="app.manifest" />
291+
</ItemGroup>
289292
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
290293
<ImportGroup Label="ExtensionTargets">
291294
</ImportGroup>

0 commit comments

Comments
 (0)