31 #define BOOST_TEST_MODULE rpAOP
32 #define BOOST_TEST_MAIN
33 #include "boost/test/included/unit_test.hpp"
36 #include "audioOutputPortConfig.hpp"
40 #include "rpAudioOutputPort.h"
45 #include "exception.hpp"
48 #undef _DS_AUDIOOUTPUTPORTSETTINGS_H
49 #include "rpAudioOutputPortSettings.h"
51 BOOST_AUTO_TEST_CASE(test_AudioOutputPortConfig_load)
58 BOOST_CHECK(aTypes.
size() == 0);
60 aTypes = aConfig.getSupportedTypes();
64 for (
size_t i = 0; i < rpAOP_ENC_MAX; i++) {
65 BOOST_CHECK(device::AudioOutputPortConfig::getInstance().getEncoding(i).getId() == i);
66 BOOST_CHECK(!device::AudioOutputPortConfig::getInstance().getEncoding(i).getName().empty());
69 for (
size_t i = 0; i < rpAOP_CMP_MAX; i++) {
70 BOOST_CHECK(device::AudioOutputPortConfig::getInstance().getCompression(i).getId() == i);
71 BOOST_CHECK(!device::AudioOutputPortConfig::getInstance().getCompression(i).getName().empty());
74 for (
size_t i = 0; i < rpAOP_STMODE_MAX; i++) {
75 BOOST_CHECK(device::AudioOutputPortConfig::getInstance().getStereoMode(i).getId() == i);
76 BOOST_CHECK(!device::AudioOutputPortConfig::getInstance().getStereoMode(i).getName().empty());
79 for (
size_t i = 0; i < rpAOP_TYPE_MAX; i++) {
80 BOOST_CHECK(device::AudioOutputPortConfig::getInstance().getPortType(i).getId() == i);
81 BOOST_CHECK(!device::AudioOutputPortConfig::getInstance().getPortType(i).getName().empty());
85 BOOST_CHECK(device::AudioOutputPortConfig::getInstance().getPorts().size() ==
dsUTL_DIM(kPorts));
86 for (
size_t i = 0; i <
dsUTL_DIM(kPorts); i++) {
87 BOOST_CHECK(device::AudioOutputPortConfig::getInstance().getPort(i).getId() == i);
91 aTypes = aConfig.getSupportedTypes();
95 for (
size_t i = 0; i < aTypes.
size(); i++) {
97 BOOST_CHECK(std::string(aTypes.at(i).
getName()).compare(kConfigs[i].name) == 0);
100 for (
size_t j = 0; j < aTypes.at(i).getSupportedEncodings().size(); j++) {
108 for (
size_t j = 0; j < aTypes.at(i).getSupportedCompressions().size(); j++) {
116 for (
size_t j = 0; j < aTypes.at(i).getSupportedStereoModes().size(); j++) {
126 BOOST_CHECK(aConfig.getPorts().size() ==
dsUTL_DIM(kPorts));
129 for (
size_t i = 0; i < vPortTypes.
size(); i++) {
130 for (
size_t j = 0; j < vPortTypes.at(i).getPorts().size(); j++) {
131 BOOST_CHECK(vPortTypes.at(i).
getPorts().at(j).getType() == kPorts[k].id.type);
132 BOOST_CHECK(vPortTypes.at(i).
getPorts().at(j).getId() == k);
148 BOOST_AUTO_TEST_CASE(testDummy)