#include <libsigrokdecode/libsigrokdecode.h> /* First, so we avoid a _POSIX_C_SOURCE warning. */
#include <boost/test/unit_test.hpp>
-#include <libsigrok/libsigrok.h>
+#include <libsigrok/libsigrok.hpp>
-#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;
BOOST_REQUIRE(sr_init(&ctx) == SR_OK);
{
pv::DeviceManager dm(ctx);
- pv::SigSession ss(dm);
+ pv::Session ss(dm);
const GSList *l = srd_decoder_list();
BOOST_REQUIRE(l);
ss.add_decoder(dec);
// Check the signals were created
- const vector< shared_ptr<view::DecodeTrace> > sigs =
+ const vector< shared_ptr<DecodeTrace> > sigs =
ss.get_decode_signals();
- shared_ptr<data::DecoderStack> dec0 = sigs[0]->decoder();
+ shared_ptr<DecoderStack> dec0 = sigs[0]->decoder();
BOOST_REQUIRE(dec0);
- shared_ptr<data::DecoderStack> dec1 = sigs[0]->decoder();
+ shared_ptr<DecoderStack> 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);
}
BOOST_AUTO_TEST_SUITE_END()
+#endif