diff options
author | Martin Braun <martin.braun@ettus.com> | 2019-06-01 23:41:47 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2019-11-26 11:49:23 -0800 |
commit | 0f8718176993b3460b12720e639b030be9b86943 (patch) | |
tree | 81820aad39192e63837c41e557bb6c559136415b /host/tests/rfnoc_propprop_test.cpp | |
parent | dc9ca94afaa0a1c049eac934ad1c278deedc6766 (diff) | |
download | uhd-0f8718176993b3460b12720e639b030be9b86943.tar.gz uhd-0f8718176993b3460b12720e639b030be9b86943.tar.bz2 uhd-0f8718176993b3460b12720e639b030be9b86943.zip |
rfnoc: graph: Add commit/release API
Diffstat (limited to 'host/tests/rfnoc_propprop_test.cpp')
-rw-r--r-- | host/tests/rfnoc_propprop_test.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/host/tests/rfnoc_propprop_test.cpp b/host/tests/rfnoc_propprop_test.cpp index 20d7d96f5..8942a59f0 100644 --- a/host/tests/rfnoc_propprop_test.cpp +++ b/host/tests/rfnoc_propprop_test.cpp @@ -246,7 +246,7 @@ BOOST_AUTO_TEST_CASE(test_graph_resolve_ddc_radio) // Now create the graph and commit: graph.connect(&mock_rx_radio, &mock_ddc, edge_info); graph.connect(&mock_ddc, &mock_tx_radio, edge_info); - graph.initialize(); + graph.commit(); BOOST_CHECK_EQUAL(mock_ddc._decim.get(), 1); mock_tx_radio.set_property<double>("master_clock_rate", 100e6, 0); @@ -256,6 +256,13 @@ BOOST_AUTO_TEST_CASE(test_graph_resolve_ddc_radio) mock_ddc.set_property<int>("decim", 42, 0); // It will bounce back: BOOST_CHECK_EQUAL(mock_ddc._decim.get(), 2); + + graph.release(); + mock_tx_radio.set_property<double>("master_clock_rate", 200e6, 0); + // Won't change yet: + BOOST_CHECK_EQUAL(mock_ddc._decim.get(), 2); + graph.commit(); + BOOST_CHECK_EQUAL(mock_ddc._decim.get(), 1); } @@ -284,7 +291,7 @@ BOOST_AUTO_TEST_CASE(test_graph_catch_invalid_graph) // Now create the graph and commit: graph.connect(&mock_rx_radio, &mock_tx_radio, edge_info); - BOOST_REQUIRE_THROW(graph.initialize(), uhd::resolve_error); + BOOST_REQUIRE_THROW(graph.commit(), uhd::resolve_error); UHD_LOG_INFO("TEST", "^^^ Expected an error message."); } @@ -314,7 +321,7 @@ BOOST_AUTO_TEST_CASE(test_graph_ro_prop) // Now create the graph and commit: graph.connect(&mock_rx_radio, &mock_tx_radio, edge_info); - graph.initialize(); + graph.commit(); const size_t rx_rssi_resolver_count = mock_rx_radio.rssi_resolver_count; UHD_LOG_DEBUG("TEST", "RX RSSI: " << mock_rx_radio.get_property<double>("rssi")); @@ -408,7 +415,7 @@ BOOST_AUTO_TEST_CASE(test_graph_crisscross_fifo) graph.connect(&mock_fifo, &mock_tx_radio0, {1, 0, graph_edge_t::DYNAMIC, true}); graph.connect(&mock_fifo, &mock_tx_radio1, {0, 0, graph_edge_t::DYNAMIC, true}); UHD_LOG_INFO("TEST", "Now testing criss-cross prop resolution"); - graph.initialize(); + graph.commit(); } BOOST_AUTO_TEST_CASE(test_circular_deps) |