Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
31d61ec3
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看板
未验证
提交
31d61ec3
编写于
11月 23, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 23, 2022
浏览文件
操作
浏览文件
下载
差异文件
!6635 Modify the test case of rationalnumber and some test case names
Merge pull request !6635 from jiangkai43/master
上级
f29a754e
1ec68330
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
10 addition
and
20 deletion
+10
-20
commonlibrary/ets_utils/util2_lib_standard/src/main/js/test/util.test.js
...ts_utils/util2_lib_standard/src/main/js/test/util.test.js
+8
-12
commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js
...ets_utils/util_lib_standard/src/main/js/test/util.test.js
+2
-8
未找到文件。
commonlibrary/ets_utils/util2_lib_standard/src/main/js/test/util.test.js
浏览文件 @
31d61ec3
...
...
@@ -14,10 +14,6 @@
*/
import
{
describe
,
beforeAll
,
beforeEach
,
afterEach
,
afterAll
,
it
,
expect
}
from
'
@ohos/hypium
'
import
util
from
'
@ohos.util
'
import
url
from
'
@ohos.url
'
import
app
from
'
@system.app
'
import
process
from
'
@ohos.process
'
import
file
from
'
@system.file
'
;
class
Temperature
{
constructor
(
value
)
{
...
...
@@ -3317,7 +3313,7 @@ describe('FunctionTest', function () {
})
/**
* @tc.name: testUtilformat001
* @tc.name: testUtilformat
ThrowError
001
* @tc.desc: Returns the formatted string.
*/
it
(
'
testUtilformatThrowError001
'
,
0
,
function
()
{
...
...
@@ -4112,11 +4108,11 @@ describe('Base64HelperTest', function () {
})
/**
* @tc.name: test_encodeSync_base64_
005
* @tc.name: test_encodeSync_base64_
throwError_001
* @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8
array using the Base64 encoding scheme.
*/
it
(
'
test_encodeSync_base64_
005
'
,
0
,
async
function
()
{
it
(
'
test_encodeSync_base64_
throwError_001
'
,
0
,
async
function
()
{
try
{
var
that
=
new
util
.
Base64Helper
()
var
array
=
new
Uint32Array
([
66
,
97
,
115
,
101
,
54
,
52
]);
...
...
@@ -4365,11 +4361,11 @@ describe('Base64HelperTest', function () {
})
/**
* @tc.name: test_decode_base64_
01
1
* @tc.name: test_decode_base64_
throwError_00
1
* @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8
array into a newly allocated u8 array.
*/
it
(
'
test_decode_base64_
006
'
,
0
,
async
function
()
{
it
(
'
test_decode_base64_
throwError_001
'
,
0
,
async
function
()
{
try
{
var
that
=
new
util
.
Base64Helper
()
var
array
=
new
Uint16Array
([
99
,
122
,
69
,
122
]);
...
...
@@ -4467,10 +4463,10 @@ describe('DecodeEncodeTest', function () {
})
/**
* @tc.name: testencoding_textdecoder_ThrowError_00
2
* @tc.name: testencoding_textdecoder_ThrowError_00
3
* @tc.desc: The source encoding's name, lowercased.
*/
it
(
'
testencoding_textdecoder_ThrowError_00
2
'
,
0
,
function
()
{
it
(
'
testencoding_textdecoder_ThrowError_00
3
'
,
0
,
function
()
{
try
{
var
that
=
new
util
.
TextDecoder
()
that
.
create
(
'
utf-16be
'
,
123
)
...
...
@@ -4598,7 +4594,7 @@ describe('DecodeEncodeTest', function () {
* @tc.name: testEncodeInto010
* @tc.desc: Returns the result of encoder for GB18030.
*/
it
(
'
testEncodeInto0
0
10
'
,
0
,
function
()
{
it
(
'
testEncodeInto010
'
,
0
,
function
()
{
let
that
=
new
util
.
TextEncoder
(
'
GB18030
'
)
let
buffer
=
new
ArrayBuffer
(
20
)
let
result
=
new
Uint8Array
(
buffer
)
...
...
commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js
浏览文件 @
31d61ec3
...
...
@@ -46,12 +46,6 @@ var rangeSec = new util.Scope(tempLess, tempMore);
var
rangeThi
=
new
util
.
Scope
(
tempLess
,
tempMiDF
);
var
rangeFif
=
new
util
.
Scope
(
tempMiDF
,
tempMore
);
var
rangeHp
=
new
util
.
ScopeHelper
(
tempLower
,
tempUpper
);
var
rangeHpFir
=
new
util
.
ScopeHelper
(
tempMiDF
,
tempMidS
);
var
rangeHpSec
=
new
util
.
ScopeHelper
(
tempLess
,
tempMore
);
var
rangeHpThi
=
new
util
.
ScopeHelper
(
tempLess
,
tempMiDF
);
var
rangeHpFif
=
new
util
.
ScopeHelper
(
tempMiDF
,
tempMore
);
export
default
function
UtilFunTest
()
{
describe
(
'
TextEncoderTest
'
,
function
()
{
...
...
@@ -2448,9 +2442,9 @@ describe('RationalNumberFunTest', function () {
*/
it
(
'
test_createRationalFromString_005
'
,
0
,
function
()
{
var
pro
=
new
util
.
RationalNumber
(
1
,
2
)
var
res
=
pro
.
createRationalFromString
(
'
+
2:-4
'
)
var
res
=
pro
.
createRationalFromString
(
'
-
2:-4
'
)
var
result1
=
res
.
valueOf
()
expect
(
result1
).
assertEqual
(
-
0.5
)
expect
(
result1
).
assertEqual
(
0.5
)
})
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录