Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
c2209b0e
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看板
提交
c2209b0e
编写于
9月 22, 2021
作者:
O
openharmony_ci
提交者:
Gitee
9月 22, 2021
浏览文件
操作
浏览文件
下载
差异文件
!666 media 测试用例刷新
Merge pull request !666 from XUXIAOBO/xxb-wzy-master-patch-44210
上级
e217e836
72225f5a
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
16 addition
and
37 deletion
+16
-37
multimedia/media/media_cpp_test_standard/BUILD.gn
multimedia/media/media_cpp_test_standard/BUILD.gn
+2
-2
multimedia/media/media_cpp_test_standard/player/include/ActsPlayerFuncTest.h
...dia_cpp_test_standard/player/include/ActsPlayerFuncTest.h
+0
-1
multimedia/media/media_cpp_test_standard/player/include/TestParamsConfig.h
...media_cpp_test_standard/player/include/TestParamsConfig.h
+1
-1
multimedia/media/media_cpp_test_standard/player/include/Testplayer.h
...media/media_cpp_test_standard/player/include/Testplayer.h
+4
-3
multimedia/media/media_cpp_test_standard/player/include/common.h
...dia/media/media_cpp_test_standard/player/include/common.h
+0
-21
multimedia/media/media_cpp_test_standard/player/src/TestParamsConfig.cpp
...a/media_cpp_test_standard/player/src/TestParamsConfig.cpp
+1
-2
multimedia/media/media_cpp_test_standard/player/src/function/ActsPlayerStateAsyncTest.cpp
...standard/player/src/function/ActsPlayerStateAsyncTest.cpp
+7
-7
multimedia/media/media_cpp_test_standard/player/src/function/ActsPlayerStateTest.cpp
...test_standard/player/src/function/ActsPlayerStateTest.cpp
+1
-0
未找到文件。
multimedia/media/media_cpp_test_standard/BUILD.gn
浏览文件 @
c2209b0e
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
# distributed under the License is distributed on an "AS IS" BASIS,
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
import("//test/xts/tools/build/suite.gni")
module_output_path = "hit/ActsMediaCppStandardTest"
module_output_path = "hit/ActsMediaCppStandardTest"
...
@@ -27,7 +27,7 @@ ohos_moduletest_suite("ActsMediaCppStandardTest") {
...
@@ -27,7 +27,7 @@ ohos_moduletest_suite("ActsMediaCppStandardTest") {
module_out_path = module_output_path
module_out_path = module_output_path
sources = [
sources = [
"player/src/TestParamsConfig.cpp",
"player/src/TestParamsConfig.cpp",
"player/src/Test
p
layer.cpp",
"player/src/Test
P
layer.cpp",
"player/src/function/ActsPlayerFuncAsyncTest.cpp",
"player/src/function/ActsPlayerFuncAsyncTest.cpp",
"player/src/function/ActsPlayerFuncTest.cpp",
"player/src/function/ActsPlayerFuncTest.cpp",
"player/src/function/ActsPlayerStateAsyncTest.cpp",
"player/src/function/ActsPlayerStateAsyncTest.cpp",
...
...
multimedia/media/media_cpp_test_standard/player/include/ActsPlayerFuncTest.h
浏览文件 @
c2209b0e
...
@@ -45,7 +45,6 @@ public:
...
@@ -45,7 +45,6 @@ public:
MEDIA_DEBUG_LOG
(
"ActsPlayerFuncTest::TearDown:%s"
,
testInfo
->
name
());
MEDIA_DEBUG_LOG
(
"ActsPlayerFuncTest::TearDown:%s"
,
testInfo
->
name
());
};
};
static
void
LocalPlayFunc
(
const
std
::
string
uri
,
bool
isAsync
,
WindowConfig
config
=
g_sub_config
);
static
void
LocalPlayFunc
(
const
std
::
string
uri
,
bool
isAsync
,
WindowConfig
config
=
g_sub_config
);
static
void
*
LocalMulitPlayFunc
(
void
*
threadarg
);
};
};
}
}
}
}
...
...
multimedia/media/media_cpp_test_standard/player/include/TestParamsConfig.h
浏览文件 @
c2209b0e
...
@@ -37,7 +37,7 @@ namespace {
...
@@ -37,7 +37,7 @@ namespace {
namespace
TestPlayerBasic
{
namespace
TestPlayerBasic
{
class
TestParamsConfig
{
class
TestParamsConfig
{
public:
public:
static
TestParamsConfig
&
GetInstance
()
static
TestParamsConfig
&
GetInstance
()
{
{
static
TestParamsConfig
config
;
static
TestParamsConfig
config
;
return
config
;
return
config
;
...
...
multimedia/media/media_cpp_test_standard/player/include/Testplayer.h
浏览文件 @
c2209b0e
...
@@ -67,8 +67,8 @@ public:
...
@@ -67,8 +67,8 @@ public:
};
};
class
TestPlayer
{
class
TestPlayer
{
public:
public:
std
::
shared_ptr
<
Player
>
player_
;
std
::
shared_ptr
<
Player
>
player_
=
nullptr
;
sptr
<
Window
>
window_
;
sptr
<
Window
>
window_
=
nullptr
;
explicit
TestPlayer
(
std
::
shared_ptr
<
PlayerSignal
>
test
);
explicit
TestPlayer
(
std
::
shared_ptr
<
PlayerSignal
>
test
);
virtual
~
TestPlayer
();
virtual
~
TestPlayer
();
bool
CreatePlayer
();
bool
CreatePlayer
();
...
@@ -107,11 +107,12 @@ public:
...
@@ -107,11 +107,12 @@ public:
void
OnInfo
(
PlayerOnInfoType
type
,
int32_t
extra
,
const
Format
&
infoBody
=
{});
void
OnInfo
(
PlayerOnInfoType
type
,
int32_t
extra
,
const
Format
&
infoBody
=
{});
int
WaitForState
(
PlayerStates
state
);
int
WaitForState
(
PlayerStates
state
);
private:
private:
void
PrintState
(
PlayerStates
state
);
PlayerErrorType
errorType_
=
PLAYER_ERROR_UNKNOWN
;
PlayerErrorType
errorType_
=
PLAYER_ERROR_UNKNOWN
;
int32_t
errorCode_
=
-
1
;
int32_t
errorCode_
=
-
1
;
bool
seekDoneFlag_
=
false
;
bool
seekDoneFlag_
=
false
;
int32_t
postion_
=
0
;
int32_t
postion_
=
0
;
void
PrintState
(
PlayerStates
state
);
std
::
shared_ptr
<
PlayerSignal
>
test_
;
std
::
shared_ptr
<
PlayerSignal
>
test_
;
};
};
}
}
...
...
multimedia/media/media_cpp_test_standard/player/include/common.h
浏览文件 @
c2209b0e
...
@@ -12,24 +12,3 @@
...
@@ -12,24 +12,3 @@
* See the License for the specific language governing permissions and
* See the License for the specific language governing permissions and
* limitations under the License.
* limitations under the License.
*/
*/
#include "gtest/gtest.h"
#include "player.h"
namespace
PlayerNameSpace
{
static
std
::
string
MOUNT_147
=
"/data/media/audio/147"
;
static
std
::
string
MOUNT_189
=
"/data/media/audio/189"
;
static
const
int
MAX_THREADS
=
16
;
static
const
int32_t
PLAYING_TIME
=
3
;
static
const
int32_t
PAUSED_TIME
=
1
;
static
const
int32_t
SEEK_TIME_5_SEC
=
5000
;
static
const
int32_t
SEEK_TIME_2_SEC
=
2000
;
static
const
int
DELTA_TIME
=
1000
;
static
const
int
WAITSECOND
=
2
;
static
const
int
MAXTIME
=
1000
;
static
const
int
RET_OK
=
0
;
static
const
int32_t
FILE_BEGIN
=
0
;
static
const
int32_t
BUF_SIZE
=
1024
*
1024
;
static
const
OHOS
::
Media
::
PlayerSeekMode
SEEK_MODE
=
OHOS
::
Media
::
PlayerSeekMode
::
SEEK_PREVIOUS_SYNC
;
std
::
string
GetUri
();
}
\ No newline at end of file
multimedia/media/media_cpp_test_standard/player/src/TestParamsConfig.cpp
浏览文件 @
c2209b0e
...
@@ -41,8 +41,7 @@ void TestParamsConfig::InitPlayProtocol()
...
@@ -41,8 +41,7 @@ void TestParamsConfig::InitPlayProtocol()
char
protocol
[
PARA_MAX_LEN
]
=
"local"
;
char
protocol
[
PARA_MAX_LEN
]
=
"local"
;
GetParameter
(
"sys.media.test.play.protocol"
,
""
,
&
protocol
[
0
],
PARA_MAX_LEN
);
GetParameter
(
"sys.media.test.play.protocol"
,
""
,
&
protocol
[
0
],
PARA_MAX_LEN
);
if
(
strcmp
(
protocol
,
"local"
)
==
0
)
{
if
(
strcmp
(
protocol
,
"local"
)
==
0
)
{
TestPlayerBasic
::
TestParamsConfig
::
GetInstance
().
SetMountPath
(
"file://data/media/189"
);
TestPlayerBasic
::
TestParamsConfig
::
GetInstance
().
SetMountPath
(
"file://data/media"
);
MEDIA_INFO_LOG
(
"MOUNT_PATH %s"
,
TestPlayerBasic
::
TestParamsConfig
::
GetInstance
().
GetMountPath
().
c_str
());
MEDIA_INFO_LOG
(
"MOUNT_PATH %s"
,
TestPlayerBasic
::
TestParamsConfig
::
GetInstance
().
GetMountPath
().
c_str
());
}
}
}
}
...
...
multimedia/media/media_cpp_test_standard/player/src/function/ActsPlayerStateAsyncTest.cpp
浏览文件 @
c2209b0e
...
@@ -24,7 +24,7 @@ using namespace TestPlayerBasic;
...
@@ -24,7 +24,7 @@ using namespace TestPlayerBasic;
/**
/**
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_0100
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_0100
* @tc.name : 001.prepare-reset
* @tc.name : 001.prepare-reset
-release
* @tc.desc : 播控
* @tc.desc : 播控
*/
*/
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_0100
,
Function
|
MediumTest
|
Level0
)
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_0100
,
Function
|
MediumTest
|
Level0
)
...
@@ -73,7 +73,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_0200, Func
...
@@ -73,7 +73,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_0200, Func
/**
/**
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_0300
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_0300
* @tc.name : 003.prepare-stop-reset
* @tc.name : 003.prepare-stop-reset
-release
* @tc.desc : 播控
* @tc.desc : 播控
*/
*/
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_0300
,
Function
|
MediumTest
|
Level0
)
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_0300
,
Function
|
MediumTest
|
Level0
)
...
@@ -156,7 +156,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_0600, Func
...
@@ -156,7 +156,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_0600, Func
/**
/**
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_0700
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_0700
* @tc.name : 007.prepare-seek-play-reset
* @tc.name : 007.prepare-seek-play-reset
-release
* @tc.desc :
* @tc.desc :
*/
*/
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_0700
,
Function
|
MediumTest
|
Level0
)
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_0700
,
Function
|
MediumTest
|
Level0
)
...
@@ -220,7 +220,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_0800, Func
...
@@ -220,7 +220,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_0800, Func
/**
/**
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_0900
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_0900
* @tc.name : 009.prepare-play-seek-reset
* @tc.name : 009.prepare-play-seek-reset
-release
* @tc.desc :
* @tc.desc :
*/
*/
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_0900
,
Function
|
MediumTest
|
Level0
)
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_0900
,
Function
|
MediumTest
|
Level0
)
...
@@ -322,7 +322,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_1100, Func
...
@@ -322,7 +322,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_1100, Func
/**
/**
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_1200
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_1200
* @tc.name : 012.prepare-play-seek-pause-reset
* @tc.name : 012.prepare-play-seek-pause-reset
-release
* @tc.desc :
* @tc.desc :
*/
*/
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_1200
,
Function
|
MediumTest
|
Level0
)
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_1200
,
Function
|
MediumTest
|
Level0
)
...
@@ -396,7 +396,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_1300, Func
...
@@ -396,7 +396,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_1300, Func
/**
/**
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_1400
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_1400
* @tc.name : 014.prepare-play-seek-pause-stop-reset
* @tc.name : 014.prepare-play-seek-pause-stop-reset
-release
* @tc.desc :
* @tc.desc :
*/
*/
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_1400
,
Function
|
MediumTest
|
Level0
)
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_1400
,
Function
|
MediumTest
|
Level0
)
...
@@ -464,7 +464,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_1500, Func
...
@@ -464,7 +464,7 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Async_Function_04_1500, Func
/**
/**
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_1600
* @tc.number : SUB_MEDIA_PLAYER_Local_Async_Function_04_1600
* @tc.name : 016.prepare-play-stop-reset
* @tc.name : 016.prepare-play-stop-reset
-release
* @tc.desc :
* @tc.desc :
*/
*/
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_1600
,
Function
|
MediumTest
|
Level0
)
HWTEST_F
(
ActsPlayerFuncTest
,
SUB_MEDIA_PLAYER_Local_Async_Function_04_1600
,
Function
|
MediumTest
|
Level0
)
...
...
multimedia/media/media_cpp_test_standard/player/src/function/ActsPlayerStateTest.cpp
浏览文件 @
c2209b0e
...
@@ -1158,3 +1158,4 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Function_04_3000, Function |
...
@@ -1158,3 +1158,4 @@ HWTEST_F(ActsPlayerFuncTest, SUB_MEDIA_PLAYER_Local_Function_04_3000, Function |
EXPECT_EQ
(
RET_OK
,
player
->
Reset
());
EXPECT_EQ
(
RET_OK
,
player
->
Reset
());
EXPECT_EQ
(
RET_OK
,
testCallback
->
errorNum_
);
EXPECT_EQ
(
RET_OK
,
testCallback
->
errorNum_
);
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录