mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-04-29 06:03:23 +00:00
Avoid underscores in Test Cases and Test Names
According to https://github.com/google/googletest/blob/master/googletest/docs/FAQ.md#why-should-not-test-case-names-and-test-names-contain-underscore
This commit is contained in:
parent
40f02e30c2
commit
130de7acac
@ -60,7 +60,7 @@ concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
|||||||
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||||
|
|
||||||
|
|
||||||
class Obs_Gps_L1_System_Test: public ::testing::Test
|
class ObsGpsL1SystemTest: public ::testing::Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::string generator_binary;
|
std::string generator_binary;
|
||||||
@ -88,7 +88,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
bool Obs_Gps_L1_System_Test::check_valid_rinex_nav(std::string filename)
|
bool ObsGpsL1SystemTest::check_valid_rinex_nav(std::string filename)
|
||||||
{
|
{
|
||||||
bool res = false;
|
bool res = false;
|
||||||
res = gpstk::isRinexNavFile(filename);
|
res = gpstk::isRinexNavFile(filename);
|
||||||
@ -96,7 +96,7 @@ bool Obs_Gps_L1_System_Test::check_valid_rinex_nav(std::string filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double Obs_Gps_L1_System_Test::compute_stdev(const std::vector<double> & vec)
|
double ObsGpsL1SystemTest::compute_stdev(const std::vector<double> & vec)
|
||||||
{
|
{
|
||||||
double sum__ = std::accumulate(vec.begin(), vec.end(), 0.0);
|
double sum__ = std::accumulate(vec.begin(), vec.end(), 0.0);
|
||||||
double mean__ = sum__ / vec.size();
|
double mean__ = sum__ / vec.size();
|
||||||
@ -109,7 +109,7 @@ double Obs_Gps_L1_System_Test::compute_stdev(const std::vector<double> & vec)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Obs_Gps_L1_System_Test::check_valid_rinex_obs(std::string filename)
|
bool ObsGpsL1SystemTest::check_valid_rinex_obs(std::string filename)
|
||||||
{
|
{
|
||||||
bool res = false;
|
bool res = false;
|
||||||
res = gpstk::isRinexObsFile(filename);
|
res = gpstk::isRinexObsFile(filename);
|
||||||
@ -117,7 +117,7 @@ bool Obs_Gps_L1_System_Test::check_valid_rinex_obs(std::string filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Obs_Gps_L1_System_Test::configure_generator()
|
int ObsGpsL1SystemTest::configure_generator()
|
||||||
{
|
{
|
||||||
// Configure signal generator
|
// Configure signal generator
|
||||||
generator_binary = FLAGS_generator_binary;
|
generator_binary = FLAGS_generator_binary;
|
||||||
@ -139,7 +139,7 @@ int Obs_Gps_L1_System_Test::configure_generator()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Obs_Gps_L1_System_Test::generate_signal()
|
int ObsGpsL1SystemTest::generate_signal()
|
||||||
{
|
{
|
||||||
pid_t wait_result;
|
pid_t wait_result;
|
||||||
int child_status;
|
int child_status;
|
||||||
@ -164,7 +164,7 @@ int Obs_Gps_L1_System_Test::generate_signal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Obs_Gps_L1_System_Test::configure_receiver()
|
int ObsGpsL1SystemTest::configure_receiver()
|
||||||
{
|
{
|
||||||
config = std::make_shared<InMemoryConfiguration>();
|
config = std::make_shared<InMemoryConfiguration>();
|
||||||
|
|
||||||
@ -322,7 +322,7 @@ int Obs_Gps_L1_System_Test::configure_receiver()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Obs_Gps_L1_System_Test::run_receiver()
|
int ObsGpsL1SystemTest::run_receiver()
|
||||||
{
|
{
|
||||||
std::shared_ptr<ControlThread> control_thread;
|
std::shared_ptr<ControlThread> control_thread;
|
||||||
control_thread = std::make_shared<ControlThread>(config);
|
control_thread = std::make_shared<ControlThread>(config);
|
||||||
@ -353,14 +353,14 @@ int Obs_Gps_L1_System_Test::run_receiver()
|
|||||||
while (fgets(buffer, sizeof(buffer), fp) != NULL)
|
while (fgets(buffer, sizeof(buffer), fp) != NULL)
|
||||||
{
|
{
|
||||||
std::string aux = std::string(buffer);
|
std::string aux = std::string(buffer);
|
||||||
Obs_Gps_L1_System_Test::generated_rinex_obs = aux.erase(aux.length() - 1, 1);
|
ObsGpsL1SystemTest::generated_rinex_obs = aux.erase(aux.length() - 1, 1);
|
||||||
}
|
}
|
||||||
pclose(fp);
|
pclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Obs_Gps_L1_System_Test::check_results()
|
void ObsGpsL1SystemTest::check_results()
|
||||||
{
|
{
|
||||||
std::vector<std::vector<std::pair<double, double>> > pseudorange_ref(33);
|
std::vector<std::vector<std::pair<double, double>> > pseudorange_ref(33);
|
||||||
std::vector<std::vector<std::pair<double, double>> > carrierphase_ref(33);
|
std::vector<std::vector<std::pair<double, double>> > carrierphase_ref(33);
|
||||||
@ -433,7 +433,7 @@ void Obs_Gps_L1_System_Test::check_results()
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
std::string arg2_gen = std::string("./") + Obs_Gps_L1_System_Test::generated_rinex_obs;
|
std::string arg2_gen = std::string("./") + ObsGpsL1SystemTest::generated_rinex_obs;
|
||||||
gpstk::Rinex3ObsStream r_meas(arg2_gen);
|
gpstk::Rinex3ObsStream r_meas(arg2_gen);
|
||||||
r_meas.exceptions(std::ios::failbit);
|
r_meas.exceptions(std::ios::failbit);
|
||||||
gpstk::Rinex3ObsData r_meas_data;
|
gpstk::Rinex3ObsData r_meas_data;
|
||||||
@ -658,7 +658,7 @@ void Obs_Gps_L1_System_Test::check_results()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_F(Obs_Gps_L1_System_Test, Observables_system_test)
|
TEST_F(ObsGpsL1SystemTest, Observables_system_test)
|
||||||
{
|
{
|
||||||
std::cout << "Validating input RINEX nav file: " << FLAGS_rinex_nav_file << " ..." << std::endl;
|
std::cout << "Validating input RINEX nav file: " << FLAGS_rinex_nav_file << " ..." << std::endl;
|
||||||
bool is_rinex_nav_valid = check_valid_rinex_nav(FLAGS_rinex_nav_file);
|
bool is_rinex_nav_valid = check_valid_rinex_nav(FLAGS_rinex_nav_file);
|
||||||
@ -685,9 +685,9 @@ TEST_F(Obs_Gps_L1_System_Test, Observables_system_test)
|
|||||||
// Run the receiver
|
// Run the receiver
|
||||||
EXPECT_EQ( run_receiver(), 0) << "Problem executing the software-defined signal generator";
|
EXPECT_EQ( run_receiver(), 0) << "Problem executing the software-defined signal generator";
|
||||||
|
|
||||||
std::cout << "Validating RINEX obs file obtained by GNSS-SDR: " << Obs_Gps_L1_System_Test::generated_rinex_obs << " ..." << std::endl;
|
std::cout << "Validating RINEX obs file obtained by GNSS-SDR: " << ObsGpsL1SystemTest::generated_rinex_obs << " ..." << std::endl;
|
||||||
is_gen_rinex_obs_valid = check_valid_rinex_obs( "./" + Obs_Gps_L1_System_Test::generated_rinex_obs);
|
is_gen_rinex_obs_valid = check_valid_rinex_obs( "./" + ObsGpsL1SystemTest::generated_rinex_obs);
|
||||||
EXPECT_EQ(true, is_gen_rinex_obs_valid) << "The RINEX observation file " << Obs_Gps_L1_System_Test::generated_rinex_obs << ", generated by GNSS-SDR, is not well formed.";
|
EXPECT_EQ(true, is_gen_rinex_obs_valid) << "The RINEX observation file " << ObsGpsL1SystemTest::generated_rinex_obs << ", generated by GNSS-SDR, is not well formed.";
|
||||||
std::cout << "The file is valid." << std::endl;
|
std::cout << "The file is valid." << std::endl;
|
||||||
|
|
||||||
// Check results
|
// Check results
|
||||||
|
@ -51,7 +51,7 @@ DEFINE_string(config_file_ptest, std::string(""), "File containing the configura
|
|||||||
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
concurrent_queue<Gps_Acq_Assist> global_gps_acq_assist_queue;
|
||||||
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
concurrent_map<Gps_Acq_Assist> global_gps_acq_assist_map;
|
||||||
|
|
||||||
class Static_Position_System_Test: public ::testing::Test
|
class StaticPositionSystemTest: public ::testing::Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::string generator_binary;
|
std::string generator_binary;
|
||||||
@ -92,7 +92,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
void Static_Position_System_Test::geodetic2Ecef(const double latitude, const double longitude, const double altitude,
|
void StaticPositionSystemTest::geodetic2Ecef(const double latitude, const double longitude, const double altitude,
|
||||||
double* x, double* y, double* z)
|
double* x, double* y, double* z)
|
||||||
{
|
{
|
||||||
const double a = 6378137.0; // WGS84
|
const double a = 6378137.0; // WGS84
|
||||||
@ -117,7 +117,7 @@ void Static_Position_System_Test::geodetic2Ecef(const double latitude, const dou
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Static_Position_System_Test::geodetic2Enu(const double latitude, const double longitude, const double altitude,
|
void StaticPositionSystemTest::geodetic2Enu(const double latitude, const double longitude, const double altitude,
|
||||||
double* east, double* north, double* up)
|
double* east, double* north, double* up)
|
||||||
{
|
{
|
||||||
double x, y, z;
|
double x, y, z;
|
||||||
@ -160,7 +160,7 @@ void Static_Position_System_Test::geodetic2Enu(const double latitude, const doub
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double Static_Position_System_Test::compute_stdev_precision(const std::vector<double> & vec)
|
double StaticPositionSystemTest::compute_stdev_precision(const std::vector<double> & vec)
|
||||||
{
|
{
|
||||||
double sum__ = std::accumulate(vec.begin(), vec.end(), 0.0);
|
double sum__ = std::accumulate(vec.begin(), vec.end(), 0.0);
|
||||||
double mean__ = sum__ / vec.size();
|
double mean__ = sum__ / vec.size();
|
||||||
@ -173,7 +173,7 @@ double Static_Position_System_Test::compute_stdev_precision(const std::vector<do
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double Static_Position_System_Test::compute_stdev_accuracy(const std::vector<double> & vec, const double ref)
|
double StaticPositionSystemTest::compute_stdev_accuracy(const std::vector<double> & vec, const double ref)
|
||||||
{
|
{
|
||||||
const double mean__ = ref;
|
const double mean__ = ref;
|
||||||
double accum__ = 0.0;
|
double accum__ = 0.0;
|
||||||
@ -185,7 +185,7 @@ double Static_Position_System_Test::compute_stdev_accuracy(const std::vector<dou
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Static_Position_System_Test::configure_generator()
|
int StaticPositionSystemTest::configure_generator()
|
||||||
{
|
{
|
||||||
// Configure signal generator
|
// Configure signal generator
|
||||||
generator_binary = FLAGS_generator_binary;
|
generator_binary = FLAGS_generator_binary;
|
||||||
@ -207,7 +207,7 @@ int Static_Position_System_Test::configure_generator()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Static_Position_System_Test::generate_signal()
|
int StaticPositionSystemTest::generate_signal()
|
||||||
{
|
{
|
||||||
pid_t wait_result;
|
pid_t wait_result;
|
||||||
int child_status;
|
int child_status;
|
||||||
@ -230,7 +230,7 @@ int Static_Position_System_Test::generate_signal()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Static_Position_System_Test::configure_receiver()
|
int StaticPositionSystemTest::configure_receiver()
|
||||||
{
|
{
|
||||||
if(FLAGS_config_file_ptest.empty())
|
if(FLAGS_config_file_ptest.empty())
|
||||||
{
|
{
|
||||||
@ -399,7 +399,7 @@ int Static_Position_System_Test::configure_receiver()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int Static_Position_System_Test::run_receiver()
|
int StaticPositionSystemTest::run_receiver()
|
||||||
{
|
{
|
||||||
std::shared_ptr<ControlThread> control_thread;
|
std::shared_ptr<ControlThread> control_thread;
|
||||||
if(FLAGS_config_file_ptest.empty())
|
if(FLAGS_config_file_ptest.empty())
|
||||||
@ -440,17 +440,17 @@ int Static_Position_System_Test::run_receiver()
|
|||||||
{
|
{
|
||||||
std::string aux = std::string(buffer);
|
std::string aux = std::string(buffer);
|
||||||
EXPECT_EQ(aux.empty(), false);
|
EXPECT_EQ(aux.empty(), false);
|
||||||
Static_Position_System_Test::generated_kml_file = aux.erase(aux.length() - 1, 1);
|
StaticPositionSystemTest::generated_kml_file = aux.erase(aux.length() - 1, 1);
|
||||||
}
|
}
|
||||||
pclose(fp);
|
pclose(fp);
|
||||||
EXPECT_EQ(Static_Position_System_Test::generated_kml_file.empty(), false);
|
EXPECT_EQ(StaticPositionSystemTest::generated_kml_file.empty(), false);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Static_Position_System_Test::check_results()
|
void StaticPositionSystemTest::check_results()
|
||||||
{
|
{
|
||||||
std::fstream myfile(Static_Position_System_Test::generated_kml_file, std::ios_base::in);
|
std::fstream myfile(StaticPositionSystemTest::generated_kml_file, std::ios_base::in);
|
||||||
std::string line;
|
std::string line;
|
||||||
|
|
||||||
std::vector<double> pos_e;
|
std::vector<double> pos_e;
|
||||||
@ -544,7 +544,7 @@ void Static_Position_System_Test::check_results()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_F(Static_Position_System_Test, Position_system_test)
|
TEST_F(StaticPositionSystemTest, Position_system_test)
|
||||||
{
|
{
|
||||||
if(FLAGS_config_file_ptest.empty())
|
if(FLAGS_config_file_ptest.empty())
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@ typedef struct {
|
|||||||
} ttff_msgbuf;
|
} ttff_msgbuf;
|
||||||
|
|
||||||
|
|
||||||
class TTFF_GPS_L1_CA_Test: public ::testing::Test
|
class TfttGpsL1CATest: public ::testing::Test
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void config_1();
|
void config_1();
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void TTFF_GPS_L1_CA_Test::config_1()
|
void TfttGpsL1CATest::config_1()
|
||||||
{
|
{
|
||||||
config = std::make_shared<InMemoryConfiguration>();
|
config = std::make_shared<InMemoryConfiguration>();
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ void TTFF_GPS_L1_CA_Test::config_1()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TTFF_GPS_L1_CA_Test::config_2()
|
void TfttGpsL1CATest::config_2()
|
||||||
{
|
{
|
||||||
if(FLAGS_config_file_ttff.empty())
|
if(FLAGS_config_file_ttff.empty())
|
||||||
{
|
{
|
||||||
@ -296,7 +296,7 @@ void receive_msg()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void TTFF_GPS_L1_CA_Test::print_TTFF_report(const std::vector<double> & ttff_v, std::shared_ptr<ConfigurationInterface> config_)
|
void TfttGpsL1CATest::print_TTFF_report(const std::vector<double> & ttff_v, std::shared_ptr<ConfigurationInterface> config_)
|
||||||
{
|
{
|
||||||
std::ofstream ttff_report_file;
|
std::ofstream ttff_report_file;
|
||||||
std::string filename = "ttff_report";
|
std::string filename = "ttff_report";
|
||||||
@ -455,7 +455,7 @@ void TTFF_GPS_L1_CA_Test::print_TTFF_report(const std::vector<double> & ttff_v,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_F(TTFF_GPS_L1_CA_Test, ColdStart)
|
TEST_F(TfttGpsL1CATest, ColdStart)
|
||||||
{
|
{
|
||||||
unsigned int num_measurements = 0;
|
unsigned int num_measurements = 0;
|
||||||
|
|
||||||
@ -540,7 +540,7 @@ TEST_F(TTFF_GPS_L1_CA_Test, ColdStart)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_F(TTFF_GPS_L1_CA_Test, HotStart)
|
TEST_F(TfttGpsL1CATest, HotStart)
|
||||||
{
|
{
|
||||||
unsigned int num_measurements = 0;
|
unsigned int num_measurements = 0;
|
||||||
TTFF_v.clear();
|
TTFF_v.clear();
|
||||||
|
@ -59,7 +59,7 @@ void run_correlator_cpu(cpu_multicorrelator* correlator,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(CPUMulticorrelatorTest, MeasureExecutionTime)
|
TEST(CpuMulticorrelatorTest, MeasureExecutionTime)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
int max_threads=FLAGS_cpu_multicorrelator_max_threads_test;
|
int max_threads=FLAGS_cpu_multicorrelator_max_threads_test;
|
||||||
|
@ -62,7 +62,7 @@ void run_correlator_gpu(cuda_multicorrelator* correlator,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST(GPU_multicorrelator_test, MeasureExecutionTime)
|
TEST(GpuMulticorrelatorTest, MeasureExecutionTime)
|
||||||
{
|
{
|
||||||
struct timeval tv;
|
struct timeval tv;
|
||||||
int max_threads=FLAGS_gpu_multicorrelator_max_threads_test;
|
int max_threads=FLAGS_gpu_multicorrelator_max_threads_test;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user