Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
5a845588
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看板
提交
5a845588
编写于
9月 19, 2020
作者:
D
deltree
提交者:
openharmony_ci
9月 19, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
!11 【轻量级 PR】:Correcting spell.
Merge pull request !11 from deltree/N/A
上级
c795e5be
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
19 addition
and
19 deletion
+19
-19
multimedia_lite/multimedia_posix/player/src/player_test.cpp
multimedia_lite/multimedia_posix/player/src/player_test.cpp
+19
-19
未找到文件。
multimedia_lite/multimedia_posix/player/src/player_test.cpp
浏览文件 @
5a845588
...
@@ -222,7 +222,7 @@ const int HI_SUCCESS = 0;
...
@@ -222,7 +222,7 @@ const int HI_SUCCESS = 0;
const
int
HI_FAILURE
=
-
1
;
const
int
HI_FAILURE
=
-
1
;
static
TagTestSample
g_tagTestSample
;
static
TagTestSample
g_tagTestSample
;
static
const
char
*
V
EDI
O_FILE_NAME
=
"0506_480p.mp4"
;
static
const
char
*
V
IDE
O_FILE_NAME
=
"0506_480p.mp4"
;
static
const
char
*
AUDIO_FILE_NAME
=
"AACLC_1channel_001.aac"
;
static
const
char
*
AUDIO_FILE_NAME
=
"AACLC_1channel_001.aac"
;
class
Demo
:
public
testing
::
Test
{
class
Demo
:
public
testing
::
Test
{
protected:
protected:
...
@@ -295,12 +295,12 @@ static int32_t CreateAndSetSource(int32_t sourceType, const char *argv)
...
@@ -295,12 +295,12 @@ static int32_t CreateAndSetSource(int32_t sourceType, const char *argv)
}
}
HWTEST_F
(
Demo
,
Test_SetSource01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_SetSource01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
}
}
HWTEST_F
(
Demo
,
Test_Prepare01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_Prepare01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -312,7 +312,7 @@ HWTEST_F(Demo, Test_Prepare02, TestSize.Level0){
...
@@ -312,7 +312,7 @@ HWTEST_F(Demo, Test_Prepare02, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_Play01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_Play01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -337,7 +337,7 @@ HWTEST_F(Demo, Test_Play03, TestSize.Level0){
...
@@ -337,7 +337,7 @@ HWTEST_F(Demo, Test_Play03, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_IsPlaying01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_IsPlaying01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -349,7 +349,7 @@ HWTEST_F(Demo, Test_IsPlaying01, TestSize.Level0){
...
@@ -349,7 +349,7 @@ HWTEST_F(Demo, Test_IsPlaying01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_Stop01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_Stop01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -361,7 +361,7 @@ HWTEST_F(Demo, Test_Stop01, TestSize.Level0){
...
@@ -361,7 +361,7 @@ HWTEST_F(Demo, Test_Stop01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_Pause01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_Pause01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -374,7 +374,7 @@ HWTEST_F(Demo, Test_Pause01, TestSize.Level0){
...
@@ -374,7 +374,7 @@ HWTEST_F(Demo, Test_Pause01, TestSize.Level0){
HWTEST_F
(
Demo
,
Test_SetVolume01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_SetVolume01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -385,7 +385,7 @@ HWTEST_F(Demo, Test_SetVolume01, TestSize.Level0){
...
@@ -385,7 +385,7 @@ HWTEST_F(Demo, Test_SetVolume01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_IsLooping01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_IsLooping01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -396,7 +396,7 @@ HWTEST_F(Demo, Test_IsLooping01, TestSize.Level0){
...
@@ -396,7 +396,7 @@ HWTEST_F(Demo, Test_IsLooping01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_GetPlayerState01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_GetPlayerState01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -406,7 +406,7 @@ HWTEST_F(Demo, Test_GetPlayerState01, TestSize.Level0){
...
@@ -406,7 +406,7 @@ HWTEST_F(Demo, Test_GetPlayerState01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_GetCurrentPosition01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_GetCurrentPosition01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -419,7 +419,7 @@ HWTEST_F(Demo, Test_GetCurrentPosition01, TestSize.Level0){
...
@@ -419,7 +419,7 @@ HWTEST_F(Demo, Test_GetCurrentPosition01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_GetDuration01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_GetDuration01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -429,7 +429,7 @@ HWTEST_F(Demo, Test_GetDuration01, TestSize.Level0){
...
@@ -429,7 +429,7 @@ HWTEST_F(Demo, Test_GetDuration01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_GetVideoWidth01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_GetVideoWidth01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -439,7 +439,7 @@ HWTEST_F(Demo, Test_GetVideoWidth01, TestSize.Level0){
...
@@ -439,7 +439,7 @@ HWTEST_F(Demo, Test_GetVideoWidth01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_GetVideoHeight01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_GetVideoHeight01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -449,7 +449,7 @@ HWTEST_F(Demo, Test_GetVideoHeight01, TestSize.Level0){
...
@@ -449,7 +449,7 @@ HWTEST_F(Demo, Test_GetVideoHeight01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_SetPlaybackSpeed01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_SetPlaybackSpeed01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -457,7 +457,7 @@ HWTEST_F(Demo, Test_SetPlaybackSpeed01, TestSize.Level0){
...
@@ -457,7 +457,7 @@ HWTEST_F(Demo, Test_SetPlaybackSpeed01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_GetPlaybackSpeed01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_GetPlaybackSpeed01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -466,7 +466,7 @@ HWTEST_F(Demo, Test_GetPlaybackSpeed01, TestSize.Level0){
...
@@ -466,7 +466,7 @@ HWTEST_F(Demo, Test_GetPlaybackSpeed01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_SetLoop01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_SetLoop01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -479,7 +479,7 @@ HWTEST_F(Demo, Test_SetLoop01, TestSize.Level0){
...
@@ -479,7 +479,7 @@ HWTEST_F(Demo, Test_SetLoop01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_Reset01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_Reset01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
@@ -491,7 +491,7 @@ HWTEST_F(Demo, Test_Reset01, TestSize.Level0){
...
@@ -491,7 +491,7 @@ HWTEST_F(Demo, Test_Reset01, TestSize.Level0){
}
}
HWTEST_F
(
Demo
,
Test_Release01
,
TestSize
.
Level0
){
HWTEST_F
(
Demo
,
Test_Release01
,
TestSize
.
Level0
){
int32_t
ret
=
CreateAndSetSource
(
1
,
V
EDI
O_FILE_NAME
);
int32_t
ret
=
CreateAndSetSource
(
1
,
V
IDE
O_FILE_NAME
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
ret
=
g_tagTestSample
.
adaptr
->
Prepare
();
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
EXPECT_EQ
(
HI_SUCCESS
,
ret
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录