From 0a2d793a519c4e5fd0501df2a684a5e98345c966 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B5=8B=E5=B2=A9?= Date: Sun, 13 Jul 2025 17:31:22 +0800 Subject: [PATCH] fix tdd MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 苏嵋岩 --- .../cpp_test/src/input_method_private_member_test.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 d0ef443a9..1e174f4e1 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"); + } } /** -- Gitee