From 2ead2c5f924a70c366d4b8cb6d84c40b09dc7aad Mon Sep 17 00:00:00 2001 From: David Machaj <46852402+dmachaj@users.noreply.github.com.> Date: Thu, 7 Nov 2024 09:51:10 -0800 Subject: [PATCH] Add a test case where fusion manifest is used to support activation without regfree --- test/test_cpp20/activation_without_regfree.cpp | 15 +++++++++++++++ test/test_cpp20/app.manifest | 9 +++++++++ test/test_cpp20/test_cpp20.vcxproj | 3 +++ 3 files changed, 27 insertions(+) create mode 100644 test/test_cpp20/app.manifest diff --git a/test/test_cpp20/activation_without_regfree.cpp b/test/test_cpp20/activation_without_regfree.cpp index 068007c41..cd7568776 100644 --- a/test/test_cpp20/activation_without_regfree.cpp +++ b/test/test_cpp20/activation_without_regfree.cpp @@ -14,6 +14,21 @@ TEST_CASE("activation_withoug_regfree_system_type") REQUIRE_NOTHROW(Uri(L"https://bing.com")); } +TEST_CASE("activation_manifested_avoiding_regfree") +{ + bool fusionRegistrationWorked{ false }; + try + { + // app.manifest has registration for the Simple runtimeclass so activation should succeed. + Simple s{}; + fusionRegistrationWorked = true; + } + catch (...) + { + } + REQUIRE(fusionRegistrationWorked); +} + TEST_CASE("activation_withoug_regfree_fails") { bool threwException{ false }; diff --git a/test/test_cpp20/app.manifest b/test/test_cpp20/app.manifest new file mode 100644 index 000000000..c88b6cffa --- /dev/null +++ b/test/test_cpp20/app.manifest @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/test/test_cpp20/test_cpp20.vcxproj b/test/test_cpp20/test_cpp20.vcxproj index 8cee3255e..5a8c1b4c2 100644 --- a/test/test_cpp20/test_cpp20.vcxproj +++ b/test/test_cpp20/test_cpp20.vcxproj @@ -286,6 +286,9 @@ + + +