X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=test%2Fdata%2Fdecoderstack.cpp;h=70ed7e03695c434e5b31bec049a468c1e8ee3ac2;hp=84a496f1f2ada2c0292b425ec2efae0ebbf99e0d;hb=4c60462b00cc329e61daedd1c2e66724077bd412;hpb=6e89374a6796f8d5d9cc61b0a2f7e98562a034ae diff --git a/test/data/decoderstack.cpp b/test/data/decoderstack.cpp index 84a496f1..70ed7e03 100644 --- a/test/data/decoderstack.cpp +++ b/test/data/decoderstack.cpp @@ -21,34 +21,36 @@ #include /* First, so we avoid a _POSIX_C_SOURCE warning. */ #include -#include +#include -#include "../../pv/data/decoderstack.h" -#include "../../pv/devicemanager.h" -#include "../../pv/sigsession.h" -#include "../../pv/view/decodetrace.h" +#include "../../pv/data/decoderstack.hpp" +#include "../../pv/devicemanager.hpp" +#include "../../pv/session.hpp" +#include "../../pv/view/decodetrace.hpp" -using namespace boost; -using namespace std; +using pv::data::DecoderStack; +using pv::data::decode::Decoder; +using pv::view::DecodeTrace; +using std::shared_ptr; +using std::vector; +#if 0 BOOST_AUTO_TEST_SUITE(DecoderStackTest) BOOST_AUTO_TEST_CASE(TwoDecoderStack) { - using namespace pv; - - sr_context *ctx = NULL; + sr_context *ctx = nullptr; BOOST_REQUIRE(sr_init(&ctx) == SR_OK); BOOST_REQUIRE(ctx); - BOOST_REQUIRE(srd_init(NULL) == SRD_OK); + BOOST_REQUIRE(srd_init(nullptr) == SRD_OK); srd_decoder_load_all(); { pv::DeviceManager dm(ctx); - pv::SigSession ss(dm); + pv::Session ss(dm); const GSList *l = srd_decoder_list(); BOOST_REQUIRE(l); @@ -59,18 +61,18 @@ BOOST_AUTO_TEST_CASE(TwoDecoderStack) ss.add_decoder(dec); // Check the signals were created - const vector< shared_ptr > sigs = + const vector< shared_ptr > sigs = ss.get_decode_signals(); - shared_ptr dec0 = sigs[0]->decoder(); + shared_ptr dec0 = sigs[0]->decoder(); BOOST_REQUIRE(dec0); - shared_ptr dec1 = sigs[0]->decoder(); + shared_ptr dec1 = sigs[0]->decoder(); BOOST_REQUIRE(dec1); // Wait for the decode threads to complete - dec0->_decode_thread.join(); - dec1->_decode_thread.join(); + dec0->decode_thread_.join(); + dec1->decode_thread_.join(); // Check there were no errors BOOST_CHECK_EQUAL(dec0->error_message().isEmpty(), true); @@ -83,3 +85,4 @@ BOOST_AUTO_TEST_CASE(TwoDecoderStack) } BOOST_AUTO_TEST_SUITE_END() +#endif