Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
3afbfb9b
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看板
提交
3afbfb9b
编写于
7月 09, 2021
作者:
O
openharmony_ci
提交者:
Gitee
7月 09, 2021
浏览文件
操作
浏览文件
下载
差异文件
!310 修改hilog删除-M功能导致用例执行失败的问题
Merge pull request !310 from 土行孙/master
上级
5e190b12
bd7eda37
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
83 addition
and
83 deletion
+83
-83
hiviewdfx/hilogtest/libhilogtest/libhilogCPPtest/LibhilogCPPtest.cpp
...ilogtest/libhilogtest/libhilogCPPtest/LibhilogCPPtest.cpp
+42
-42
hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp
...fx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp
+41
-41
未找到文件。
hiviewdfx/hilogtest/libhilogtest/libhilogCPPtest/LibhilogCPPtest.cpp
浏览文件 @
3afbfb9b
...
@@ -77,11 +77,11 @@ HWTEST_F(LibhilogCPPtest, HILOG_INFO_CPP, Function|MediumTest|Level2)
...
@@ -77,11 +77,11 @@ HWTEST_F(LibhilogCPPtest, HILOG_INFO_CPP, Function|MediumTest|Level2)
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"I 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
std
::
string
expected
{
"I 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
/**
/**
* @tc.name Provides user-mode interfaces(CPP)debug
* @tc.name Provides user-mode interfaces(CPP)debug
...
@@ -103,7 +103,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_DEBUG_CPP, Function|MediumTest|Level0)
...
@@ -103,7 +103,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_DEBUG_CPP, Function|MediumTest|Level0)
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"D 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
std
::
string
expected
{
"D 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -L D -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -L D -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
...
@@ -129,7 +129,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_WARNING_CPP, Function|MediumTest|Level2)
...
@@ -129,7 +129,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_WARNING_CPP, Function|MediumTest|Level2)
"%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"W 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
std
::
string
expected
{
"W 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
...
@@ -155,7 +155,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_ERROR_CPP, Function|MediumTest|Level2)
...
@@ -155,7 +155,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_ERROR_CPP, Function|MediumTest|Level2)
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"E 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
std
::
string
expected
{
"E 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
...
@@ -181,7 +181,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FATAL_CPP, Function|MediumTest|Level2)
...
@@ -181,7 +181,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FATAL_CPP, Function|MediumTest|Level2)
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"F 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
std
::
string
expected
{
"F 03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST: \
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogHWTEST_Fis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
...
@@ -204,7 +204,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_CPP, Function|MediumTest|Level3)
...
@@ -204,7 +204,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"INTEGER:%{private}d,%{public}d,%d;"
,
1
,
1
,
1
);
HiLog
::
Fatal
(
a
,
"INTEGER:%{private}d,%{public}d,%d;"
,
1
,
1
,
1
);
std
::
string
expected
{
"INTEGER:<private>,1,<private>;"
};
std
::
string
expected
{
"INTEGER:<private>,1,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -225,7 +225,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_LONG_CPP, Function|MediumTest|Level3)
...
@@ -225,7 +225,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_LONG_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"INTEGER_long:%{private}ld,%{public}ld,%ld;"
,
2147483647L
,
2147483647L
,
2147483647L
);
HiLog
::
Fatal
(
a
,
"INTEGER_long:%{private}ld,%{public}ld,%ld;"
,
2147483647L
,
2147483647L
,
2147483647L
);
std
::
string
expected
{
"INTEGER_long:<private>,2147483647,<private>;"
};
std
::
string
expected
{
"INTEGER_long:<private>,2147483647,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -246,7 +246,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_4_CPP, Function|MediumTest|Level3)
...
@@ -246,7 +246,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_4_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"INTEGER_4:%{private}4d,%{public}4d,%4d;"
,
2000
,
2000
,
2000
);
HiLog
::
Fatal
(
a
,
"INTEGER_4:%{private}4d,%{public}4d,%4d;"
,
2000
,
2000
,
2000
);
std
::
string
expected
{
"INTEGER_4:<private>,2000,<private>;"
};
std
::
string
expected
{
"INTEGER_4:<private>,2000,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -267,7 +267,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_SHORT_CPP, Function|MediumTest|Level3)
...
@@ -267,7 +267,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_SHORT_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"INTEGER_short:%{private}hd,%{public}hd,%hd;"
,
(
short
)
1024
,
(
short
)
1024
,
(
short
)
1024
);
HiLog
::
Fatal
(
a
,
"INTEGER_short:%{private}hd,%{public}hd,%hd;"
,
(
short
)
1024
,
(
short
)
1024
,
(
short
)
1024
);
std
::
string
expected
{
"INTEGER_short:<private>,1024,<private>;"
};
std
::
string
expected
{
"INTEGER_short:<private>,1024,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -288,7 +288,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_UN_CPP, Function|MediumTest|Level3)
...
@@ -288,7 +288,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_UN_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"INTEGER_un:%{private}u,%{public}u,%u;"
,
2147483647u
,
2147483647u
,
2147483647u
);
HiLog
::
Fatal
(
a
,
"INTEGER_un:%{private}u,%{public}u,%u;"
,
2147483647u
,
2147483647u
,
2147483647u
);
std
::
string
expected
{
"INTEGER_un:<private>,2147483647,<private>;"
};
std
::
string
expected
{
"INTEGER_un:<private>,2147483647,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -309,7 +309,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_LONG_UN_CPP, Function|MediumTest|Level3)
...
@@ -309,7 +309,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_LONG_UN_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"INTEGER_long_un:%{private}lu,%{public}lu,%lu;"
,
7483647ul
,
2147483647ul
,
2147483647ul
);
HiLog
::
Fatal
(
a
,
"INTEGER_long_un:%{private}lu,%{public}lu,%lu;"
,
7483647ul
,
2147483647ul
,
2147483647ul
);
std
::
string
expected
{
"INTEGER_long_un:<private>,2147483647,<private>;"
};
std
::
string
expected
{
"INTEGER_long_un:<private>,2147483647,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -330,7 +330,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_4_UN_CPP, Function|MediumTest|Level3)
...
@@ -330,7 +330,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_4_UN_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"INTEGER_4_un:%{private}4u,%{public}4u,%4u;"
,
4000
,
4000
,
4000
);
HiLog
::
Fatal
(
a
,
"INTEGER_4_un:%{private}4u,%{public}4u,%4u;"
,
4000
,
4000
,
4000
);
std
::
string
expected
{
"INTEGER_4_un:<private>,4000,<private>;"
};
std
::
string
expected
{
"INTEGER_4_un:<private>,4000,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -352,7 +352,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_SHORT_UN_CPP, Function|MediumTest|Level3
...
@@ -352,7 +352,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_INTEGER_SHORT_UN_CPP, Function|MediumTest|Level3
HiLog
::
Fatal
(
a
,
"INTEGER_short_un:%{private}hu,%{public}hu,%hu;"
,
(
unsigned
short
)
65535
,
HiLog
::
Fatal
(
a
,
"INTEGER_short_un:%{private}hu,%{public}hu,%hu;"
,
(
unsigned
short
)
65535
,
(
unsigned
short
)
65535
,
(
unsigned
short
)
65535
);
(
unsigned
short
)
65535
,
(
unsigned
short
)
65535
);
std
::
string
expected
{
"INTEGER_short_un:<private>,65535,<private>;"
};
std
::
string
expected
{
"INTEGER_short_un:<private>,65535,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -373,7 +373,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FLOAT_CPP, Function|MediumTest|Level3)
...
@@ -373,7 +373,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FLOAT_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"FLOAT:%{private}f,%{public}f,%f;"
,
1.01
,
1.01
,
1.01
);
HiLog
::
Fatal
(
a
,
"FLOAT:%{private}f,%{public}f,%f;"
,
1.01
,
1.01
,
1.01
);
std
::
string
expected
{
"FLOAT:<private>,1.010000,<private>;"
};
std
::
string
expected
{
"FLOAT:<private>,1.010000,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -394,7 +394,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FLOAT_LONG_CPP, Function|MediumTest|Level3)
...
@@ -394,7 +394,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FLOAT_LONG_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"FLOAT_long:%{private}lf,%{public}lf,%lf;"
,
2.147483647
,
2.147483647
,
2.147483647
);
HiLog
::
Fatal
(
a
,
"FLOAT_long:%{private}lf,%{public}lf,%lf;"
,
2.147483647
,
2.147483647
,
2.147483647
);
std
::
string
expected
{
"FLOAT_long:<private>,2.147484,<private>;"
};
std
::
string
expected
{
"FLOAT_long:<private>,2.147484,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -417,7 +417,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FLOAT_POINT2_CPP, Function|MediumTest|Level3)
...
@@ -417,7 +417,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FLOAT_POINT2_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"FLOAT_.2:%{private}.2f,%{public}.2f,%.2f;"
,
2.147483647
,
2.147483647
,
2.147483647
);
HiLog
::
Fatal
(
a
,
"FLOAT_.2:%{private}.2f,%{public}.2f,%.2f;"
,
2.147483647
,
2.147483647
,
2.147483647
);
std
::
string
expected
{
"FLOAT_.2:<private>,2.15,<private>;"
};
std
::
string
expected
{
"FLOAT_.2:<private>,2.15,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -440,7 +440,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FLOAT_3POINT2_CPP, Function|MediumTest|Level3)
...
@@ -440,7 +440,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_FLOAT_3POINT2_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"FLOAT_3.2:%{private}3.2f,%{public}4.1f,%2.6f;"
,
32.147483647
,
321.147483647
,
23.147483647
);
HiLog
::
Fatal
(
a
,
"FLOAT_3.2:%{private}3.2f,%{public}4.1f,%2.6f;"
,
32.147483647
,
321.147483647
,
23.147483647
);
std
::
string
expected
{
"FLOAT_3.2:<private>,321.1,<private>;"
};
std
::
string
expected
{
"FLOAT_3.2:<private>,321.1,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -461,7 +461,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_CHAR_CPP, Function|MediumTest|Level3)
...
@@ -461,7 +461,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_CHAR_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"CHAR:%{private}c,%{public}c,%c;"
,
'a'
,
'b'
,
'c'
);
HiLog
::
Fatal
(
a
,
"CHAR:%{private}c,%{public}c,%c;"
,
'a'
,
'b'
,
'c'
);
std
::
string
expected
{
"CHAR:<private>,b,<private>;"
};
std
::
string
expected
{
"CHAR:<private>,b,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -482,7 +482,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_OCTAL_CPP, Function|MediumTest|Level3)
...
@@ -482,7 +482,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_OCTAL_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"OCTAL:%{private}o,%{public}o,%o;"
,
15
,
16
,
17
);
HiLog
::
Fatal
(
a
,
"OCTAL:%{private}o,%{public}o,%o;"
,
15
,
16
,
17
);
std
::
string
expected
{
"OCTAL:<private>,20,<private>;"
};
std
::
string
expected
{
"OCTAL:<private>,20,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -503,7 +503,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_OCTAL_LONG_CPP, Function|MediumTest|Level3)
...
@@ -503,7 +503,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_OCTAL_LONG_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"OCTAL_long:%{private}lo,%{public}lo,%lo;"
,
18ul
,
19ul
,
20ul
);
HiLog
::
Fatal
(
a
,
"OCTAL_long:%{private}lo,%{public}lo,%lo;"
,
18ul
,
19ul
,
20ul
);
std
::
string
expected
{
"OCTAL_long:<private>,23,<private>;"
};
std
::
string
expected
{
"OCTAL_long:<private>,23,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -524,7 +524,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_CPP, Function|MediumTest|Level3)
...
@@ -524,7 +524,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"HEX:%{private}x,%{public}x,%x;"
,
15
,
16
,
17
);
HiLog
::
Fatal
(
a
,
"HEX:%{private}x,%{public}x,%x;"
,
15
,
16
,
17
);
std
::
string
expected
{
"HEX:<private>,10,<private>;"
};
std
::
string
expected
{
"HEX:<private>,10,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -545,7 +545,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_UPPER_CPP, Function|MediumTest|Level3)
...
@@ -545,7 +545,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_UPPER_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"HEX_#:%{private}#x,%{public}#x,%#x;"
,
18
,
19
,
20
);
HiLog
::
Fatal
(
a
,
"HEX_#:%{private}#x,%{public}#x,%#x;"
,
18
,
19
,
20
);
std
::
string
expected
{
"HEX_#:<private>,0x13,<private>;"
};
std
::
string
expected
{
"HEX_#:<private>,0x13,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -568,7 +568,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_LONG_CPP, Function|MediumTest|Level3)
...
@@ -568,7 +568,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_LONG_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"HEX_long:%{private}lx,%{public}lx,%lx;"
,
21l
,
22l
,
23l
);
HiLog
::
Fatal
(
a
,
"HEX_long:%{private}lx,%{public}lx,%lx;"
,
21l
,
22l
,
23l
);
std
::
string
expected
{
"HEX_long:<private>,16,<private>;"
};
std
::
string
expected
{
"HEX_long:<private>,16,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -591,7 +591,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_X_CPP, Function|MediumTest|Level3)
...
@@ -591,7 +591,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_X_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"HEX_X:%{private}X,%{public}X,%X;"
,
24u
,
25u
,
26u
);
HiLog
::
Fatal
(
a
,
"HEX_X:%{private}X,%{public}X,%X;"
,
24u
,
25u
,
26u
);
std
::
string
expected
{
"HEX_X:<private>,19,<private>;"
};
std
::
string
expected
{
"HEX_X:<private>,19,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -614,7 +614,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_UPPER_X_CPP, Function|MediumTest|Level3)
...
@@ -614,7 +614,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_UPPER_X_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"HEX_#X:%{private}#X,%{public}#X,%#X;"
,
27
,
28
,
28
);
HiLog
::
Fatal
(
a
,
"HEX_#X:%{private}#X,%{public}#X,%#X;"
,
27
,
28
,
28
);
std
::
string
expected
{
"HEX_#X:<private>,0X1C,<private>;"
};
std
::
string
expected
{
"HEX_#X:<private>,0X1C,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -637,7 +637,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_LONG_UPPER_X_CPP, Function|MediumTest|Level3
...
@@ -637,7 +637,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_HEX_LONG_UPPER_X_CPP, Function|MediumTest|Level3
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"HEX_long_X:%{private}lX,%{public}lX,%lX;"
,
30ul
,
31ul
,
32ul
);
HiLog
::
Fatal
(
a
,
"HEX_long_X:%{private}lX,%{public}lX,%lX;"
,
30ul
,
31ul
,
32ul
);
std
::
string
expected
{
"HEX_long_X:<private>,1F,<private>;"
};
std
::
string
expected
{
"HEX_long_X:<private>,1F,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -658,7 +658,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_STR_CPP, Function|MediumTest|Level3)
...
@@ -658,7 +658,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_STR_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"STRING:%{private}s,%{public}s,%s;"
,
"STRING1"
,
"STRING2"
,
"STRING3"
);
HiLog
::
Fatal
(
a
,
"STRING:%{private}s,%{public}s,%s;"
,
"STRING1"
,
"STRING2"
,
"STRING3"
);
std
::
string
expected
{
"STRING:<private>,STRING2,<private>;"
};
std
::
string
expected
{
"STRING:<private>,STRING2,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -679,7 +679,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_STR_EMPTY_CPP, Function|MediumTest|Level3)
...
@@ -679,7 +679,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_STR_EMPTY_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"STRING_empty:%{private}s,%{public}s,%s;"
,
""
,
""
,
""
);
HiLog
::
Fatal
(
a
,
"STRING_empty:%{private}s,%{public}s,%s;"
,
""
,
""
,
""
);
std
::
string
expected
{
"STRING_empty:<private>,,<private>;"
};
std
::
string
expected
{
"STRING_empty:<private>,,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -700,7 +700,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_STR_CHINESE_CPP, Function|MediumTest|Level3)
...
@@ -700,7 +700,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_STR_CHINESE_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"STRING_Chinese:%{private}s,%{public}s,%s;"
,
"中文"
,
"中文"
,
"中文"
);
HiLog
::
Fatal
(
a
,
"STRING_Chinese:%{private}s,%{public}s,%s;"
,
"中文"
,
"中文"
,
"中文"
);
std
::
string
expected
{
"STRING_Chinese:<private>,中文,<private>;"
};
std
::
string
expected
{
"STRING_Chinese:<private>,中文,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -721,7 +721,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_E_DOUBLE_CPP, Function|MediumTest|Level3)
...
@@ -721,7 +721,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_E_DOUBLE_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"DOUBLE_e:%{private}e,%{public}e,%e;"
,
1e-30
,
2.231e10
,
3.999e-13
);
HiLog
::
Fatal
(
a
,
"DOUBLE_e:%{private}e,%{public}e,%e;"
,
1e-30
,
2.231e10
,
3.999e-13
);
std
::
string
expected
{
"DOUBLE_e:<private>,2.231000e+10,<private>;"
};
std
::
string
expected
{
"DOUBLE_e:<private>,2.231000e+10,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -744,7 +744,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_E_UPPER_DOUBLE_CPP, Function|MediumTest|Level3)
...
@@ -744,7 +744,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_E_UPPER_DOUBLE_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"DOUBLE_E:%{private}E,%{public}E,%E;"
,
4.88E2
,
5.676767e-2
,
6.17E13
);
HiLog
::
Fatal
(
a
,
"DOUBLE_E:%{private}E,%{public}E,%E;"
,
4.88E2
,
5.676767e-2
,
6.17E13
);
std
::
string
expected
{
"DOUBLE_E:<private>,5.676767E-02,<private>;"
};
std
::
string
expected
{
"DOUBLE_E:<private>,5.676767E-02,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -767,7 +767,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_E_AUTO_CPP, Function|MediumTest|Level3)
...
@@ -767,7 +767,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_E_AUTO_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"AUTO:%{private}g,%{public}g,%g;"
,
1e-30
,
2.231e10
,
3.999e-13
);
HiLog
::
Fatal
(
a
,
"AUTO:%{private}g,%{public}g,%g;"
,
1e-30
,
2.231e10
,
3.999e-13
);
std
::
string
expected
{
"AUTO:<private>,2.231e+10,<private>;"
};
std
::
string
expected
{
"AUTO:<private>,2.231e+10,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -790,7 +790,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_E_UPPER_AUTO_CPP, Function|MediumTest|Level3)
...
@@ -790,7 +790,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_E_UPPER_AUTO_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"AUTO_E:%{private}G,%{public}G,%G;"
,
4.88E2
,
5.676767e-2
,
6.17E13
);
HiLog
::
Fatal
(
a
,
"AUTO_E:%{private}G,%{public}G,%G;"
,
4.88E2
,
5.676767e-2
,
6.17E13
);
std
::
string
expected
{
"AUTO_E:<private>,0.0567677,<private>;"
};
std
::
string
expected
{
"AUTO_E:<private>,0.0567677,<private>;"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -812,7 +812,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_PRIVATE_CPP, Function|MediumTest|Level3)
...
@@ -812,7 +812,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_PRIVATE_CPP, Function|MediumTest|Level3)
HiLog
::
Fatal
(
a
,
"private:%{private}d,%{private}lf,%{private}.2f,%{private}s,%{private}c"
,
HiLog
::
Fatal
(
a
,
"private:%{private}d,%{private}lf,%{private}.2f,%{private}s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"private:<private>,<private>,<private>,<private>,<private>"
};
std
::
string
expected
{
"private:<private>,<private>,<private>,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -834,7 +834,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_PUBLIC_CPP, Function|MediumTest|Level3)
...
@@ -834,7 +834,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_PUBLIC_CPP, Function|MediumTest|Level3)
HiLog
::
Fatal
(
a
,
"public:%{public}d,%{public}lf,%{public}.2f,%{public}s,%{public}c"
,
HiLog
::
Fatal
(
a
,
"public:%{public}d,%{public}lf,%{public}.2f,%{public}s,%{public}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"public:1,1.000010,2.33,sse,a"
};
std
::
string
expected
{
"public:1,1.000010,2.33,sse,a"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -855,7 +855,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_NO_SIGN_CPP, Function|MediumTest|Level3)
...
@@ -855,7 +855,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_NO_SIGN_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"no_sign:%d,%lf,%.2f,%s,%c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HiLog
::
Fatal
(
a
,
"no_sign:%d,%lf,%.2f,%s,%c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"no_sign:<private>,<private>,<private>,<private>,<private>"
};
std
::
string
expected
{
"no_sign:<private>,<private>,<private>,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -878,7 +878,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_MIX_CPP, Function|MediumTest|Level3)
...
@@ -878,7 +878,7 @@ HWTEST_F(LibhilogCPPtest, HILOG_MIX_CPP, Function|MediumTest|Level3)
a
.
tag
=
tag
;
a
.
tag
=
tag
;
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"MIX:1,<private>,2.33,<private>,<private>"
};
std
::
string
expected
{
"MIX:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -899,7 +899,7 @@ HWTEST_F(LibhilogCPPtest, TAG_CHECK_CPP, Function|MediumTest|Level2)
...
@@ -899,7 +899,7 @@ HWTEST_F(LibhilogCPPtest, TAG_CHECK_CPP, Function|MediumTest|Level2)
a
.
tag
=
tagNormal
;
a
.
tag
=
tagNormal
;
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST:"
};
std
::
string
expected
{
"03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST:"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -921,7 +921,7 @@ HWTEST_F(LibhilogCPPtest, TAG_OVER_CHECK_CPP, Function|MediumTest|Level2)
...
@@ -921,7 +921,7 @@ HWTEST_F(LibhilogCPPtest, TAG_OVER_CHECK_CPP, Function|MediumTest|Level2)
a
.
tag
=
tagToolong
;
a
.
tag
=
tagToolong
;
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST_:"
};
std
::
string
expected
{
"03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST_:"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST_/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST_
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -942,7 +942,7 @@ HWTEST_F(LibhilogCPPtest, DOMAIN_CHECK_CPP, Function|MediumTest|Level1)
...
@@ -942,7 +942,7 @@ HWTEST_F(LibhilogCPPtest, DOMAIN_CHECK_CPP, Function|MediumTest|Level1)
a
.
tag
=
tagNormal
;
a
.
tag
=
tagNormal
;
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"01111/HWTEST_Ftag0HWTEST_Ftag0HWTEST:"
};
std
::
string
expected
{
"01111/HWTEST_Ftag0HWTEST_Ftag0HWTEST:"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -963,6 +963,6 @@ HWTEST_F(LibhilogCPPtest, TYPE_APP_CHECK_CPP, Function|MediumTest|Level2)
...
@@ -963,6 +963,6 @@ HWTEST_F(LibhilogCPPtest, TYPE_APP_CHECK_CPP, Function|MediumTest|Level2)
a
.
tag
=
tagNormal
;
a
.
tag
=
tagNormal
;
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HiLog
::
Fatal
(
a
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST:"
};
std
::
string
expected
{
"03200/HWTEST_Ftag0HWTEST_Ftag0HWTEST:"
};
CmdRun
(
"hilog -x
-M ///HWTEST_Ftag0HWTEST_Ftag0HWTEST/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep HWTEST_Ftag0HWTEST_Ftag0HWTEST
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
hiviewdfx/hilogtest/libhilogtest/libhilogCtest/libhilogCtest.cpp
浏览文件 @
3afbfb9b
...
@@ -74,7 +74,7 @@ HWTEST_F(LibhilogCtest, HILOG_INFO, Function|MediumTest|Level2)
...
@@ -74,7 +74,7 @@ HWTEST_F(LibhilogCtest, HILOG_INFO, Function|MediumTest|Level2)
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"I 03e00/testtag0testtag0testtag0testta: \
std
::
string
expected
{
"I 03e00/testtag0testtag0testtag0testta: \
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"cmdRunResult = "
+
cmdRunResult
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
std
::
cout
<<
"expected = "
+
expected
<<
std
::
endl
;
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
...
@@ -94,7 +94,7 @@ HWTEST_F(LibhilogCtest, HILOG_DEBUG, Function|MediumTest|Level1)
...
@@ -94,7 +94,7 @@ HWTEST_F(LibhilogCtest, HILOG_DEBUG, Function|MediumTest|Level1)
"%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"D 03e00/testtag0testtag0testtag0testta: \
std
::
string
expected
{
"D 03e00/testtag0testtag0testtag0testta: \
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -112,7 +112,7 @@ HWTEST_F(LibhilogCtest, HILOG_WARNING, Function|MediumTest|Level2)
...
@@ -112,7 +112,7 @@ HWTEST_F(LibhilogCtest, HILOG_WARNING, Function|MediumTest|Level2)
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{private}lf,%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"W 03e00/testtag0testtag0testtag0testta: \
std
::
string
expected
{
"W 03e00/testtag0testtag0testtag0testta: \
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -130,7 +130,7 @@ HWTEST_F(LibhilogCtest, HILOG_ERROR, Function|MediumTest|Level2)
...
@@ -130,7 +130,7 @@ HWTEST_F(LibhilogCtest, HILOG_ERROR, Function|MediumTest|Level2)
"%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"E 03e00/testtag0testtag0testtag0testta: \
std
::
string
expected
{
"E 03e00/testtag0testtag0testtag0testta: \
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -148,7 +148,7 @@ HWTEST_F(LibhilogCtest, HILOG_FATAL, Function|MediumTest|Level2)
...
@@ -148,7 +148,7 @@ HWTEST_F(LibhilogCtest, HILOG_FATAL, Function|MediumTest|Level2)
"%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{public}.2f,%s,%{private}c"
,
i
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"F 03e00/testtag0testtag0testtag0testta: \
std
::
string
expected
{
"F 03e00/testtag0testtag0testtag0testta: \
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
123456789_1234567890_publicandprivatelogtestis:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -163,7 +163,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER, Function|MediumTest|Level3)
...
@@ -163,7 +163,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"INTEGER:%{private}d,%{public}d,%d;"
,
1
,
1
,
1
);
HILOG_FATAL
(
type
,
"INTEGER:%{private}d,%{public}d,%d;"
,
1
,
1
,
1
);
std
::
string
expected
{
"INTEGER:<private>,1,<private>;"
};
std
::
string
expected
{
"INTEGER:<private>,1,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -178,7 +178,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_LONG, Function|MediumTest|Level3)
...
@@ -178,7 +178,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_LONG, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"INTEGER_long:%{private}ld,%{public}ld,%ld;"
,
2147483647L
,
2147483647L
,
2147483647L
);
HILOG_FATAL
(
type
,
"INTEGER_long:%{private}ld,%{public}ld,%ld;"
,
2147483647L
,
2147483647L
,
2147483647L
);
std
::
string
expected
{
"INTEGER_long:<private>,2147483647,<private>;"
};
std
::
string
expected
{
"INTEGER_long:<private>,2147483647,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -193,7 +193,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_4, Function|MediumTest|Level3)
...
@@ -193,7 +193,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_4, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"INTEGER_4:%{private}4d,%{public}4d,%4d;"
,
2000
,
2000
,
2000
);
HILOG_FATAL
(
type
,
"INTEGER_4:%{private}4d,%{public}4d,%4d;"
,
2000
,
2000
,
2000
);
std
::
string
expected
{
"INTEGER_4:<private>,2000,<private>;"
};
std
::
string
expected
{
"INTEGER_4:<private>,2000,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -208,7 +208,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_SHORT, Function|MediumTest|Level3)
...
@@ -208,7 +208,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_SHORT, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"INTEGER_short:%{private}hd,%{public}hd,%hd;"
,
(
short
)
1024
,
(
short
)
1024
,
(
short
)
1024
);
HILOG_FATAL
(
type
,
"INTEGER_short:%{private}hd,%{public}hd,%hd;"
,
(
short
)
1024
,
(
short
)
1024
,
(
short
)
1024
);
std
::
string
expected
{
"INTEGER_short:<private>,1024,<private>;"
};
std
::
string
expected
{
"INTEGER_short:<private>,1024,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -223,7 +223,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_UN, Function|MediumTest|Level3)
...
@@ -223,7 +223,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_UN, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"INTEGER_un:%{private}u,%{public}u,%u;"
,
2147483647u
,
2147483647u
,
2147483647u
);
HILOG_FATAL
(
type
,
"INTEGER_un:%{private}u,%{public}u,%u;"
,
2147483647u
,
2147483647u
,
2147483647u
);
std
::
string
expected
{
"INTEGER_un:<private>,2147483647,<private>;"
};
std
::
string
expected
{
"INTEGER_un:<private>,2147483647,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -238,7 +238,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_LONG_UN, Function|MediumTest|Level3)
...
@@ -238,7 +238,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_LONG_UN, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"INTEGER_long_un:%{private}lu,%{public}lu,%lu;"
,
7483647lu
,
2147483647lu
,
2147483647lu
);
HILOG_FATAL
(
type
,
"INTEGER_long_un:%{private}lu,%{public}lu,%lu;"
,
7483647lu
,
2147483647lu
,
2147483647lu
);
std
::
string
expected
{
"INTEGER_long_un:<private>,2147483647,<private>;"
};
std
::
string
expected
{
"INTEGER_long_un:<private>,2147483647,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -253,7 +253,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_4_UN, Function|MediumTest|Level3)
...
@@ -253,7 +253,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_4_UN, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"INTEGER_4_un:%{private}4u,%{public}4u,%4u;"
,
4000u
,
4000u
,
4000u
);
HILOG_FATAL
(
type
,
"INTEGER_4_un:%{private}4u,%{public}4u,%4u;"
,
4000u
,
4000u
,
4000u
);
std
::
string
expected
{
"INTEGER_4_un:<private>,4000,<private>;"
};
std
::
string
expected
{
"INTEGER_4_un:<private>,4000,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -269,7 +269,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_SHORT_UN, Function|MediumTest|Level3)
...
@@ -269,7 +269,7 @@ HWTEST_F(LibhilogCtest, HILOG_INTEGER_SHORT_UN, Function|MediumTest|Level3)
HILOG_FATAL
(
type
,
"INTEGER_short_un:%{private}hu,%{public}hu,%hu;"
,
HILOG_FATAL
(
type
,
"INTEGER_short_un:%{private}hu,%{public}hu,%hu;"
,
(
unsigned
short
)
65535
,
(
unsigned
short
)
65535
,
(
unsigned
short
)
65535
);
(
unsigned
short
)
65535
,
(
unsigned
short
)
65535
,
(
unsigned
short
)
65535
);
std
::
string
expected
{
"INTEGER_short_un:<private>,65535,<private>;"
};
std
::
string
expected
{
"INTEGER_short_un:<private>,65535,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -284,7 +284,7 @@ HWTEST_F(LibhilogCtest, HILOG_FLOAT, Function|MediumTest|Level3)
...
@@ -284,7 +284,7 @@ HWTEST_F(LibhilogCtest, HILOG_FLOAT, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"FLOAT:%{private}f,%{public}f,%f;"
,
1.01
,
1.01
,
1.01
);
HILOG_FATAL
(
type
,
"FLOAT:%{private}f,%{public}f,%f;"
,
1.01
,
1.01
,
1.01
);
std
::
string
expected
{
"FLOAT:<private>,1.010000,<private>;"
};
std
::
string
expected
{
"FLOAT:<private>,1.010000,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -299,7 +299,7 @@ HWTEST_F(LibhilogCtest, HILOG_FLOAT_LONG, Function|MediumTest|Level3)
...
@@ -299,7 +299,7 @@ HWTEST_F(LibhilogCtest, HILOG_FLOAT_LONG, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"FLOAT_long:%{private}lf,%{public}lf,%lf;"
,
2.147483647
,
2.147483647
,
2.147483647
);
HILOG_FATAL
(
type
,
"FLOAT_long:%{private}lf,%{public}lf,%lf;"
,
2.147483647
,
2.147483647
,
2.147483647
);
std
::
string
expected
{
"FLOAT_long:<private>,2.147484,<private>;"
};
std
::
string
expected
{
"FLOAT_long:<private>,2.147484,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -316,7 +316,7 @@ HWTEST_F(LibhilogCtest, HILOG_FLOAT_POINT2, Function|MediumTest|Level3)
...
@@ -316,7 +316,7 @@ HWTEST_F(LibhilogCtest, HILOG_FLOAT_POINT2, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"FLOAT_.2:%{private}.2f,%{public}.2f,%.2f;"
,
2.147483647
,
2.147483647
,
2.147483647
);
HILOG_FATAL
(
type
,
"FLOAT_.2:%{private}.2f,%{public}.2f,%.2f;"
,
2.147483647
,
2.147483647
,
2.147483647
);
std
::
string
expected
{
"FLOAT_.2:<private>,2.15,<private>;"
};
std
::
string
expected
{
"FLOAT_.2:<private>,2.15,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -333,7 +333,7 @@ HWTEST_F(LibhilogCtest, HILOG_FLOAT_3POINT2, Function|MediumTest|Level3)
...
@@ -333,7 +333,7 @@ HWTEST_F(LibhilogCtest, HILOG_FLOAT_3POINT2, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"FLOAT_3.2:%{private}3.2f,%{public}4.1f,%2.6f;"
,
32.147483647
,
321.147483647
,
23.147483647
);
HILOG_FATAL
(
type
,
"FLOAT_3.2:%{private}3.2f,%{public}4.1f,%2.6f;"
,
32.147483647
,
321.147483647
,
23.147483647
);
std
::
string
expected
{
"FLOAT_3.2:<private>,321.1,<private>;"
};
std
::
string
expected
{
"FLOAT_3.2:<private>,321.1,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -348,7 +348,7 @@ HWTEST_F(LibhilogCtest, HILOG_CHAR, Function|MediumTest|Level3)
...
@@ -348,7 +348,7 @@ HWTEST_F(LibhilogCtest, HILOG_CHAR, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"CHAR:%{private}c,%{public}c,%c;"
,
'a'
,
'b'
,
'c'
);
HILOG_FATAL
(
type
,
"CHAR:%{private}c,%{public}c,%c;"
,
'a'
,
'b'
,
'c'
);
std
::
string
expected
{
"CHAR:<private>,b,<private>;"
};
std
::
string
expected
{
"CHAR:<private>,b,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -363,7 +363,7 @@ HWTEST_F(LibhilogCtest, HILOG_OCTAL, Function|MediumTest|Level3)
...
@@ -363,7 +363,7 @@ HWTEST_F(LibhilogCtest, HILOG_OCTAL, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"OCTAL:%{private}o,%{public}o,%o;"
,
15
,
16
,
17
);
HILOG_FATAL
(
type
,
"OCTAL:%{private}o,%{public}o,%o;"
,
15
,
16
,
17
);
std
::
string
expected
{
"OCTAL:<private>,20,<private>;"
};
std
::
string
expected
{
"OCTAL:<private>,20,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -378,7 +378,7 @@ HWTEST_F(LibhilogCtest, HILOG_OCTAL_LONG, Function|MediumTest|Level3)
...
@@ -378,7 +378,7 @@ HWTEST_F(LibhilogCtest, HILOG_OCTAL_LONG, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"OCTAL_long:%{private}lo,%{public}lo,%lo;"
,
022l
,
023l
,
024l
);
HILOG_FATAL
(
type
,
"OCTAL_long:%{private}lo,%{public}lo,%lo;"
,
022l
,
023l
,
024l
);
std
::
string
expected
{
"OCTAL_long:<private>,23,<private>;"
};
std
::
string
expected
{
"OCTAL_long:<private>,23,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -393,7 +393,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX, Function|MediumTest|Level3)
...
@@ -393,7 +393,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"HEX:%{private}x,%{public}x,%x;"
,
0x0F
,
0x10
,
0x11
);
HILOG_FATAL
(
type
,
"HEX:%{private}x,%{public}x,%x;"
,
0x0F
,
0x10
,
0x11
);
std
::
string
expected
{
"HEX:<private>,10,<private>;"
};
std
::
string
expected
{
"HEX:<private>,10,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -408,7 +408,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_UPPER, Function|MediumTest|Level3)
...
@@ -408,7 +408,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_UPPER, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"HEX_#:%{private}#x,%{public}#x,%#x;"
,
0x12
,
0x13
,
0x14
);
HILOG_FATAL
(
type
,
"HEX_#:%{private}#x,%{public}#x,%#x;"
,
0x12
,
0x13
,
0x14
);
std
::
string
expected
{
"HEX_#:<private>,0x13,<private>;"
};
std
::
string
expected
{
"HEX_#:<private>,0x13,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -425,7 +425,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_LONG, Function|MediumTest|Level3)
...
@@ -425,7 +425,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_LONG, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"HEX_long:%{private}lx,%{public}lx,%lx;"
,
0x15l
,
0x16l
,
0x17l
);
HILOG_FATAL
(
type
,
"HEX_long:%{private}lx,%{public}lx,%lx;"
,
0x15l
,
0x16l
,
0x17l
);
std
::
string
expected
{
"HEX_long:<private>,16,<private>;"
};
std
::
string
expected
{
"HEX_long:<private>,16,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -442,7 +442,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_X, Function|MediumTest|Level3)
...
@@ -442,7 +442,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_X, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"HEX_X:%{private}X,%{public}X,%X;"
,
0x18
,
0x19
,
0x1A
);
HILOG_FATAL
(
type
,
"HEX_X:%{private}X,%{public}X,%X;"
,
0x18
,
0x19
,
0x1A
);
std
::
string
expected
{
"HEX_X:<private>,19,<private>;"
};
std
::
string
expected
{
"HEX_X:<private>,19,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -459,7 +459,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_UPPER_X, Function|MediumTest|Level3)
...
@@ -459,7 +459,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_UPPER_X, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"HEX_#X:%{private}#X,%{public}#X,%#X;"
,
0x1B
,
0x1C
,
0x1C
);
HILOG_FATAL
(
type
,
"HEX_#X:%{private}#X,%{public}#X,%#X;"
,
0x1B
,
0x1C
,
0x1C
);
std
::
string
expected
{
"HEX_#X:<private>,0X1C,<private>;"
};
std
::
string
expected
{
"HEX_#X:<private>,0X1C,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -476,7 +476,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_LONG_UPPER_X, Function|MediumTest|Level3)
...
@@ -476,7 +476,7 @@ HWTEST_F(LibhilogCtest, HILOG_HEX_LONG_UPPER_X, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"HEX_long_X:%{private}lX,%{public}lX,%lX;"
,
0x1El
,
0x1Fl
,
0x20l
);
HILOG_FATAL
(
type
,
"HEX_long_X:%{private}lX,%{public}lX,%lX;"
,
0x1El
,
0x1Fl
,
0x20l
);
std
::
string
expected
{
"HEX_long_X:<private>,1F,<private>;"
};
std
::
string
expected
{
"HEX_long_X:<private>,1F,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -491,7 +491,7 @@ HWTEST_F(LibhilogCtest, HILOG_STR, Function|MediumTest|Level3)
...
@@ -491,7 +491,7 @@ HWTEST_F(LibhilogCtest, HILOG_STR, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"STRING:%{private}s,%{public}s,%s;"
,
"STRING1"
,
"STRING2"
,
"STRING3"
);
HILOG_FATAL
(
type
,
"STRING:%{private}s,%{public}s,%s;"
,
"STRING1"
,
"STRING2"
,
"STRING3"
);
std
::
string
expected
{
"STRING:<private>,STRING2,<private>;"
};
std
::
string
expected
{
"STRING:<private>,STRING2,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -506,7 +506,7 @@ HWTEST_F(LibhilogCtest, HILOG_STR_EMPTY, Function|MediumTest|Level3)
...
@@ -506,7 +506,7 @@ HWTEST_F(LibhilogCtest, HILOG_STR_EMPTY, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"STRING_empty:%{private}s,%{public}s,%s;"
,
""
,
""
,
""
);
HILOG_FATAL
(
type
,
"STRING_empty:%{private}s,%{public}s,%s;"
,
""
,
""
,
""
);
std
::
string
expected
{
"STRING_empty:<private>,,<private>;"
};
std
::
string
expected
{
"STRING_empty:<private>,,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -522,7 +522,7 @@ HWTEST_F(LibhilogCtest, HILOG_STR_CHINESE, Function|MediumTest|Level3)
...
@@ -522,7 +522,7 @@ HWTEST_F(LibhilogCtest, HILOG_STR_CHINESE, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"STRING_Chinese:%{private}s,%{public}s,%s;"
,
"中文"
,
"中文"
,
"中文"
);
HILOG_FATAL
(
type
,
"STRING_Chinese:%{private}s,%{public}s,%s;"
,
"中文"
,
"中文"
,
"中文"
);
std
::
string
expected
{
"STRING_Chinese:<private>,中文,<private>;"
};
std
::
string
expected
{
"STRING_Chinese:<private>,中文,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -537,7 +537,7 @@ HWTEST_F(LibhilogCtest, HILOG_E_DOUBLE, Function|MediumTest|Level3)
...
@@ -537,7 +537,7 @@ HWTEST_F(LibhilogCtest, HILOG_E_DOUBLE, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"DOUBLE_e:%{private}e,%{public}e,%e;"
,
1e-30
,
2.231e10
,
3.999e-13
);
HILOG_FATAL
(
type
,
"DOUBLE_e:%{private}e,%{public}e,%e;"
,
1e-30
,
2.231e10
,
3.999e-13
);
std
::
string
expected
{
"DOUBLE_e:<private>,2.231000e+10,<private>;"
};
std
::
string
expected
{
"DOUBLE_e:<private>,2.231000e+10,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -554,7 +554,7 @@ HWTEST_F(LibhilogCtest, HILOG_E_UPPER_DOUBLE, Function|MediumTest|Level3)
...
@@ -554,7 +554,7 @@ HWTEST_F(LibhilogCtest, HILOG_E_UPPER_DOUBLE, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"DOUBLE_E:%{private}E,%{public}E,%E;"
,
4.88E2
,
5.676767e-2
,
6.17E13
);
HILOG_FATAL
(
type
,
"DOUBLE_E:%{private}E,%{public}E,%E;"
,
4.88E2
,
5.676767e-2
,
6.17E13
);
std
::
string
expected
{
"DOUBLE_E:<private>,5.676767E-02,<private>;"
};
std
::
string
expected
{
"DOUBLE_E:<private>,5.676767E-02,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -571,7 +571,7 @@ HWTEST_F(LibhilogCtest, HILOG_E_AUTO, Function|MediumTest|Level3)
...
@@ -571,7 +571,7 @@ HWTEST_F(LibhilogCtest, HILOG_E_AUTO, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"AUTO:%{private}g,%{public}g,%g;"
,
1e-30
,
2.231e10
,
3.999e-13
);
HILOG_FATAL
(
type
,
"AUTO:%{private}g,%{public}g,%g;"
,
1e-30
,
2.231e10
,
3.999e-13
);
std
::
string
expected
{
"AUTO:<private>,2.231e+10,<private>;"
};
std
::
string
expected
{
"AUTO:<private>,2.231e+10,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -588,7 +588,7 @@ HWTEST_F(LibhilogCtest, HILOG_E_UPPER_AUTO, Function|MediumTest|Level3)
...
@@ -588,7 +588,7 @@ HWTEST_F(LibhilogCtest, HILOG_E_UPPER_AUTO, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"AUTO_E:%{private}G,%{public}G,%G;"
,
4.88E2
,
5.676767e-2
,
6.17E13
);
HILOG_FATAL
(
type
,
"AUTO_E:%{private}G,%{public}G,%G;"
,
4.88E2
,
5.676767e-2
,
6.17E13
);
std
::
string
expected
{
"AUTO_E:<private>,0.0567677,<private>;"
};
std
::
string
expected
{
"AUTO_E:<private>,0.0567677,<private>;"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -604,7 +604,7 @@ HWTEST_F(LibhilogCtest, HILOG_PRIVATE, Function|MediumTest|Level3)
...
@@ -604,7 +604,7 @@ HWTEST_F(LibhilogCtest, HILOG_PRIVATE, Function|MediumTest|Level3)
HILOG_FATAL
(
type
,
"private:%{private}d,%{private}lf,%{private}.2f,"
HILOG_FATAL
(
type
,
"private:%{private}d,%{private}lf,%{private}.2f,"
"%{private}s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
"%{private}s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"private:<private>,<private>,<private>,<private>,<private>"
};
std
::
string
expected
{
"private:<private>,<private>,<private>,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -620,7 +620,7 @@ HWTEST_F(LibhilogCtest, HILOG_PUBLIC, Function|MediumTest|Level3)
...
@@ -620,7 +620,7 @@ HWTEST_F(LibhilogCtest, HILOG_PUBLIC, Function|MediumTest|Level3)
HILOG_FATAL
(
type
,
"public:%{public}d,%{public}lf,%{public}.2f,%{public}s,%{public}c"
,
HILOG_FATAL
(
type
,
"public:%{public}d,%{public}lf,%{public}.2f,%{public}s,%{public}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"public:1,1.000010,2.33,sse,a"
};
std
::
string
expected
{
"public:1,1.000010,2.33,sse,a"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -635,7 +635,7 @@ HWTEST_F(LibhilogCtest, HILOG_NO_SIGN, Function|MediumTest|Level3)
...
@@ -635,7 +635,7 @@ HWTEST_F(LibhilogCtest, HILOG_NO_SIGN, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"no_sign:%d,%lf,%.2f,%s,%c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HILOG_FATAL
(
type
,
"no_sign:%d,%lf,%.2f,%s,%c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"no_sign:<private>,<private>,<private>,<private>,<private>"
};
std
::
string
expected
{
"no_sign:<private>,<private>,<private>,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -652,7 +652,7 @@ HWTEST_F(LibhilogCtest, HILOG_MIX, Function|MediumTest|Level3)
...
@@ -652,7 +652,7 @@ HWTEST_F(LibhilogCtest, HILOG_MIX, Function|MediumTest|Level3)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"MIX:1,<private>,2.33,<private>,<private>"
};
std
::
string
expected
{
"MIX:1,<private>,2.33,<private>,<private>"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -667,7 +667,7 @@ HWTEST_F(LibhilogCtest, TAG_CHECK, Function|MediumTest|Level2)
...
@@ -667,7 +667,7 @@ HWTEST_F(LibhilogCtest, TAG_CHECK, Function|MediumTest|Level2)
LogType
type
=
LOG_CORE
;
LogType
type
=
LOG_CORE
;
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"03e00/testtag0testtag0testtag0testta:"
};
std
::
string
expected
{
"03e00/testtag0testtag0testtag0testta:"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -682,7 +682,7 @@ HWTEST_F(LibhilogCtest, TYPE_APP_CHECK, Function|MediumTest|Level2)
...
@@ -682,7 +682,7 @@ HWTEST_F(LibhilogCtest, TYPE_APP_CHECK, Function|MediumTest|Level2)
LogType
type
=
LOG_APP
;
LogType
type
=
LOG_APP
;
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"03e00/testtag0testtag0testtag0testta:"
};
std
::
string
expected
{
"03e00/testtag0testtag0testtag0testta:"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testta/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testta
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -699,7 +699,7 @@ HWTEST_F(LibhilogCtest, TAG_OVER_CHECK, Function|MediumTest|Level2)
...
@@ -699,7 +699,7 @@ HWTEST_F(LibhilogCtest, TAG_OVER_CHECK, Function|MediumTest|Level2)
#define LOG_TAG "testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0"
#define LOG_TAG "testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0testtag0"
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"03e00/testtag0testtag0testtag0testtag:"
};
std
::
string
expected
{
"03e00/testtag0testtag0testtag0testtag:"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testtag/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testtag
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
...
@@ -716,6 +716,6 @@ HWTEST_F(LibhilogCtest, DOMAIN_CHECK, Function|MediumTest|Level1)
...
@@ -716,6 +716,6 @@ HWTEST_F(LibhilogCtest, DOMAIN_CHECK, Function|MediumTest|Level1)
#define LOG_DOMAIN 0xD001111
#define LOG_DOMAIN 0xD001111
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
HILOG_FATAL
(
type
,
"MIX:%{public}d,%{private}lf,%{public}.2f,%s,%{private}c"
,
1
,
1.00001
,
2.333333
,
"sse"
,
'a'
);
std
::
string
expected
{
"01111/testtag0testtag0testtag0testtag:"
};
std
::
string
expected
{
"01111/testtag0testtag0testtag0testtag:"
};
CmdRun
(
"hilog -x
-M ///testtag0testtag0testtag0testtag/
"
,
cmdRunResult
);
CmdRun
(
"hilog -x
| grep testtag0testtag0testtag0testtag
"
,
cmdRunResult
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
ASSERT_TRUE
(
cmdRunResult
.
find
(
expected
)
!=
std
::
string
::
npos
);
}
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录