aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/property_test.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2014-09-23 16:03:27 -0700
committerMartin Braun <martin.braun@ettus.com>2014-09-23 16:03:27 -0700
commit5aefa0fdfcf45717c133641b7e4df8070ed025e3 (patch)
tree7eaf97986d62892368f8d14cd48cfc45dddf7923 /host/tests/property_test.cpp
parente56809a09aeffa2ccaec4582f6ca2fc0d4b4949e (diff)
parentc431a66df3df4cff82bfa2d2b2c7b16895a7efd6 (diff)
downloaduhd-5aefa0fdfcf45717c133641b7e4df8070ed025e3.tar.gz
uhd-5aefa0fdfcf45717c133641b7e4df8070ed025e3.tar.bz2
uhd-5aefa0fdfcf45717c133641b7e4df8070ed025e3.zip
Merge branch 'maint'
Diffstat (limited to 'host/tests/property_test.cpp')
-rw-r--r--host/tests/property_test.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/host/tests/property_test.cpp b/host/tests/property_test.cpp
index 04d3a831c..00bb3c022 100644
--- a/host/tests/property_test.cpp
+++ b/host/tests/property_test.cpp
@@ -173,3 +173,24 @@ BOOST_AUTO_TEST_CASE(test_prop_subtree){
BOOST_CHECK_EQUAL_COLLECTIONS(tree_dirs2.begin(), tree_dirs2.end(), subtree2_dirs.begin(), subtree2_dirs.end());
}
+
+
+BOOST_AUTO_TEST_CASE(test_prop_operators)
+{
+ uhd::fs_path path1 = "/root/";
+ path1 = path1 / "leaf";
+ BOOST_CHECK_EQUAL(path1, "/root/leaf");
+
+ uhd::fs_path path2 = "/root";
+ path2 = path2 / "leaf";
+ BOOST_CHECK_EQUAL(path2, "/root/leaf");
+
+ uhd::fs_path path3 = "/root/";
+ path3 = path3 / "/leaf/";
+ BOOST_CHECK_EQUAL(path3, "/root/leaf/");
+
+ uhd::fs_path path4 = "/root/";
+ size_t x = 2;
+ path4 = path4 / x;
+ BOOST_CHECK_EQUAL(path4, "/root/2");
+}