summaryrefslogtreecommitdiffstats
path: root/host/tests
diff options
context:
space:
mode:
Diffstat (limited to 'host/tests')
-rw-r--r--host/tests/sph_recv_test.cpp8
-rw-r--r--host/tests/time_spec_test.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/host/tests/sph_recv_test.cpp b/host/tests/sph_recv_test.cpp
index 9339a9739..316e24779 100644
--- a/host/tests/sph_recv_test.cpp
+++ b/host/tests/sph_recv_test.cpp
@@ -395,7 +395,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_normal){
//check the received packets
size_t num_accum_samps = 0;
- std::vector<std::complex<float> > mem(NUM_SAMPS_PER_BUFF*NCHANNELS);
+ std::complex<float> mem[NUM_SAMPS_PER_BUFF*NCHANNELS];
std::vector<std::complex<float> *> buffs(NCHANNELS);
for (size_t ch = 0; ch < NCHANNELS; ch++){
buffs[ch] = &mem[ch*NUM_SAMPS_PER_BUFF];
@@ -481,7 +481,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_sequence_error){
//check the received packets
size_t num_accum_samps = 0;
- std::vector<std::complex<float> > mem(NUM_SAMPS_PER_BUFF*NCHANNELS);
+ std::complex<float> mem[NUM_SAMPS_PER_BUFF*NCHANNELS];
std::vector<std::complex<float> *> buffs(NCHANNELS);
for (size_t ch = 0; ch < NCHANNELS; ch++){
buffs[ch] = &mem[ch*NUM_SAMPS_PER_BUFF];
@@ -574,7 +574,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_time_error){
//check the received packets
size_t num_accum_samps = 0;
- std::vector<std::complex<float> > mem(NUM_SAMPS_PER_BUFF*NCHANNELS);
+ std::complex<float> mem[NUM_SAMPS_PER_BUFF*NCHANNELS];
std::vector<std::complex<float> *> buffs(NCHANNELS);
for (size_t ch = 0; ch < NCHANNELS; ch++){
buffs[ch] = &mem[ch*NUM_SAMPS_PER_BUFF];
@@ -659,7 +659,7 @@ BOOST_AUTO_TEST_CASE(test_sph_recv_multi_channel_fragment){
//check the received packets
size_t num_accum_samps = 0;
- std::vector<std::complex<float> > mem(NUM_SAMPS_PER_BUFF*NCHANNELS);
+ std::complex<float> mem[NUM_SAMPS_PER_BUFF*NCHANNELS];
std::vector<std::complex<float> *> buffs(NCHANNELS);
for (size_t ch = 0; ch < NCHANNELS; ch++){
buffs[ch] = &mem[ch*NUM_SAMPS_PER_BUFF];
diff --git a/host/tests/time_spec_test.cpp b/host/tests/time_spec_test.cpp
index 37a039cc5..c9b9652f9 100644
--- a/host/tests/time_spec_test.cpp
+++ b/host/tests/time_spec_test.cpp
@@ -117,6 +117,7 @@ BOOST_AUTO_TEST_CASE(test_time_error_irrational_rate)
const uhd::time_spec_t ts = uhd::time_spec_t::from_ticks(tick_in, rate);
const long long tick_out = ts.to_ticks(rate);
const long long err = tick_in - tick_out;
+ std::streamsize precision = std::cout.precision();
std::cout << std::setprecision(18);
std::cout << "time ............ " << ts.get_real_secs() << std::endl;
@@ -124,6 +125,7 @@ BOOST_AUTO_TEST_CASE(test_time_error_irrational_rate)
std::cout << "tick out ........ " << tick_out << std::endl;
std::cout << "tick error ...... " << err << std::endl;
std::cout << std::endl;
+ std::cout.precision(precision);
BOOST_CHECK_EQUAL(err, (long long)(0));
}