RDK Documentation (Open Sourced RDK Components)
testAopRpc.cpp
1 /*
2  * If not stated otherwise in this file or this component's Licenses.txt file the
3  * following copyright and licenses apply:
4  *
5  * Copyright 2016 RDK Management
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18 */
19 
20 // TODO: Include your class to test here.
21 
22 
23 /**
24 * @defgroup devicesettings
25 * @{
26 * @defgroup test
27 * @{
28 **/
29 
30 
31 #define BOOST_TEST_MODULE rpAOP
32 #define BOOST_TEST_MAIN
33 #include "boost/test/included/unit_test.hpp"
34 #include <iostream>
35 
36 #include "audioOutputPortConfig.hpp"
37 
38 #include "dsUtl.h"
39 #include "dsError.h"
40 #include "rpAudioOutputPort.h"
41 #include "audioEncoding.hpp"
42 #include "audioCompression.hpp"
43 #include "audioStereoMode.hpp"
44 #include "list.hpp"
45 #include "libIARM.h"
46 #include "dsTypes.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51  IARM_Result_t UIDev_Init(char *name);
52 #ifdef __cplusplus
53 }
54 #endif
55 
56 
57 
58 #undef _DS_AUDIOOUTPUTPORTSETTINGS_H
59 #include "rpAudioOutputPortSettings.h"
60 
61 BOOST_AUTO_TEST_CASE(test_AudioOutputPortConfig_load)
62 {
63  UIDev_Init("DSCli");
64  BOOST_CHECK(rpAOP_init() == dsERR_NONE);
65  {
66  intptr_t handle = 0;
67  BOOST_CHECK(rpAOP_getPortHandle(rpAOP_TYPE_HDMI, 0, &handle) == dsERR_NONE);
68  BOOST_CHECK(rpAOP_setStereoMode(handle, rpAOP_STMODE_STEREO) == dsERR_NONE);
69  BOOST_CHECK(rpAOP_setMuted(handle, true) == dsERR_NONE);
70  BOOST_CHECK(rpAOP_term() == dsERR_NONE);
71  }
72 }
73 
74 BOOST_AUTO_TEST_CASE(testDummy)
75 {
76  BOOST_CHECK(1 == 1);
77 }
78 
79 
80 /** @} */
81 /** @} */
dsTypes.h
Device Settings HAL types.
dsError.h
Device Settings HAL error codes.
dsUtl.h
Device Settings HAL utilities.
audioStereoMode.hpp
This file defines AudioStereoMode class for managing audio mode types.
dsERR_NONE
@ dsERR_NONE
Definition: dsError.h:85
audioCompression.hpp
This file defines AudioCompression class for managing audio compression levels.
audioEncoding.hpp
This file defines AudioEncoding class for managing audio encoding types.