diff --git a/strings/base_implements.h b/strings/base_implements.h index bc44b27f6..a763da424 100644 --- a/strings/base_implements.h +++ b/strings/base_implements.h @@ -430,6 +430,15 @@ namespace winrt::impl } }; + template <> + struct runtime_class_name + { + static hstring get() + { + return {}; + } + }; + template struct producer { diff --git a/test/old_tests/UnitTests/IInspectable_GetRuntimeClassName.cpp b/test/old_tests/UnitTests/IInspectable_GetRuntimeClassName.cpp index 6b0d7550b..7db7ed869 100644 --- a/test/old_tests/UnitTests/IInspectable_GetRuntimeClassName.cpp +++ b/test/old_tests/UnitTests/IInspectable_GetRuntimeClassName.cpp @@ -28,7 +28,7 @@ TEST_CASE("Test_GetRuntimeClassName_NoOverride") { Windows::Foundation::IInspectable i = make(); - REQUIRE(get_class_name(i) == L"Object"); + REQUIRE(get_class_name(i) == L""); } TEST_CASE("Test_GetRuntimeClassName_Override") diff --git a/test/old_tests/UnitTests/constexpr.cpp b/test/old_tests/UnitTests/constexpr.cpp index 22478af2f..a881a2659 100644 --- a/test/old_tests/UnitTests/constexpr.cpp +++ b/test/old_tests/UnitTests/constexpr.cpp @@ -35,6 +35,7 @@ TEST_CASE("constexpr") REQUIRE(winrt::guid_of() == winrt::guid(__uuidof(::IInspectable))); REQUIRE(winrt::guid_of() == winrt::guid(__uuidof(midl_container))); REQUIRE(winrt::name_of() == L"Object"sv); + REQUIRE(winrt::name_of>() == L"Windows.Foundation.IAsyncOperation`1"sv); REQUIRE(winrt::name_of() == midl_container::z_get_rc_name_impl()); diff --git a/test/old_tests/UnitTests/produce.cpp b/test/old_tests/UnitTests/produce.cpp index 5ceab4d0c..403f0df2b 100644 --- a/test/old_tests/UnitTests/produce.cpp +++ b/test/old_tests/UnitTests/produce.cpp @@ -133,7 +133,7 @@ struct produce_IInspectable_RuntimeClassName : implements(); - REQUIRE(get_class_name(without) == L"Object"); + REQUIRE(get_class_name(without) == L""); Windows::Foundation::IInspectable with = make(); REQUIRE(get_class_name(with) == L"produce_IInspectable_RuntimeClassName");