Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing test include for assert_inequal()
Here's the compilation errors without it. ``` In file included from /home/tav/git/gtsam/CppUnitLite/TestHarness.h:23, from /home/tav/git/gtsam/gtsam/discrete/tests/testDecisionTreeFactor.cpp:20: /home/tav/git/gtsam/gtsam/discrete/tests/testDecisionTreeFactor.cpp: In member function ‘virtual void DecisionTreeFactorDivideTest::run(TestResult&)’: /home/tav/git/gtsam/gtsam/discrete/tests/testDecisionTreeFactor.cpp:123:25: error: invalid initialization of reference of type ‘const gtsam::Vector&’ {aka ‘const Eigen::Matrix<double, -1, 1>&’} from expression of type ‘gtsam::DecisionTreeFactor’ 123 | EXPECT(assert_inequal(pS, s)); | ^~ /home/tav/git/gtsam/CppUnitLite/Test.h:151:9: note: in definition of macro ‘EXPECT’ 151 | { if (!(condition)) \ | ^~~~~~~~~ In file included from /home/tav/git/gtsam/gtsam/inference/DotWriter.h:22, from /home/tav/git/gtsam/gtsam/inference/FactorGraph.h:25, from /home/tav/git/gtsam/gtsam/inference/MetisIndex.h:21, from /home/tav/git/gtsam/gtsam/inference/Ordering.h:25, from /home/tav/git/gtsam/gtsam/discrete/DiscreteFactor.h:25, from /home/tav/git/gtsam/gtsam/discrete/DecisionTreeFactor.h:22, from /home/tav/git/gtsam/gtsam/discrete/tests/testDecisionTreeFactor.cpp:23: /home/tav/git/gtsam/gtsam/base/Vector.h:163:48: note: in passing argument 1 of ‘bool gtsam::assert_inequal(const Vector&, const Vector&, double)’ 163 | GTSAM_EXPORT bool assert_inequal(const Vector& vec1, const Vector& vec2, double tol=1e-9); | ~~~~~~~~~~~~~~^~~~ /home/tav/git/gtsam/gtsam/discrete/tests/testDecisionTreeFactor.cpp:131:25: error: invalid initialization of reference of type ‘const gtsam::Vector&’ {aka ‘const Eigen::Matrix<double, -1, 1>&’} from expression of type ‘gtsam::KeySet’ {aka ‘gtsam::FastSet<long unsigned int>’} 131 | EXPECT(assert_inequal(KeySet(pS.keys()), keys)); | ^~~~~~~~~~~~~~~~~ /home/tav/git/gtsam/CppUnitLite/Test.h:151:9: note: in definition of macro ‘EXPECT’ 151 | { if (!(condition)) \ | ^~~~~~~~~ /home/tav/git/gtsam/gtsam/base/Vector.h:163:48: note: in passing argument 1 of ‘bool gtsam::assert_inequal(const Vector&, const Vector&, double)’ 163 | GTSAM_EXPORT bool assert_inequal(const Vector& vec1, const Vector& vec2, double tol=1e-9); | ~~~~~~~~~~~~~~^~~~ ``` ``` In file included from /home/tav/git/gtsam/CppUnitLite/TestHarness.h:23, from /home/tav/git/gtsam/gtsam/discrete/tests/testTableFactor.cpp:19: /home/tav/git/gtsam/gtsam/discrete/tests/testTableFactor.cpp: In member function ‘virtual void TableFactorconstructorsTest::run(TestResult&)’: /home/tav/git/gtsam/gtsam/discrete/tests/testTableFactor.cpp:147:25: error: invalid initialization of reference of type ‘const gtsam::Vector&’ {aka ‘const Eigen::Matrix<double, -1, 1>&’} from expression of type ‘gtsam::TableFactor’ 147 | EXPECT(assert_inequal(f5_with_wrong_keys, f5, 1e-9)); | ^~~~~~~~~~~~~~~~~~ /home/tav/git/gtsam/CppUnitLite/Test.h:151:9: note: in definition of macro ‘EXPECT’ 151 | { if (!(condition)) \ | ^~~~~~~~~ In file included from /home/tav/git/gtsam/gtsam/inference/DotWriter.h:22, from /home/tav/git/gtsam/gtsam/inference/FactorGraph.h:25, from /home/tav/git/gtsam/gtsam/inference/MetisIndex.h:21, from /home/tav/git/gtsam/gtsam/inference/Ordering.h:25, from /home/tav/git/gtsam/gtsam/discrete/DiscreteFactor.h:25, from /home/tav/git/gtsam/gtsam/discrete/DecisionTreeFactor.h:22, from /home/tav/git/gtsam/gtsam/discrete/DiscreteConditional.h:21, from /home/tav/git/gtsam/gtsam/discrete/tests/testTableFactor.cpp:22: /home/tav/git/gtsam/gtsam/base/Vector.h:163:48: note: in passing argument 1 of ‘bool gtsam::assert_inequal(const Vector&, const Vector&, double)’ 163 | GTSAM_EXPORT bool assert_inequal(const Vector& vec1, const Vector& vec2, double tol=1e-9); | ~~~~~~~~~~~~~~^~~~ ```
- Loading branch information