aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-12-10 15:54:45 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-12-16 09:20:01 -0600
commit65af3c3394bb94f82a005796d946776c08a20275 (patch)
treeb0fa8764ff7c84ec0f0151023b95bfdcd77b7aea /host/tests
parentc30ed7df510ea0939e3b3a595671d57801c4ef0d (diff)
downloaduhd-65af3c3394bb94f82a005796d946776c08a20275.tar.gz
uhd-65af3c3394bb94f82a005796d946776c08a20275.tar.bz2
uhd-65af3c3394bb94f82a005796d946776c08a20275.zip
rfnoc: Fix block_id::get_tree_root()
The path it returned was only valid in UHD 3. Added unit test to confirm.
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/block_id_test.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/host/tests/block_id_test.cpp b/host/tests/block_id_test.cpp
index cf819300a..43c1ef680 100644
--- a/host/tests/block_id_test.cpp
+++ b/host/tests/block_id_test.cpp
@@ -6,6 +6,7 @@
//
#include <uhd/exception.hpp>
+#include <uhd/property_tree.hpp>
#include <uhd/rfnoc/block_id.hpp>
#include <boost/test/unit_test.hpp>
#include <iostream>
@@ -37,6 +38,7 @@ BOOST_AUTO_TEST_CASE(test_block_id)
BOOST_CHECK_EQUAL(block_id.get_device_no(), 0);
BOOST_CHECK_EQUAL(block_id.get_block_name(), "FFT");
BOOST_CHECK_EQUAL(block_id.get_block_count(), 1);
+ BOOST_CHECK_EQUAL(block_id.get_tree_root(), "/blocks/0/FFT#1");
block_id.set_device_no(17);
BOOST_CHECK_EQUAL(block_id.get_device_no(), 17);