RDK Documentation (Open Sourced RDK Components)
testVopRpc.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 "dsVideoPort.h"
41 #include "rpAudioOutputPort.h"
42 #include "list.hpp"
43 #include "libIARM.h"
44 #include "dsTypes.h"
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49  IARM_Result_t UIDev_Init(char *name);
50 #ifdef __cplusplus
51 }
52 #endif
53 
54 
55 
56 #undef _DS_AUDIOOUTPUTPORTSETTINGS_H
57 #include "dsVideoPortSettings.h"
58 
59 BOOST_AUTO_TEST_CASE(test_VideoOutputPortConfig_load)
60 {
61  UIDev_Init("DSCli");
62  BOOST_CHECK(rpVOP_init() == dsERR_NONE);
63  {
64  intptr_t handle = 0;
65  bool enabled = false;
66  BOOST_CHECK(rpVOP_getPortHandle(rpVOP_TYPE_HDMI, 0, &handle) == dsERR_NONE);
67  BOOST_CHECK(rpVOP_isEnabled(handle, &enabled) != dsERR_NONE);
68  bool connected = false;
69  BOOST_CHECK(rpVOP_isDisplayConnected(handle, &connected) == dsERR_NONE);
70  std::cout << "Display Is Connected = " << connected << std::endl;
71  BOOST_CHECK(rpVOP_term() == dsERR_NONE);
72  }
73 }
74 
75 BOOST_AUTO_TEST_CASE(testDummy)
76 {
77  BOOST_CHECK(1 == 1);
78 }
79 
80 
81 /** @} */
82 /** @} */
dsTypes.h
Device Settings HAL types.
dsVideoPort.h
dsError.h
Device Settings HAL error codes.
dsUtl.h
Device Settings HAL utilities.
dsERR_NONE
@ dsERR_NONE
Definition: dsError.h:85