Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
06083771
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看板
提交
06083771
编写于
1月 11, 2022
作者:
Y
y00314596
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add case for character api by yangqing3@huawei.com
Signed-off-by:
N
y00314596
<
yangqing3@huawei.com
>
上级
eb5a5405
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
344 addition
and
8 deletion
+344
-8
global/i18n_standard/intljs/src/main/js/default/test/I18n.test.js
...18n_standard/intljs/src/main/js/default/test/I18n.test.js
+344
-8
未找到文件。
global/i18n_standard/intljs/src/main/js/default/test/I18n.test.js
浏览文件 @
06083771
...
@@ -1539,9 +1539,57 @@ describe('I18nTest', function () {
...
@@ -1539,9 +1539,57 @@ describe('I18nTest', function () {
expect
(
value
).
assertFalse
();
expect
(
value
).
assertFalse
();
})
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0120
* @tc.name test isDigit interface with 123 param
* @tc.desc check the isDigit interface
*/
it
(
'
i18n_test_character_0120
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0120
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isDigit
(
'
123
'
);
console
.
log
(
'
i18n_test_character_0120
'
+
value
);
expect
(
value
).
assertTrue
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0140
* @tc.name test isDigit interface with 123abc param
* @tc.desc check the isDigit interface
*/
it
(
'
i18n_test_character_0140
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0140
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isDigit
(
'
123abc
'
);
console
.
log
(
'
i18n_test_character_0140
'
+
value
);
expect
(
value
).
assertTrue
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0150
* @tc.name test isDigit interface with abc123 param
* @tc.desc check the isDigit interface
*/
it
(
'
i18n_test_character_0150
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0150
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isDigit
(
'
abc123
'
);
console
.
log
(
'
i18n_test_character_0150
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0160
* @tc.name test isDigit interface with null param
* @tc.desc check the isDigit interface
*/
it
(
'
i18n_test_character_0160
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0160
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isDigit
(
''
);
console
.
log
(
'
i18n_test_character_0160
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0200
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0200
* @tc.name test isSpaceChar interface
* @tc.name test isSpaceChar interface
with abc param
* @tc.desc check the isSpaceChar interface
* @tc.desc check the isSpaceChar interface
*/
*/
it
(
'
i18n_test_character_0200
'
,
0
,
function
()
{
it
(
'
i18n_test_character_0200
'
,
0
,
function
()
{
...
@@ -1551,9 +1599,33 @@ describe('I18nTest', function () {
...
@@ -1551,9 +1599,33 @@ describe('I18nTest', function () {
expect
(
value
).
assertFalse
();
expect
(
value
).
assertFalse
();
})
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0220
* @tc.name test isSpaceChar interface with one space param
* @tc.desc check the isSpaceChar interface
*/
it
(
'
i18n_test_character_0220
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0220
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isSpaceChar
(
'
'
);
console
.
log
(
'
i18n_test_character_0220
'
+
value
);
expect
(
value
).
assertTrue
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0240
* @tc.name test isSpaceChar interface with multi space param
* @tc.desc check the isSpaceChar interface
*/
it
(
'
i18n_test_character_0240
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0240
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isSpaceChar
(
'
'
);
console
.
log
(
'
i18n_test_character_0240--
'
+
value
+
'
--
'
);
expect
(
value
).
assertTrue
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0300
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0300
* @tc.name test isWhitespace interface
* @tc.name test isWhitespace interface
with abc param
* @tc.desc check the isWhitespace interface
* @tc.desc check the isWhitespace interface
*/
*/
it
(
'
i18n_test_character_0300
'
,
0
,
function
()
{
it
(
'
i18n_test_character_0300
'
,
0
,
function
()
{
...
@@ -1563,9 +1635,21 @@ describe('I18nTest', function () {
...
@@ -1563,9 +1635,21 @@ describe('I18nTest', function () {
expect
(
value
).
assertFalse
();
expect
(
value
).
assertFalse
();
})
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0320
* @tc.name test isWhitespace interface with \u0009 param
* @tc.desc check the isWhitespace interface
*/
it
(
'
i18n_test_character_0320
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0320
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isWhitespace
(
'
\
u0009
'
);
console
.
log
(
'
i18n_test_character_0320--
'
+
value
+
'
--
'
);
expect
(
value
).
assertTrue
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0400
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0400
* @tc.name test isRTL interface
* @tc.name test isRTL interface
with abc param
* @tc.desc check the isRTL interface
* @tc.desc check the isRTL interface
*/
*/
it
(
'
i18n_test_character_0400
'
,
0
,
function
()
{
it
(
'
i18n_test_character_0400
'
,
0
,
function
()
{
...
@@ -1575,9 +1659,45 @@ describe('I18nTest', function () {
...
@@ -1575,9 +1659,45 @@ describe('I18nTest', function () {
expect
(
value
).
assertFalse
();
expect
(
value
).
assertFalse
();
})
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0420
* @tc.name test isRTL interface with ١٢٣٤٥٦٧ param
* @tc.desc check the isRTL interface
*/
it
(
'
i18n_test_character_0420
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0420
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isRTL
(
'
١٢٣٤٥٦٧
'
);
console
.
log
(
'
i18n_test_character_0420
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0440
* @tc.name test isRTL interface with 我是小明 param
* @tc.desc check the isRTL interface
*/
it
(
'
i18n_test_character_0440
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0440
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isRTL
(
'
我是小明
'
);
console
.
log
(
'
i18n_test_character_0440
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0460
* @tc.name test isRTL interface with نحن param
* @tc.desc check the isRTL interface
*/
it
(
'
i18n_test_character_0460
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0460
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isRTL
(
'
نحن
'
);
console
.
log
(
'
i18n_test_character_0460
'
+
value
);
expect
(
value
).
assertTrue
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0500
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0500
* @tc.name test isIdeograph interface
* @tc.name test isIdeograph interface
with abc param
* @tc.desc check the isIdeograph interface
* @tc.desc check the isIdeograph interface
*/
*/
it
(
'
i18n_test_character_0500
'
,
0
,
function
()
{
it
(
'
i18n_test_character_0500
'
,
0
,
function
()
{
...
@@ -1587,9 +1707,45 @@ describe('I18nTest', function () {
...
@@ -1587,9 +1707,45 @@ describe('I18nTest', function () {
expect
(
value
).
assertFalse
();
expect
(
value
).
assertFalse
();
})
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0520
* @tc.name test isIdeograph interface with '我' param
* @tc.desc check the isIdeograph interface
*/
it
(
'
i18n_test_character_0520
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0520
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isIdeograph
(
'
我
'
);
console
.
log
(
'
i18n_test_character_0520
'
+
value
);
expect
(
value
).
assertTrue
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0540
* @tc.name test isIdeograph interface with '우리' param
* @tc.desc check the isIdeograph interface
*/
it
(
'
i18n_test_character_0540
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0540
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isIdeograph
(
'
우리
'
);
console
.
log
(
'
i18n_test_character_0540
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0560
* @tc.name test isIdeograph interface with '私た' param
* @tc.desc check the isIdeograph interface
*/
it
(
'
i18n_test_character_0560
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0560
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isIdeograph
(
'
私たち
'
);
console
.
log
(
'
i18n_test_character_0560
'
+
value
);
expect
(
value
).
assertTrue
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0600
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0600
* @tc.name test isLetter interface
* @tc.name test isLetter interface
with abc param
* @tc.desc check the isLetter interface
* @tc.desc check the isLetter interface
*/
*/
it
(
'
i18n_test_character_0600
'
,
0
,
function
()
{
it
(
'
i18n_test_character_0600
'
,
0
,
function
()
{
...
@@ -1599,9 +1755,45 @@ describe('I18nTest', function () {
...
@@ -1599,9 +1755,45 @@ describe('I18nTest', function () {
expect
(
value
).
assertTrue
();
expect
(
value
).
assertTrue
();
})
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0620
* @tc.name test isLetter interface with 123 param
* @tc.desc check the isLetter interface
*/
it
(
'
i18n_test_character_0620
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0620
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isLetter
(
'
123
'
);
console
.
log
(
'
i18n_test_character_0620
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0640
* @tc.name test isLetter interface with abc123 param
* @tc.desc check the isLetter interface
*/
it
(
'
i18n_test_character_0640
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0640
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isLetter
(
'
abc123
'
);
console
.
log
(
'
i18n_test_character_0640
'
+
value
);
expect
(
value
).
assertTrue
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0660
* @tc.name test isLetter interface with 123abc param
* @tc.desc check the isLetter interface
*/
it
(
'
i18n_test_character_0660
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0660
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isLetter
(
'
123abc
'
);
console
.
log
(
'
i18n_test_character_0660
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0700
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0700
* @tc.name test isLowerCase interface
* @tc.name test isLowerCase interface
with abc param
* @tc.desc check the isLowerCase interface
* @tc.desc check the isLowerCase interface
*/
*/
it
(
'
i18n_test_character_0700
'
,
0
,
function
()
{
it
(
'
i18n_test_character_0700
'
,
0
,
function
()
{
...
@@ -1611,9 +1803,45 @@ describe('I18nTest', function () {
...
@@ -1611,9 +1803,45 @@ describe('I18nTest', function () {
expect
(
value
).
assertTrue
();
expect
(
value
).
assertTrue
();
})
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0720
* @tc.name ftest isLowerCase interface with ABC param
* @tc.desc check the isLowerCase interface
*/
it
(
'
i18n_test_character_0720
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0720
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isLowerCase
(
'
ABC
'
);
console
.
log
(
'
i18n_test_character_0720
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0740
* @tc.name test isLowerCase interface with abcDEF param
* @tc.desc check the isLowerCase interface
*/
it
(
'
i18n_test_character_0740
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0740
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isLowerCase
(
'
abcDEF
'
);
console
.
log
(
'
i18n_test_character_0740
'
+
value
);
expect
(
value
).
assertTrue
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0760
* @tc.name test isLowerCase interface with ABCdef param
* @tc.desc check the isLowerCase interface
*/
it
(
'
i18n_test_character_0760
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0760
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isLowerCase
(
'
ABCdef
'
);
console
.
log
(
'
i18n_test_character_0760
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0800
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0800
* @tc.name test isUpperCase interface
* @tc.name test isUpperCase interface
with ABC param
* @tc.desc check the isUpperCase interface
* @tc.desc check the isUpperCase interface
*/
*/
it
(
'
i18n_test_character_0800
'
,
0
,
function
()
{
it
(
'
i18n_test_character_0800
'
,
0
,
function
()
{
...
@@ -1623,9 +1851,45 @@ describe('I18nTest', function () {
...
@@ -1623,9 +1851,45 @@ describe('I18nTest', function () {
expect
(
value
).
assertTrue
();
expect
(
value
).
assertTrue
();
})
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0820
* @tc.name test isUpperCase interface with abc param
* @tc.desc check the isUpperCase interface
*/
it
(
'
i18n_test_character_0820
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0820
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isUpperCase
(
'
abc
'
);
console
.
log
(
'
i18n_test_character_0820
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0840
* @tc.name test isUpperCase interface with ABCdef param
* @tc.desc check the isUpperCase interface
*/
it
(
'
i18n_test_character_0840
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0840
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isUpperCase
(
'
ABCdef
'
);
console
.
log
(
'
i18n_test_character_0840
'
+
value
);
expect
(
value
).
assertTrue
();
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0860
* @tc.name test isUpperCase interface with abcDEF param
* @tc.desc check the isUpperCase interface
*/
it
(
'
i18n_test_character_0860
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0860
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
isUpperCase
(
'
abcDEF
'
);
console
.
log
(
'
i18n_test_character_0860
'
+
value
);
expect
(
value
).
assertFalse
();
})
/* *
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0900
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0900
* @tc.name test getType interface
* @tc.name test getType interface
with a param
* @tc.desc check the getType interface
* @tc.desc check the getType interface
*/
*/
it
(
'
i18n_test_character_0900
'
,
0
,
function
()
{
it
(
'
i18n_test_character_0900
'
,
0
,
function
()
{
...
@@ -1635,5 +1899,77 @@ describe('I18nTest', function () {
...
@@ -1635,5 +1899,77 @@ describe('I18nTest', function () {
expect
(
value
).
assertEqual
(
'
U_LOWERCASE_LETTER
'
);
expect
(
value
).
assertEqual
(
'
U_LOWERCASE_LETTER
'
);
})
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0920
* @tc.name ftest getType interface with ABC param
* @tc.desc check the getType interface
*/
it
(
'
i18n_test_character_0920
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0920
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
getType
(
'
ABC
'
);
console
.
log
(
'
i18n_test_character_0920
'
+
value
);
expect
(
value
).
assertEqual
(
'
U_UPPERCASE_LETTER
'
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0940
* @tc.name test getType interface with ABCdef param
* @tc.desc check the getType interface
*/
it
(
'
i18n_test_character_0940
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0940
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
getType
(
'
ABCdef
'
);
console
.
log
(
'
i18n_test_character_0940
'
+
value
);
expect
(
value
).
assertEqual
(
'
U_UPPERCASE_LETTER
'
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0960
* @tc.name test getType interface with 123 param
* @tc.desc check the getType interface
*/
it
(
'
i18n_test_character_0960
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0960
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
getType
(
'
123
'
);
console
.
log
(
'
i18n_test_character_0960
'
+
value
);
expect
(
value
).
assertEqual
(
'
U_DECIMAL_DIGIT_NUMBER
'
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0970
* @tc.name test getType interface with 123abc param
* @tc.desc check the getType interface
*/
it
(
'
i18n_test_character_0970
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0970
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
getType
(
'
123abc
'
);
console
.
log
(
'
i18n_test_character_0970
'
+
value
);
expect
(
value
).
assertEqual
(
'
U_DECIMAL_DIGIT_NUMBER
'
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0980
* @tc.name test getType interface with ١٢٣٤٥٦٧ param
* @tc.desc check the getType interface
*/
it
(
'
i18n_test_character_0980
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0980
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
getType
(
'
١٢٣٤٥٦٧
'
);
console
.
log
(
'
i18n_test_character_0980
'
+
value
);
expect
(
value
).
assertEqual
(
'
U_DECIMAL_DIGIT_NUMBER
'
);
})
/* *
* @tc.number SUB_GLOBAL_I18N_JS_CHARACTER_0990
* @tc.name test getType interface with multi space param
* @tc.desc check the getType interface
*/
it
(
'
i18n_test_character_0990
'
,
0
,
function
()
{
console
.
log
(
'
i18n_test_character_0990
'
+
'
start
'
);
let
value
=
I18n
.
Character
.
getType
(
'
'
);
console
.
log
(
'
i18n_test_character_0990
'
+
value
);
expect
(
value
).
assertEqual
(
'
U_SPACE_SEPARATOR
'
);
})
console
.
log
(
'
*************end I18NTest*************
'
);
console
.
log
(
'
*************end I18NTest*************
'
);
})
})
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录