Skip to content
Snippets Groups Projects

Resolve "observation_tests"

Merged Pep Martí Saumell requested to merge 6-observation_tests into devel
1 file
+ 33
2
Compare changes
  • Side-by-side
  • Inline
@@ -39,10 +39,9 @@ TEST(ObservationsTest, AddClearObservation)
ASSERT_TRUE(obs.n == observations.getObservations().size());
//Testing clear
// Testing clear
observations.clearObservations();
ASSERT_TRUE(0 == observations.getObservations().size());
}
TEST(ObservationsTest, LoadFromRinex)
@@ -67,6 +66,38 @@ TEST(ObservationsTest, LoadFromRinex)
free(obs.data);
}
TEST(ObservationsTest, GetObservationBySat)
{
loadRinex();
Observations observations;
observations.loadFromRinex(rnx_file.c_str(), t_start, t_end, dt, opt);
for (int ii = 0; ii < obs.n; ++ii)
{
ASSERT_TRUE(equalObservations(obs.data[ii], observations.getObservationBySat(obs.data[ii].sat)));
}
}
TEST(ObservationsTest, GetObservationByIdx)
{
loadRinex();
Observations observations;
observations.loadFromRinex(rnx_file.c_str(), t_start, t_end, dt, opt);
for (int ii = 0; ii < obs.n; ++ii)
{
// We do this check like this because both loading functions load the rinex file and then sort the observations
ASSERT_TRUE(equalObservations(obs.data[ii], observations.getObservationByIdx(ii)));
}
}
TEST()
{
}
int main(int argc, char** argv)
{
testing::InitGoogleTest(&argc, argv);
Loading