mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-31 03:14:56 +00:00
fixed failing unit test
I don't know how this didn't run before submitting the PR. CI tests are great! The file-based signal sources were modified to not throw an exception on creation but rather when connect() is called. The unit test was checking for an exception upon construction.
This commit is contained in:
parent
fb6fef74e3
commit
3bf2deb2ae
@ -53,5 +53,9 @@ TEST(FileSignalSource, InstantiateFileNotExists)
|
||||
config->set_property("Test.item_type", "gr_complex");
|
||||
config->set_property("Test.repeat", "false");
|
||||
|
||||
EXPECT_THROW({ auto uptr = std::make_shared<FileSignalSource>(config.get(), "Test", 0, 1, queue.get()); }, std::exception);
|
||||
// the file existence test was moved from the ctor to the connect() call. The argument to
|
||||
// connect doesn't matter, since the exception should be thrown sooner than any connections
|
||||
auto top = gr::make_top_block("GNSSUnitTest");
|
||||
auto uptr = std::make_shared<FileSignalSource>(config.get(), "Test", 0, 1, queue.get());
|
||||
EXPECT_THROW({ uptr->connect(top); }, std::exception);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user