diff options
author | jkoan <jkoan@gmx.de> | 2023-02-01 05:49:13 +0100 |
---|---|---|
committer | jkoan <jkoan@gmx.de> | 2023-02-04 20:21:12 +0100 |
commit | bd8fa07ad5baf952d557542a1635e8d9f47752a8 (patch) | |
tree | 1967f4d49ce320291b26424d59d1e0fa5d763a0f | |
parent | 71bc50eaac4342c79f935394beef7686d7acb870 (diff) | |
download | navit-bd8fa07ad5baf952d557542a1635e8d9f47752a8.tar.gz |
iadd:test:core:Add first test for coords
-rw-r--r-- | test/coords.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/coords.cpp b/test/coords.cpp new file mode 100644 index 000000000..92285795f --- /dev/null +++ b/test/coords.cpp @@ -0,0 +1,13 @@ +#include "navit/coord.h" +#include <gtest/gtest.h> + +TEST(CoordsTestSuite, none_dec) { + struct coord *result = coord_new(0,0); + const char* coord_str = "-33.355300,6.334000"; + int out = coord_parse(coord_str,projection_none,result); + ASSERT_EQ(out, 19); + + // projection_none will not output anything new + ASSERT_EQ(result->x,0); + ASSERT_EQ(result->y,0); +} |