多用户仅支持PC

Signed-off-by: WJ <wangjian546@huawei.com>
This commit is contained in:
WJ 2024-09-25 20:22:00 +08:00
parent bb2c91099b
commit 870df4a428
2 changed files with 9 additions and 0 deletions

View File

@ -62,6 +62,9 @@ ohos_unittest("intl_test") {
if (i18n_support_app_preferred_language) {
defines = [ "SUPPORT_APP_PREFERRED_LANGUAGE" ]
}
if (target_platform == "pc") {
defines += [ "SUPPORT_MULTI_USER" ]
}
deps = [
"//base/global/i18n/frameworks/intl:build_module",

View File

@ -1852,9 +1852,15 @@ HWTEST_F(IntlTest, IntlFuncTest00103, TestSize.Level1)
std::string language = preferences->GetString("languageData", "");
std::string locale = preferences->GetString("localeData", "");
std::string is24Hour = preferences->GetString("is24HourData", "");
#ifdef SUPPORT_MULTI_USER
EXPECT_EQ(language, "101:zh-Hans");
EXPECT_EQ(locale, "101:zh-Hans-CN");
EXPECT_EQ(is24Hour, "101:false");
#else
EXPECT_EQ(language, "");
EXPECT_EQ(locale, "");
EXPECT_EQ(is24Hour, "");
#endif
}
MultiUsers::RemoveUser("101");
if (preferences != nullptr) {