RDK Documentation (Open Sourced RDK Components)
testVideoDevice.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 rpVOP
32 #define BOOST_TEST_MAIN
33 #include "boost/test/included/unit_test.hpp"
34 #include <iostream>
35 
36 #include "videoOutputPort.hpp"
37 #include "videoOutputPortConfig.hpp"
38 #include "audioOutputPortConfig.hpp"
39 
40 #include "videoResolution.hpp"
41 #include "frameRate.hpp"
42 #include "dsUtl.h"
43 #include "dsError.h"
44 #include "dsVideoPort.h"
45 #include "illegalArgumentException.hpp"
46 #include "list.hpp"
47 
48 #include "videoDevice.hpp"
49 #include "videoDeviceConfig.hpp"
50 #include "dsVideoDevice.h"
51 #include "dsVideoDeviceSettings.h"
52 
53 
54 BOOST_AUTO_TEST_CASE(test_VideoOutputPortConfig_load)
55 {
56  BOOST_CHECK(rpVID_init() == dsERR_NONE);
57  {
58  device::VideoDeviceConfig::getInstance().load();
59  try {
60  BOOST_CHECK(device::VideoDeviceConfig::getInstance().getDevices().size() == dsUTL_DIM(kConfigs));
61  device::List<device::VideoDevice> vDevices = device::VideoDeviceConfig::getInstance().getDevices();
62 
63  for (size_t i = 0; i < vDevices.size(); i++) {
64  BOOST_CHECK(device::VideoDeviceConfig::getInstance().getDevices().at(i).getSupportedDFCs().size() == kConfigs[i].numSupportedDFCs);
65  }
66 
67  }
68  catch (...)
69  {
70  BOOST_CHECK(0);
71  }
72  }
73 
74 }
75 
76 BOOST_AUTO_TEST_CASE(testDummy)
77 {
78  BOOST_CHECK(1 == 1);
79 }
80 
81 
82 /** @} */
83 /** @} */
device::List
This class is implemented using templates and it is used to maintain a container with the list of sup...
Definition: list.hpp:51
dsVideoPort.h
dsError.h
Device Settings HAL error codes.
device::List::size
size_t size()
This function gets the size of the container.
Definition: list.hpp:118
dsUtl.h
Device Settings HAL utilities.
dsERR_NONE
@ dsERR_NONE
Definition: dsError.h:85
videoResolution.hpp
It contains class and structure refrenced by the videoResolution.cpp file.
frameRate.hpp
This file defines FrameRate class to manage the video frame rate types.
dsVideoDevice.h
videoDevice.hpp
It contains class referenced by videoDevice.cpp file.
videoOutputPort.hpp
It contains class and structure refrenced by the videooutputport.cpp file.
dsUTL_DIM
#define dsUTL_DIM(arr)
Device Settings general Array dimension calculation inline definition.
Definition: dsUtl.h:85