aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-03-30 16:56:01 -0700
committerAshish Chaudhari <ashish@ettus.com>2015-03-30 16:56:01 -0700
commit700bf99bdc483fdcc9deb54abc29bd7f81e16089 (patch)
tree42d4f30e7a4abc9e47dcd01300a2f44ab1b91510 /host/tests
parent6a34824ad10eaa2d2b642b959f278f6c4e326d6d (diff)
parent61599b3eaadcc46ac8d24974176d7fd89778d06e (diff)
downloaduhd-700bf99bdc483fdcc9deb54abc29bd7f81e16089.tar.gz
uhd-700bf99bdc483fdcc9deb54abc29bd7f81e16089.tar.bz2
uhd-700bf99bdc483fdcc9deb54abc29bd7f81e16089.zip
Merge branch 'master' into ashish/vivado
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/chdr_test.cpp5
-rw-r--r--host/tests/sph_recv_test.cpp6
-rw-r--r--host/tests/sph_send_test.cpp4
3 files changed, 9 insertions, 6 deletions
diff --git a/host/tests/chdr_test.cpp b/host/tests/chdr_test.cpp
index ed6c690f9..f48073a09 100644
--- a/host/tests/chdr_test.cpp
+++ b/host/tests/chdr_test.cpp
@@ -47,7 +47,10 @@ static void pack_and_unpack(
);
std::cout << std::endl;
boost::uint32_t header_bits = (uhd::ntohx(packet_buff[0]) >> 28);
- std::cout << boost::format("header bits = 0b%d%d%d%d") % bool(header_bits & 8) % bool(header_bits & 4) % bool(header_bits & 2) % bool(header_bits & 1) << std::endl;
+ std::cout << boost::format("header bits = 0b%d%d%d%d") % ((header_bits & 8) > 0)
+ % ((header_bits & 4) > 0)
+ % ((header_bits & 2) > 0)
+ % ((header_bits & 1) > 0) << std::endl;
for (size_t i = 0; i < 5; i++)
{
std::cout << boost::format("packet_buff[%u] = 0x%08x") % i % uhd::ntohx(packet_buff[i]) << std::endl;
diff --git a/host/tests/sph_recv_test.cpp b/host/tests/sph_recv_test.cpp
index e8c51b847..5ade52a9c 100644
--- a/host/tests/sph_recv_test.cpp
+++ b/host/tests/sph_recv_test.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2011-2012 Ettus Research LLC
+// Copyright 2011-2012,2015 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -675,7 +675,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_fragment){
BOOST_CHECK_EQUAL(metadata.error_code, uhd::rx_metadata_t::ERROR_CODE_NONE);
BOOST_CHECK(metadata.has_time_spec);
BOOST_CHECK_TS_CLOSE(metadata.time_spec, uhd::time_spec_t::from_ticks(num_accum_samps, SAMP_RATE));
- BOOST_CHECK_EQUAL(num_samps_ret, (size_t)10);
+ BOOST_CHECK_EQUAL(num_samps_ret, 10UL);
num_accum_samps += num_samps_ret;
if (not metadata.more_fragments) continue;
@@ -685,7 +685,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_fragment){
);
BOOST_CHECK_EQUAL(metadata.error_code, uhd::rx_metadata_t::ERROR_CODE_NONE);
BOOST_CHECK(not metadata.more_fragments);
- BOOST_CHECK_EQUAL(metadata.fragment_offset, (size_t)10);
+ BOOST_CHECK_EQUAL(metadata.fragment_offset, 10UL);
BOOST_CHECK(metadata.has_time_spec);
BOOST_CHECK_TS_CLOSE(metadata.time_spec, uhd::time_spec_t::from_ticks(num_accum_samps, SAMP_RATE));
BOOST_CHECK_EQUAL(num_samps_ret, i%10);
diff --git a/host/tests/sph_send_test.cpp b/host/tests/sph_send_test.cpp
index 58d47c76d..9cd195c7e 100644
--- a/host/tests/sph_send_test.cpp
+++ b/host/tests/sph_send_test.cpp
@@ -1,5 +1,5 @@
//
-// Copyright 2011-2012 Ettus Research LLC
+// Copyright 2011-2012,2015 Ettus Research LLC
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -182,7 +182,7 @@ BOOST_AUTO_TEST_CASE(test_sph_send_one_channel_full_buffer_mode){
for (size_t i = 0; i < NUM_PKTS_TO_TEST; i++){
std::cout << "data check " << i << std::endl;
dummy_send_xport.pop_front_packet(ifpi);
- BOOST_CHECK_EQUAL(ifpi.num_payload_words32, (size_t)20);
+ BOOST_CHECK_EQUAL(ifpi.num_payload_words32, 20UL);
BOOST_CHECK(ifpi.has_tsf);
BOOST_CHECK_EQUAL(ifpi.tsf, num_accum_samps*TICK_RATE/SAMP_RATE);
BOOST_CHECK_EQUAL(ifpi.sob, i == 0);