aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/subdev_spec_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests/subdev_spec_test.cpp')
-rw-r--r--host/tests/subdev_spec_test.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/host/tests/subdev_spec_test.cpp b/host/tests/subdev_spec_test.cpp
index aa0b9a119..81f86380b 100644
--- a/host/tests/subdev_spec_test.cpp
+++ b/host/tests/subdev_spec_test.cpp
@@ -17,7 +17,6 @@
#include <boost/test/unit_test.hpp>
#include <uhd/usrp/subdev_spec.hpp>
-#include <boost/foreach.hpp>
#include <iostream>
BOOST_AUTO_TEST_CASE(test_subdevice_spec){
@@ -28,6 +27,11 @@ BOOST_AUTO_TEST_CASE(test_subdevice_spec){
sd_spec.push_back(uhd::usrp::subdev_spec_pair_t("A", "AB"));
sd_spec.push_back(uhd::usrp::subdev_spec_pair_t("B", "AB"));
+ //create a subdev_spec with something different
+ uhd::usrp::subdev_spec_t diff_sd_spec;
+ diff_sd_spec.push_back(uhd::usrp::subdev_spec_pair_t("B", "BA"));
+ diff_sd_spec.push_back(uhd::usrp::subdev_spec_pair_t("B", "BA"));
+
//convert to and from args string
std::cout << "Pretty Print: " << std::endl << sd_spec.to_pp_string();
std::string markup_str = sd_spec.to_string();
@@ -41,5 +45,8 @@ BOOST_AUTO_TEST_CASE(test_subdevice_spec){
for (size_t i = 0; i < sd_spec.size(); i++){
BOOST_CHECK_EQUAL(sd_spec.at(i).db_name, new_sd_spec.at(i).db_name);
BOOST_CHECK_EQUAL(sd_spec.at(i).sd_name, new_sd_spec.at(i).sd_name);
+
+ BOOST_CHECK(sd_spec.at(i) == new_sd_spec.at(i));
+ BOOST_CHECK(sd_spec.at(i) != diff_sd_spec.at(i));
}
}