aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/convert_test.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-10-31 14:30:52 -0700
committerMartin Braun <martin.braun@ettus.com>2016-11-08 08:02:22 -0800
commit99c2730bc9db270560671f2d7d173768465ed51f (patch)
treebc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/tests/convert_test.cpp
parent218f4b0b63927110df9dbbaa8353c346eee2d98a (diff)
downloaduhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.gz
uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.bz2
uhd-99c2730bc9db270560671f2d7d173768465ed51f.zip
Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with stdint.h (The 'correct' replacement would be <cstdint>, but not all of our compilers support that).
Diffstat (limited to 'host/tests/convert_test.cpp')
-rw-r--r--host/tests/convert_test.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/host/tests/convert_test.cpp b/host/tests/convert_test.cpp
index 84e7480a6..b5f63bcbb 100644
--- a/host/tests/convert_test.cpp
+++ b/host/tests/convert_test.cpp
@@ -18,7 +18,7 @@
#include <uhd/convert.hpp>
#include <boost/test/unit_test.hpp>
#include <boost/foreach.hpp>
-#include <boost/cstdint.hpp>
+#include <stdint.h>
#include <boost/assign/list_of.hpp>
#include <complex>
#include <vector>
@@ -28,7 +28,7 @@
using namespace uhd;
//typedefs for complex types
-typedef std::complex<boost::int16_t> sc16_t;
+typedef std::complex<int16_t> sc16_t;
typedef std::complex<float> fc32_t;
typedef std::complex<double> fc64_t;
@@ -51,7 +51,7 @@ template <typename Range> static void loopback(
const int prio_out = -1
){
//make this buffer large enough for all test types
- std::vector<boost::uint64_t> interm(nsamps);
+ std::vector<uint64_t> interm(nsamps);
std::vector<const void *> input0(1, &input[0]), input1(1, &interm[0]);
std::vector<void *> output0(1, &interm[0]), output1(1, &output[0]);
@@ -288,7 +288,7 @@ BOOST_AUTO_TEST_CASE(test_convert_types_fc32_to_sc16){
(std::rand()/float(RAND_MAX/2)) - 1,
(std::rand()/float(RAND_MAX/2)) - 1
);
- std::vector<boost::uint32_t> interm(nsamps);
+ std::vector<uint32_t> interm(nsamps);
std::vector<sc16_t> output(nsamps);
std::vector<const void *> input0(1, &input[0]), input1(1, &interm[0]);
@@ -333,7 +333,7 @@ BOOST_AUTO_TEST_CASE(test_convert_types_sc16_to_fc32){
std::rand()-(RAND_MAX/2),
std::rand()-(RAND_MAX/2)
);
- std::vector<boost::uint32_t> interm(nsamps);
+ std::vector<uint32_t> interm(nsamps);
std::vector<fc32_t> output(nsamps);
std::vector<const void *> input0(1, &input[0]), input1(1, &interm[0]);
@@ -423,10 +423,10 @@ static void test_convert_types_u8(
size_t nsamps, convert::id_type &id
){
//fill the input samples
- std::vector<boost::uint8_t> input(nsamps), output(nsamps);
- BOOST_FOREACH(boost::uint8_t &in, input) in = boost::uint8_t(std::rand() & 0xFF);
- //boost::uint32_t d = 48;
- //BOOST_FOREACH(boost::uint8_t &in, input) in = d++;
+ std::vector<uint8_t> input(nsamps), output(nsamps);
+ BOOST_FOREACH(uint8_t &in, input) in = uint8_t(std::rand() & 0xFF);
+ //uint32_t d = 48;
+ //BOOST_FOREACH(uint8_t &in, input) in = d++;
//run the loopback and test
convert::id_type in_id = id;
@@ -463,8 +463,8 @@ static void test_convert_types_s8(
size_t nsamps, convert::id_type &id
){
//fill the input samples
- std::vector<boost::int8_t> input(nsamps), output(nsamps);
- BOOST_FOREACH(boost::int8_t &in, input) in = boost::int8_t(std::rand() & 0xFF);
+ std::vector<int8_t> input(nsamps), output(nsamps);
+ BOOST_FOREACH(int8_t &in, input) in = int8_t(std::rand() & 0xFF);
//run the loopback and test
convert::id_type in_id = id;
@@ -501,8 +501,8 @@ static void test_convert_types_s16(
size_t nsamps, convert::id_type &id
){
//fill the input samples
- std::vector<boost::int16_t> input(nsamps), output(nsamps);
- BOOST_FOREACH(boost::int16_t &in, input) in = boost::int16_t(std::rand() & 0xFFFF);
+ std::vector<int16_t> input(nsamps), output(nsamps);
+ BOOST_FOREACH(int16_t &in, input) in = int16_t(std::rand() & 0xFFFF);
//run the loopback and test
convert::id_type in_id = id;