Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
13a4a00f
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
13a4a00f
编写于
8月 11, 2022
作者:
C
chenxuihui
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bytrace bug fix
Signed-off-by:
N
chenxuihui
<
chenxuhui2@huawei.com
>
上级
04bd3412
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
36 addition
and
18 deletion
+36
-18
hiviewdfx/bytracetest/src/main/js/test/bytrace_test.js
hiviewdfx/bytracetest/src/main/js/test/bytrace_test.js
+36
-18
未找到文件。
hiviewdfx/bytracetest/src/main/js/test/bytrace_test.js
浏览文件 @
13a4a00f
...
...
@@ -47,6 +47,7 @@ describe("BytraceTest", function () {
it
(
"
DFX_DFR_Bytrace_0200
"
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------DFX_DFR_Bytrace_0200 start------
"
);
// Normal condition
let
flag
=
false
;
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0200 1 start
"
);
bytrace
.
startTrace
(
"
test2
"
,
222
);
...
...
@@ -61,31 +62,36 @@ describe("BytraceTest", function () {
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0200 2 start
"
);
bytrace
.
startTrace
(
"
test2
"
);
expect
(
f
alse
).
assertTru
e
();
expect
(
f
lag
).
assertFals
e
();
}
catch
(
err
)
{
flag
=
true
;
console
.
info
(
"
DFX_DFR_Bytrace_0200 2 fail!
"
);
console
.
info
(
"
DFX_DFR_Bytrace_0200 2 err =
"
+
err
);
expect
(
true
).
assertTrue
();
expect
(
flag
).
assertTrue
();
}
// Abnormal condition, Pass multiple parameters
flag
=
false
;
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0200 3 start
"
);
bytrace
.
startTrace
(
"
test2
"
,
222
,
2000
,
2
);
expect
(
f
alse
).
assertTru
e
();
expect
(
f
lag
).
assertFals
e
();
}
catch
(
err
)
{
flag
=
true
;
console
.
info
(
"
DFX_DFR_Bytrace_0200 3 fail!
"
);
console
.
info
(
"
DFX_DFR_Bytrace_0200 3 err =
"
+
err
);
expect
(
true
).
assertTrue
();
expect
(
flag
).
assertTrue
();
}
// Abnormal condition, Parameter format mismatch
flag
=
false
;
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0200 4 start
"
);
bytrace
.
startTrace
(
2
,
"
222
"
,
"
2000
"
);
expect
(
f
alse
).
assertTru
e
();
expect
(
f
lag
).
assertFals
e
();
}
catch
(
err
)
{
flag
=
true
;
console
.
info
(
"
DFX_DFR_Bytrace_0200 4 fail!
"
);
console
.
info
(
"
DFX_DFR_Bytrace_0200 4 err =
"
+
err
);
expect
(
true
).
assertTrue
();
expect
(
flag
).
assertTrue
();
}
console
.
info
(
"
------DFX_DFR_Bytrace_0200 end------
"
);
done
();
...
...
@@ -94,6 +100,7 @@ describe("BytraceTest", function () {
it
(
"
DFX_DFR_Bytrace_0300
"
,
0
,
async
function
(
done
)
{
console
.
info
(
"
------DFX_DFR_Bytrace_0300 start------
"
);
// Normal condition
let
flag
=
false
;
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0300 1 start
"
)
bytrace
.
finishTrace
(
"
test3
"
,
111
);
...
...
@@ -108,31 +115,36 @@ describe("BytraceTest", function () {
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0300 2 start
"
)
bytrace
.
finishTrace
(
"
test3
"
);
expect
(
f
alse
).
assertTru
e
();
expect
(
f
lag
).
assertFals
e
();
}
catch
(
err
)
{
flag
=
true
;
console
.
info
(
"
DFX_DFR_Bytrace_0300 2 fail!
"
);
console
.
info
(
"
DFX_DFR_Bytrace_0300 2 err =
"
+
err
);
expect
(
true
).
assertTrue
();
expect
(
flag
).
assertTrue
();
}
// Abnormal condition, Pass multiple parameters
flag
=
false
;
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0300 3 start
"
)
bytrace
.
finishTrace
(
"
test3
"
,
1
,
1
);
expect
(
f
alse
).
assertTru
e
();
expect
(
f
lag
).
assertFals
e
();
}
catch
(
err
)
{
flag
=
true
;
console
.
info
(
"
DFX_DFR_Bytrace_0300 3 fail!
"
);
console
.
info
(
"
DFX_DFR_Bytrace_0300 3 err =
"
+
err
);
expect
(
true
).
assertTrue
();
expect
(
flag
).
assertTrue
();
}
// Abnormal condition, Parameter format mismatch
flag
=
false
;
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0300 4 start
"
)
bytrace
.
finishTrace
(
1
,
"
123
"
);
expect
(
f
alse
).
assertTru
e
();
expect
(
f
lag
).
assertFals
e
();
}
catch
(
err
)
{
flag
=
true
;
console
.
info
(
"
DFX_DFR_Bytrace_0300 4 fail!
"
);
console
.
info
(
"
DFX_DFR_Bytrace_0300 4 err =
"
+
err
);
expect
(
true
).
assertTrue
();
expect
(
flag
).
assertTrue
();
}
console
.
info
(
"
------DFX_DFR_Bytrace_0300 end------
"
);
done
();
...
...
@@ -152,6 +164,7 @@ describe("BytraceTest", function () {
it
(
"
DFX_DFR_Bytrace_0500
"
,
0
,
async
function
(
done
)
{
console
.
info
(
"
-------DFX_DFR_Bytrace_0500 start--------
"
);
// Normal condition
let
flag
=
false
;
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0500 1 start
"
)
bytrace
.
traceByValue
(
"
test5
"
,
5
);
...
...
@@ -166,31 +179,36 @@ describe("BytraceTest", function () {
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0500 2 start
"
)
bytrace
.
traceByValue
(
"
test5
"
);
expect
(
f
alse
).
assertTru
e
();
expect
(
f
lag
).
assertFals
e
();
}
catch
(
err
)
{
flag
=
true
;
console
.
info
(
"
DFX_DFR_Bytrace_0500 2 fail!
"
);
console
.
info
(
"
DFX_DFR_Bytrace_0500 2 err =
"
+
err
);
expect
(
true
).
assertTrue
();
expect
(
flag
).
assertTrue
();
}
// Abnormal condition, Pass multiple parameters
flag
=
false
;
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0500 3 start
"
)
bytrace
.
traceByValue
(
"
test5
"
,
3
,
1
);
expect
(
f
alse
).
assertTru
e
();
expect
(
f
lag
).
assertFals
e
();
}
catch
(
err
)
{
flag
=
true
;
console
.
info
(
"
DFX_DFR_Bytrace_0500 3 fail!
"
);
console
.
info
(
"
DFX_DFR_Bytrace_0500 3 err =
"
+
err
);
expect
(
true
).
assertTrue
();
expect
(
flag
).
assertTrue
();
}
// Abnormal condition, Parameter format mismatch
flag
=
false
;
try
{
console
.
info
(
"
DFX_DFR_Bytrace_0500 4 start
"
)
bytrace
.
traceByValue
(
1
,
"
123
"
);
expect
(
f
alse
).
assertTru
e
();
expect
(
f
lag
).
assertFals
e
();
}
catch
(
err
)
{
flag
=
true
;
console
.
info
(
"
DFX_DFR_Bytrace_0500 4 fail!
"
);
console
.
info
(
"
DFX_DFR_Bytrace_0500 4 err =
"
+
err
);
expect
(
true
).
assertTrue
();
expect
(
flag
).
assertTrue
();
}
console
.
info
(
"
------DFX_DFR_Bytrace_0500 end------
"
);
done
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录