1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-16 20:23:02 +00:00

Catch exceptions raised by gtest

This commit is contained in:
Carles Fernandez 2016-10-14 00:26:05 +02:00
parent a7bd728595
commit c5c4dd17e5
2 changed files with 11 additions and 2 deletions

View File

@ -628,7 +628,12 @@ int main(int argc, char **argv)
std::cout << "Running Time-To-First-Fix test..." << std::endl;
int res = 0;
TTFF_v.clear();
testing::InitGoogleTest(&argc, argv);
try
{
testing::InitGoogleTest(&argc, argv);
}
catch(...) {} // catch the "testing::internal::<unnamed>::ClassUniqueToAlwaysTrue" from gtest
google::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]);

View File

@ -132,7 +132,11 @@ int main(int argc, char **argv)
{
std::cout << "Running GNSS-SDR Tests..." << std::endl;
int res = 0;
testing::InitGoogleTest(&argc, argv);
try
{
testing::InitGoogleTest(&argc, argv);
}
catch(...) {} // catch the "testing::internal::<unnamed>::ClassUniqueToAlwaysTrue" from gtest
google::ParseCommandLineFlags(&argc, &argv, true);
google::InitGoogleLogging(argv[0]);
try