Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
9ec2cd58
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
9ec2cd58
编写于
8月 23, 2021
作者:
Y
y00314596
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add testcase on 20210823 by yangqing3@huawei.com
Signed-off-by:
N
y00314596
<
yangqing3@huawei.com
>
上级
82fc9ea7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
261 addition
and
55 deletion
+261
-55
global/i18n_standard/intljs/hap/entry-release-signed.hap
global/i18n_standard/intljs/hap/entry-release-signed.hap
+0
-0
global/i18n_standard/intljs/project/entry/src/main/js/test/I18n.test.js
...andard/intljs/project/entry/src/main/js/test/I18n.test.js
+261
-55
未找到文件。
global/i18n_standard/intljs/hap/entry-release-signed.hap
浏览文件 @
9ec2cd58
无法预览此类型文件
global/i18n_standard/intljs/project/entry/src/main/js/test/I18n.test.js
浏览文件 @
9ec2cd58
...
@@ -19,182 +19,388 @@ describe('intlTest', function () {
...
@@ -19,182 +19,388 @@ describe('intlTest', function () {
console
.
log
(
"
*************00000000000000000000000*************
"
);
console
.
log
(
"
*************00000000000000000000000*************
"
);
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
00
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_01
00
* @tc.name format the language in locale
* @tc.name format the language in locale
* @tc.desc check the language
* @tc.desc check the language
*/
*/
it
(
'
locale_test_000
'
,
0
,
function
()
{
it
(
'
locale_test_0
1
00
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
"
en-Latn-GB
"
);
var
locale
=
new
Intl
.
Locale
(
"
en-Latn-GB
"
);
console
.
log
(
"
jessie
"
+
locale
.
language
);
console
.
log
(
"
locale_test_0100
"
+
locale
.
language
);
expect
(
locale
.
language
).
assertEqual
(
"
en
"
);
expect
(
locale
.
language
).
assertEqual
(
"
en
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
01
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_02
00
* @tc.name format the language in locale
* @tc.name format the language in locale
* @tc.desc check the language
* @tc.desc check the language
*/
*/
it
(
'
locale_test_0
01
'
,
0
,
function
()
{
it
(
'
locale_test_0
200
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
"
ja-Jpan-JP-u-ca-japanese-hc-h12-co-emoji
"
);
var
locale
=
new
Intl
.
Locale
(
"
ja-Jpan-JP-u-ca-japanese-hc-h12-co-emoji
"
);
console
.
log
(
"
jessie
"
+
locale
.
language
);
console
.
log
(
"
locale_test_0200
"
+
locale
.
language
);
expect
(
locale
.
language
).
assertEqual
(
"
ja
"
);
expect
(
locale
.
language
).
assertEqual
(
"
ja
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
02
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_03
00
* @tc.name format the script in locale
* @tc.name format the script in locale
* @tc.desc check the script
* @tc.desc check the script
*/
*/
it
(
'
locale_test_0
02
'
,
0
,
function
()
{
it
(
'
locale_test_0
300
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
"
en-Latn-GB
"
);
var
locale
=
new
Intl
.
Locale
(
"
en-Latn-GB
"
);
console
.
log
(
"
jessie
"
+
locale
.
script
);
console
.
log
(
"
locale_test_0300
"
+
locale
.
script
);
expect
(
locale
.
script
).
assertEqual
(
"
Latn
"
);
expect
(
locale
.
script
).
assertEqual
(
"
Latn
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
03
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_04
00
* @tc.name format the region in locale
* @tc.name format the region in locale
* @tc.desc check the region
* @tc.desc check the region
*/
*/
it
(
'
locale_test_0
03
'
,
0
,
function
()
{
it
(
'
locale_test_0
400
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
"
en-Latn-GB
"
);
var
locale
=
new
Intl
.
Locale
(
"
en-Latn-GB
"
);
console
.
log
(
"
jessie
"
+
locale
.
region
);
console
.
log
(
"
locale_test_0400
"
+
locale
.
region
);
expect
(
locale
.
region
).
assertEqual
(
"
GB
"
);
expect
(
locale
.
region
).
assertEqual
(
"
GB
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
04
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_05
00
* @tc.name format the basename in locale
* @tc.name format the basename in locale
* @tc.desc check the basename
* @tc.desc check the basename
*/
*/
it
(
'
locale_test_0
04
'
,
0
,
function
()
{
it
(
'
locale_test_0
500
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
"
en-Latn-GB
"
);
var
locale
=
new
Intl
.
Locale
(
"
en-Latn-GB
"
);
console
.
log
(
"
jessie
"
+
locale
.
baseName
);
console
.
log
(
"
locale_test_0500
"
+
locale
.
baseName
);
expect
(
locale
.
baseName
).
assertEqual
(
"
en-Latn-GB
"
);
expect
(
locale
.
baseName
).
assertEqual
(
"
en-Latn-GB
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
05
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_06
00
* @tc.name format the basename in ja-Jpan-JP-u-ca-japanese-hc-h12
* @tc.name format the basename in ja-Jpan-JP-u-ca-japanese-hc-h12
* @tc.desc check the ja-Jpan-JP-u-ca-japanese-hc-h12 basename
* @tc.desc check the ja-Jpan-JP-u-ca-japanese-hc-h12 basename
*/
*/
it
(
'
locale_test_0
05
'
,
0
,
function
()
{
it
(
'
locale_test_0
600
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
"
ja-Jpan-JP-u-ca-japanese-hc-h12
"
);
var
locale
=
new
Intl
.
Locale
(
"
ja-Jpan-JP-u-ca-japanese-hc-h12
"
);
console
.
log
(
"
jessie
"
+
locale
.
baseName
);
console
.
log
(
"
locale_test_0600
"
+
locale
.
baseName
);
expect
(
locale
.
baseName
).
assertEqual
(
"
ja-Jpan-JP
"
);
expect
(
locale
.
baseName
).
assertEqual
(
"
ja-Jpan-JP
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
06
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_07
00
* @tc.name format the hourCycle
* @tc.name format the hourCycle
* @tc.desc check the hourCycle
* @tc.desc check the hourCycle
*/
*/
it
(
'
locale_test_0
06
'
,
0
,
function
()
{
it
(
'
locale_test_0
700
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
,
{
hourCycle
:
'
h24
'
,
calendar
:
'
gregory
'
});
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
,
{
hourCycle
:
'
h24
'
,
calendar
:
'
gregory
'
});
console
.
log
(
"
locale_test_0700
"
+
locale
.
hourCycle
);
expect
(
locale
.
hourCycle
).
assertEqual
(
"
h24
"
);
expect
(
locale
.
hourCycle
).
assertEqual
(
"
h24
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
07
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_08
00
* @tc.name format the calendar
* @tc.name format the calendar
* @tc.desc check the calendar
* @tc.desc check the calendar
*/
*/
it
(
'
locale_test_0
07
'
,
0
,
function
()
{
it
(
'
locale_test_0
800
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
,
{
hourCycle
:
'
24
'
,
calendar
:
'
gregory
'
});
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
,
{
hourCycle
:
'
24
'
,
calendar
:
'
gregory
'
});
console
.
log
(
"
locale_test_0800
"
+
locale
.
calendar
);
expect
(
locale
.
calendar
).
assertEqual
(
"
gregory
"
);
expect
(
locale
.
calendar
).
assertEqual
(
"
gregory
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
08
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_09
00
* @tc.name format the japanese calendar
* @tc.name format the japanese calendar
* @tc.desc check the japanese calendar
* @tc.desc check the japanese calendar
*/
*/
it
(
'
locale_test_0
08
'
,
0
,
function
()
{
it
(
'
locale_test_0
900
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP-u-ca-japanese-hc-h12
'
);
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP-u-ca-japanese-hc-h12
'
);
console
.
log
(
"
locale_test_0900
"
+
locale
.
calendar
);
expect
(
locale
.
calendar
).
assertEqual
(
"
japanese
"
);
expect
(
locale
.
calendar
).
assertEqual
(
"
japanese
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
09
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_10
00
* @tc.name format the h12 hourCycle
* @tc.name format the h12 hourCycle
* @tc.desc check the h12 hourCycle
* @tc.desc check the h12 hourCycle
*/
*/
it
(
'
locale_test_
009
'
,
0
,
function
()
{
it
(
'
locale_test_
1000
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP-u-ca-japanese-hc-h12
'
);
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP-u-ca-japanese-hc-h12
'
);
console
.
log
(
"
locale_test_1000
"
+
locale
.
hourCycle
);
expect
(
locale
.
hourCycle
).
assertEqual
(
"
h12
"
);
expect
(
locale
.
hourCycle
).
assertEqual
(
"
h12
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
10
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_11
00
* @tc.name format the caseFirst
* @tc.name format the caseFirst
* @tc.desc check the caseFirst
* @tc.desc check the caseFirst
*/
*/
it
(
'
locale_test_
01
0
'
,
0
,
function
()
{
it
(
'
locale_test_
110
0
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP
'
,
{
caseFirst
:
true
});
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP
'
,
{
caseFirst
:
true
});
console
.
log
(
"
locale_test_1100
"
+
locale
.
caseFirst
);
expect
(
locale
.
caseFirst
==
true
).
assertTrue
();
expect
(
locale
.
caseFirst
==
true
).
assertTrue
();
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
11
00
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_12
00
* @tc.name format the collation
* @tc.name format the collation
* @tc.desc check the collation
* @tc.desc check the collation
*/
*/
it
(
'
locale_test_
011
'
,
0
,
function
()
{
it
(
'
locale_test_
1200
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP
'
,
{
collation
:
'
big5han
'
});
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP
'
,
{
collation
:
'
big5han
'
});
console
.
log
(
"
locale_test_1200
"
+
locale
.
collation
);
expect
(
locale
.
collation
).
assertEqual
(
"
big5han
"
);
expect
(
locale
.
collation
).
assertEqual
(
"
big5han
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_1101
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_1300
* @tc.name format the numeric
* @tc.desc check the numeric
*/
it
(
'
locale_test_1300
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP
'
,
{
numeric
:
true
});
console
.
log
(
"
locale_test_1300
"
+
locale
.
numeric
);
expect
(
locale
.
numeric
==
true
).
assertTrue
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_1400
* @tc.name format the numeric
* @tc.desc check the numeric
*/
it
(
'
locale_test_1400
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP
'
,
{
numberingSystem
:
'
arab
'
});
console
.
log
(
"
locale_test_1400
"
+
locale
.
numberingSystem
);
expect
(
locale
.
numberingSystem
).
assertEqual
(
"
arab
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_1500
* @tc.name test the toString interface
* @tc.name test the toString interface
* @tc.desc check the toString method
* @tc.desc check the toString method
*/
*/
it
(
'
locale_test_012
'
,
0
,
function
()
{
it
(
'
locale_test_1500
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
var
locale
=
new
Intl
.
Locale
(
'
zh
'
);
expect
(
locale
.
toString
()).
assertEqual
(
"
zh-CN-u-ca-gregory-co-compact
"
);
console
.
log
(
"
locale_test_1500
"
+
locale
.
toString
());
expect
(
locale
.
toString
()).
assertEqual
(
"
zh
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_1102
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_1600
* @tc.name test the toString interface
* @tc.desc check the toString method
*/
it
(
'
locale_test_1600
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
);
console
.
log
(
"
locale_test_1600
"
+
locale
.
toString
());
expect
(
locale
.
toString
()).
assertEqual
(
"
zh-CN
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_1700
* @tc.name test the toString interface
* @tc.desc check the toString method
*/
it
(
'
locale_test_1700
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-Hans-CN
'
);
console
.
log
(
"
locale_test_1700
"
+
locale
.
toString
());
expect
(
locale
.
toString
()).
assertEqual
(
"
zh-Hans-CN
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_1800
* @tc.name test the toString interface
* @tc.desc check the toString method
*/
it
(
'
locale_test_1800
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-Hans-CN-u-ca-japanese-hc-h12
'
);
console
.
log
(
"
locale_test_1800
"
+
locale
.
toString
());
expect
(
locale
.
toString
()).
assertEqual
(
"
zh-Hans-CN-u-hc-h12-ca-japanese
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_1900
* @tc.name test the maximize interface
* @tc.name test the maximize interface
* @tc.desc check the maximize method
* @tc.desc check the maximize method
*/
*/
it
(
'
locale_test_
013
'
,
0
,
function
()
{
it
(
'
locale_test_
1900
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
var
locale
=
new
Intl
.
Locale
(
'
zh
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
console
.
log
(
"
jessie 013
"
+
locale
.
maximize
()
.
toString
());
console
.
log
(
"
locale_test_1900
"
+
locale
.
toString
());
expect
(
locale
.
maximize
().
toString
()).
assertEqual
(
"
zh-hans-CN
-u-ca-gregory-co-compact
"
);
expect
(
locale
.
toString
()).
assertEqual
(
"
zh
-u-ca-gregory-co-compact
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_1103
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2000
* @tc.name test the toString interface
* @tc.desc check the toString method
*/
it
(
'
locale_test_2000
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
console
.
log
(
"
locale_test_2000
"
+
locale
.
toString
());
expect
(
locale
.
toString
()).
assertEqual
(
"
zh-CN-u-ca-gregory-co-compact
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2100
* @tc.name test the mininize interface
* @tc.name test the mininize interface
* @tc.desc check the mininize method
* @tc.desc check the mininize method
*/
*/
it
(
'
locale_test_
014
'
,
0
,
function
()
{
it
(
'
locale_test_
2100
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-hans-CN
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
var
locale
=
new
Intl
.
Locale
(
'
zh-hans-CN
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
console
.
log
(
"
jessie 014
"
+
locale
.
mininize
()
.
toString
());
console
.
log
(
"
locale_test_2100
"
+
locale
.
toString
());
expect
(
locale
.
mininize
().
toString
()).
assertEqual
(
"
zh
-u-ca-gregory-co-compact
"
);
expect
(
locale
.
toString
()).
assertEqual
(
"
zh-hans-CN
-u-ca-gregory-co-compact
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
1104
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_2200
* @tc.name
format the numeric
* @tc.name
test the mininize interface
* @tc.desc check the
numeric
* @tc.desc check the
mininize method
*/
*/
it
(
'
locale_test_
015
'
,
0
,
function
()
{
it
(
'
locale_test_
2200
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP
'
,
{
numeric
:
true
}
);
var
locale
=
new
Intl
.
Locale
(
'
zh
'
);
console
.
log
(
"
jessie 015
"
+
locale
.
numeric
);
console
.
log
(
"
locale_test_2200
"
+
locale
.
mininize
().
toString
()
);
expect
(
locale
.
numeric
==
true
).
assertTrue
(
);
expect
(
locale
.
minimize
().
toString
()).
assertEqual
(
"
zh
"
);
})
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_
1105
* @tc.number SUB_GLOBAL_I18N_JS_
LOCALE_2201
* @tc.name
format the numeric
* @tc.name
test the mininize interface
* @tc.desc check the
numeric
* @tc.desc check the
mininize method
*/
*/
it
(
'
locale_test_016
'
,
0
,
function
()
{
it
(
'
locale_test_2201
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
ja-Jpan-JP
'
,
{
numberingSystem
:
'
arab
'
});
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
);
expect
(
locale
.
numberingSystem
).
assertEqual
(
"
arab
"
);
console
.
log
(
"
locale_test_2201
"
+
locale
.
mininize
().
toString
());
expect
(
locale
.
minimize
().
toString
()).
assertEqual
(
"
zh
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2202
* @tc.name test the mininize interface
* @tc.desc check the mininize method
*/
it
(
'
locale_test_2202
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-Hans-CN
'
);
console
.
log
(
"
locale_test_2202
"
+
locale
.
mininize
().
toString
());
expect
(
locale
.
minimize
().
toString
()).
assertEqual
(
"
zh
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2203
* @tc.name test the mininize interface
* @tc.desc check the mininize method
*/
it
(
'
locale_test_2203
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-Hans-CN-u-ca-gregory-co-compact
'
);
console
.
log
(
"
locale_test_2203
"
+
locale
.
mininize
().
toString
());
expect
(
locale
.
minimize
().
toString
()).
assertEqual
(
"
zh
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2204
* @tc.name test the mininize interface
* @tc.desc check the mininize method
*/
it
(
'
locale_test_2204
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
console
.
log
(
"
locale_test_2204
"
+
locale
.
mininize
().
toString
());
expect
(
locale
.
minimize
().
toString
()).
assertEqual
(
"
zh-u-ca-gregory-co-compact
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2205
* @tc.name test the mininize interface
* @tc.desc check the mininize method
*/
it
(
'
locale_test_2205
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
console
.
log
(
"
locale_test_2205
"
+
locale
.
mininize
().
toString
());
expect
(
locale
.
minimize
().
toString
()).
assertEqual
(
"
zh-u-ca-gregory-co-compact
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2206
* @tc.name test the mininize interface
* @tc.desc check the mininize method
*/
it
(
'
locale_test_2206
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-hans-CN
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
console
.
log
(
"
locale_test_2206
"
+
locale
.
mininize
().
toString
());
expect
(
locale
.
minimize
().
toString
()).
assertEqual
(
"
zh-u-ca-gregory-co-compact
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2300
* @tc.name test the maximize interface
* @tc.desc check the maximize method
*/
it
(
'
locale_test_2300
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh
'
);
console
.
log
(
"
locale_test_2300
"
+
locale
.
maximize
().
maximize
().
toString
());
expect
(
locale
.
maximize
().
toString
()).
assertEqual
(
"
zh-Hans-CN
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2301
* @tc.name test the maximize interface
* @tc.desc check the maximize method
*/
it
(
'
locale_test_2301
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
);
console
.
log
(
"
locale_test_2301
"
+
locale
.
maximize
().
maximize
().
toString
());
expect
(
locale
.
maximize
().
toString
()).
assertEqual
(
"
zh-Hans-CN
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2302
* @tc.name test the maximize interface
* @tc.desc check the maximize method
*/
it
(
'
locale_test_2302
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-Hans-CN
'
);
console
.
log
(
"
locale_test_2302
"
+
locale
.
maximize
().
maximize
().
toString
());
expect
(
locale
.
maximize
().
toString
()).
assertEqual
(
"
zh-Hans-CN
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2303
* @tc.name test the mininize interface
* @tc.desc check the mininize method
*/
it
(
'
locale_test_2303
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-Hans-CN-u-ca-gregory-co-compact
'
);
console
.
log
(
"
locale_test_2303
"
+
locale
.
maximize
().
toString
());
expect
(
locale
.
maximize
().
toString
()).
assertEqual
(
"
zh-Hans-CN-u-ca-gregory-co-compact
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2304
* @tc.name test the maximize interface
* @tc.desc check the maximize method
*/
it
(
'
locale_test_2304
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
console
.
log
(
"
locale_test_2304
"
+
locale
.
maximize
().
maximize
().
toString
());
expect
(
locale
.
maximize
().
toString
()).
assertEqual
(
"
zh-Hans-CN-u-ca-gregory-co-compact
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2305
* @tc.name test the maximize interface
* @tc.desc check the maximize method
*/
it
(
'
locale_test_2305
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-CN
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
console
.
log
(
"
locale_test_2305
"
+
locale
.
maximize
().
maximize
().
toString
());
expect
(
locale
.
maximize
().
toString
()).
assertEqual
(
"
zh-Hans-CN-u-ca-gregory-co-compact
"
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_LOCALE_2306
* @tc.name test the maximize interface
* @tc.desc check the maximize method
*/
it
(
'
locale_test_2306
'
,
0
,
function
()
{
var
locale
=
new
Intl
.
Locale
(
'
zh-Hans-CN
'
,
{
calendar
:
'
gregory
'
,
collation
:
'
compact
'
});
console
.
log
(
"
locale_test_2306
"
+
locale
.
maximize
().
maximize
().
toString
());
expect
(
locale
.
maximize
().
toString
()).
assertEqual
(
"
zh-Hans-CN-u-ca-gregory-co-compact
"
);
})
})
/* *
/* *
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录