mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-06-22 16:34:08 +00:00
Bug fixed in compilation of fir_filter_test.cc on Mac
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@178 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
parent
e3cf6883fa
commit
756e6fe4e3
@ -53,6 +53,25 @@ protected:
|
|||||||
top_block = gr_make_top_block("Fir filter test");
|
top_block = gr_make_top_block("Fir filter test");
|
||||||
factory = new GNSSBlockFactory();
|
factory = new GNSSBlockFactory();
|
||||||
config = new InMemoryConfiguration();
|
config = new InMemoryConfiguration();
|
||||||
|
item_size = sizeof(gr_complex);
|
||||||
|
|
||||||
|
}
|
||||||
|
~Fir_Filter_Test() {
|
||||||
|
delete factory;
|
||||||
|
delete config;
|
||||||
|
}
|
||||||
|
bool init();
|
||||||
|
gr_msg_queue_sptr queue;
|
||||||
|
gr_top_block_sptr top_block;
|
||||||
|
GNSSBlockFactory* factory;
|
||||||
|
InMemoryConfiguration* config;
|
||||||
|
GNSSBlockInterface* gnss_block;
|
||||||
|
size_t item_size;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
bool Fir_Filter_Test::init(){
|
||||||
|
|
||||||
config->set_property("InputFilter.number_of_taps", "4");
|
config->set_property("InputFilter.number_of_taps", "4");
|
||||||
config->set_property("InputFilter.number_of_bands", "2");
|
config->set_property("InputFilter.number_of_bands", "2");
|
||||||
|
|
||||||
@ -73,25 +92,12 @@ protected:
|
|||||||
config->set_property("InputFilter.grid_density", "16");
|
config->set_property("InputFilter.grid_density", "16");
|
||||||
|
|
||||||
// config->set_property("InputFilter.dump", "true");
|
// config->set_property("InputFilter.dump", "true");
|
||||||
|
|
||||||
gnss_block = factory->GetBlock(config, "InputFilter", "Fir_Filter", 1,
|
gnss_block = factory->GetBlock(config, "InputFilter", "Fir_Filter", 1,
|
||||||
1, queue);
|
1, queue);
|
||||||
|
if (gnss_block == NULL) return false;
|
||||||
item_size = sizeof(gr_complex);
|
else return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
~Fir_Filter_Test() {
|
|
||||||
delete factory;
|
|
||||||
delete config;
|
|
||||||
}
|
|
||||||
gr_msg_queue_sptr queue;
|
|
||||||
gr_top_block_sptr top_block;
|
|
||||||
GNSSBlockFactory* factory;
|
|
||||||
InMemoryConfiguration* config;
|
|
||||||
GNSSBlockInterface* gnss_block;
|
|
||||||
size_t item_size;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
TEST_F(Fir_Filter_Test, InstantiationConnectAndRunTest)
|
TEST_F(Fir_Filter_Test, InstantiationConnectAndRunTest)
|
||||||
{
|
{
|
||||||
@ -101,8 +107,10 @@ TEST_F(Fir_Filter_Test, InstantiationConnectAndRunTest)
|
|||||||
long long int begin;
|
long long int begin;
|
||||||
long long int end;
|
long long int end;
|
||||||
|
|
||||||
ASSERT_NE( (int)gnss_block, NULL)
|
// ASSERT_NE( (int)gnss_block, NULL)
|
||||||
<< "Function factory->GetInputFilter(config, queue) fails." << std::endl;
|
// << "Function factory->GetInputFilter(config, queue) fails." << std::endl;
|
||||||
|
|
||||||
|
ASSERT_NE(init(), false) << "Function factory->GetBlock(config, queue) fails." << std::endl;
|
||||||
|
|
||||||
ASSERT_NO_THROW( {
|
ASSERT_NO_THROW( {
|
||||||
gnss_block->connect(top_block);
|
gnss_block->connect(top_block);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user