1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-24 22:13:15 +00:00

Improve usage of gtest macros

This commit is contained in:
Carles Fernandez 2017-11-13 22:13:58 +01:00
parent 1630ec2af7
commit e95f1b62f5
4 changed files with 22 additions and 22 deletions

View File

@ -192,14 +192,14 @@ TEST_F(FirFilterTest, ConnectAndRun)
top_block->connect(source, 0, valve, 0);
top_block->connect(valve, 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}
@ -234,14 +234,14 @@ TEST_F(FirFilterTest, ConnectAndRunGrcomplex)
top_block->connect(source->get_right_block(), 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " gr_complex samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}
@ -277,14 +277,14 @@ TEST_F(FirFilterTest, ConnectAndRunCshorts)
top_block->connect(source->get_right_block(), 0, ishort_to_cshort_, 0);
top_block->connect(ishort_to_cshort_, 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " std::complex<int16_t> samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}
@ -322,14 +322,14 @@ TEST_F(FirFilterTest, ConnectAndRunCbytes)
top_block->connect(source->get_right_block(), 0, ibyte_to_cbyte_, 0);
top_block->connect(ibyte_to_cbyte_, 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " std::complex<int8_t> samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}
@ -366,13 +366,13 @@ TEST_F(FirFilterTest, ConnectAndRunCbyteGrcomplex)
top_block->connect(source->get_right_block(), 0, ibyte_to_cbyte_, 0);
top_block->connect(ibyte_to_cbyte_, 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}

View File

@ -116,14 +116,14 @@ TEST_F(NotchFilterLiteTest, ConnectAndRun)
top_block->connect(source, 0, valve, 0);
top_block->connect(valve, 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}
@ -157,13 +157,13 @@ TEST_F(NotchFilterLiteTest, ConnectAndRunGrcomplex)
top_block->connect(source->get_right_block(), 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " gr_complex samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}

View File

@ -116,14 +116,14 @@ TEST_F(NotchFilterTest, ConnectAndRun)
top_block->connect(source, 0, valve, 0);
top_block->connect(valve, 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}
@ -157,13 +157,13 @@ TEST_F(NotchFilterTest, ConnectAndRunGrcomplex)
top_block->connect(source->get_right_block(), 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " gr_complex samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}

View File

@ -115,14 +115,14 @@ TEST_F(PulseBlankingFilterTest, ConnectAndRun)
top_block->connect(source, 0, valve, 0);
top_block->connect(valve, 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}
@ -156,13 +156,13 @@ TEST_F(PulseBlankingFilterTest, ConnectAndRunGrcomplex)
top_block->connect(source->get_right_block(), 0, filter->get_left_block(), 0);
top_block->connect(filter->get_right_block(), 0, null_sink, 0);
}) << "Failure connecting the top_block."<< std::endl;
}) << "Failure connecting the top_block.";
EXPECT_NO_THROW( {
start = std::chrono::system_clock::now();
top_block->run(); // Start threads and wait
end = std::chrono::system_clock::now();
elapsed_seconds = end - start;
}) << "Failure running the top_block." << std::endl;
}) << "Failure running the top_block.";
std::cout << "Filtered " << nsamples << " gr_complex samples in " << elapsed_seconds.count() * 1e6 << " microseconds" << std::endl;
}