Added unit test scaffold, but no idea how to link

release/4.3a0
dellaert 2014-01-25 18:22:23 -05:00
parent ddaf473e28
commit ee018ecbee
2 changed files with 46 additions and 0 deletions

View File

@ -15,6 +15,10 @@ set(navigation_local_libs
# Exclude tests that don't work
set (navigation_excluded_tests "")
include_directories(
${PROJECT_SOURCE_DIR}/gtsam/3rdparty/GeographicLib/include/
)
# Add all tests
if (GTSAM_BUILD_TESTS)
gtsam_add_subdir_tests(navigation "${navigation_local_libs}" "${gtsam-default}" "${navigation_excluded_tests}")

View File

@ -0,0 +1,42 @@
/* ----------------------------------------------------------------------------
* GTSAM Copyright 2010, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* Authors: Frank Dellaert, et al. (see THANKS for the full author list)
* See LICENSE for the license information
* -------------------------------------------------------------------------- */
/**
* @file testGeographicLib.cpp
* @brief Unit tests for coordinate conversions
* @author Frank Dellaert
*/
#include <GeographicLib/Geocentric.hpp>
#include <CppUnitLite/TestHarness.h>
using namespace std;
//using namespace gtsam;
using namespace GeographicLib;
/* ************************************************************************* */
TEST( GeographicLib, Geocentric) {
Geocentric earth(Constants::WGS84_a(), Constants::WGS84_f());
// Dekalb-Peachtree Airport runway 2L
double lat = 33.87071, lon = -84.30482000000001, h = 274;
}
/* ************************************************************************* */
int main() {
TestResult tr;
return TestRegistry::runAllTests(tr);
}
/* ************************************************************************* */