如何在 C++ 测试 Visual Studio 中检查它们是否属于相同的 class?

How to check that they belong to the same class in c++ test Visual Studio?

我想检查构造函数是否正确初始化,但不知道使用哪个断言方法

TEST_METHOD(testInitNavigator)
        {
            Room room;
            INavigator navigator(room);
            Assert::AreSame(room, navigator.getLocalRoom());
        }

我认为是正确的所以

        TEST_METHOD(testInitNavigator)
        {
            Room room;
            INavigator navigator(room);
            Assert::IsTrue(typeid(room).name() == typeid(navigator.getLocalRoom()).name());
        }