diff --git a/test/unittest/cpp_test/src/input_method_private_member_test.cpp b/test/unittest/cpp_test/src/input_method_private_member_test.cpp index d0ef443a9f392d86b405b590045f2a827147e386..1e174f4e17ccffbf6be12464f59452d23a8ee67d 100644 --- a/test/unittest/cpp_test/src/input_method_private_member_test.cpp +++ b/test/unittest/cpp_test/src/input_method_private_member_test.cpp @@ -2403,8 +2403,11 @@ HWTEST_F(InputMethodPrivateMemberTest, TestGetCompatibleDeviceType, TestSize.Lev std::string testBundleName = "testBundleName"; std::string testDeviceType = "testDeviceType"; bool ret = ImeInfoInquirer::GetInstance().GetCompatibleDeviceType(testBundleName, testDeviceType); - EXPECT_FALSE(ret); - EXPECT_NE(testDeviceType, "default"); + if (ret) { + EXPECT_NE(testDeviceType, "testDeviceType"); + } else { + EXPECT_EQ(testDeviceType, "testDeviceType"); + } } /**