Skip to content
Snippets Groups Projects
Commit 5ef9115f authored by Pep Martí Saumell's avatar Pep Martí Saumell
Browse files

[tests] remove absolute path

parent 417a0a2a
No related branches found
No related tags found
2 merge requests!20new tag,!19new tag
...@@ -14,7 +14,10 @@ include_directories(${GTEST_INCLUDE_DIRS}) ...@@ -14,7 +14,10 @@ include_directories(${GTEST_INCLUDE_DIRS})
# Transformations test # Transformations test
gnss_utils_add_gtest(gtest_transformations gtest_transformations.cpp) gnss_utils_add_gtest(gtest_transformations gtest_transformations.cpp)
gnss_utils_add_gtest(gtest_observations gtest_observations.cpp)
target_link_libraries(gtest_transformations ${PROJECT_NAME}) target_link_libraries(gtest_transformations ${PROJECT_NAME})
target_link_libraries(gtest_observations ${PROJECT_NAME})
# Observations test
add_executable(gtest_observations gtest_observations.cpp)
add_dependencies(gtest_observations libgtest)
target_link_libraries(gtest_observations libgtest ${PROJECT_NAME})
add_test(NAME gtest_observations COMMAND gtest_observations "${CMAKE_CURRENT_LIST_DIR}/../src/examples/sample_data.obs")
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
using namespace GNSSUtils; using namespace GNSSUtils;
std::string rnx_file;
TEST(ObservationsTest, LoadFromRinex) TEST(ObservationsTest, LoadFromRinex)
{ {
gtime_t t_start{ 0, 0 }; // no limit gtime_t t_start{ 0, 0 }; // no limit
...@@ -11,7 +13,6 @@ TEST(ObservationsTest, LoadFromRinex) ...@@ -11,7 +13,6 @@ TEST(ObservationsTest, LoadFromRinex)
double dt = 0.0; // no limit double dt = 0.0; // no limit
const char* opt = "-SYS=G"; // only GPS | GPS+GAL: "-SYS=G,L" | ALL: "" const char* opt = "-SYS=G"; // only GPS | GPS+GAL: "-SYS=G,L" | ALL: ""
const std::string& rnx_file = "/home/pepms/robotics/libraries/gnss_utils/src/examples/sample_data.obs";
// GNSSUtils utilities // GNSSUtils utilities
Observations observations; Observations observations;
...@@ -45,5 +46,6 @@ TEST(ObservationsTest, LoadFromRinex) ...@@ -45,5 +46,6 @@ TEST(ObservationsTest, LoadFromRinex)
int main(int argc, char** argv) int main(int argc, char** argv)
{ {
testing::InitGoogleTest(&argc, argv); testing::InitGoogleTest(&argc, argv);
rnx_file = argv[1];
return RUN_ALL_TESTS(); return RUN_ALL_TESTS();
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment