Consolidate path handling for test data files.
Added CERES_TEST_SRCDIR_POSTFIX macro.
Added TestFileAbsolutePath function.
Change-Id: I223b74af027bfb775447e062edab897395b21514
diff --git a/internal/ceres/system_test.cc b/internal/ceres/system_test.cc
index b771268..7cdff21 100644
--- a/internal/ceres/system_test.cc
+++ b/internal/ceres/system_test.cc
@@ -44,7 +44,6 @@
#include <string>
#include "ceres/autodiff_cost_function.h"
-#include "ceres/file.h"
#include "ceres/problem.h"
#include "ceres/rotation.h"
#include "ceres/solver.h"
@@ -55,8 +54,6 @@
#include "glog/logging.h"
#include "gtest/gtest.h"
-DECLARE_string(test_srcdir);
-
namespace ceres {
namespace internal {
@@ -311,8 +308,7 @@
class BundleAdjustmentProblem {
public:
BundleAdjustmentProblem() {
- const string input_file = JoinPath(FLAGS_test_srcdir,
- "problem-16-22106-pre.txt");
+ const string input_file = TestFileAbsolutePath("problem-16-22106-pre.txt");
ReadData(input_file);
BuildProblem();
}