diff --git a/gtsam/hybrid/tests/testHybridMotionModel.cpp b/gtsam/hybrid/tests/testHybridMotionModel.cpp index 5d307e81f..a4de6a17b 100644 --- a/gtsam/hybrid/tests/testHybridMotionModel.cpp +++ b/gtsam/hybrid/tests/testHybridMotionModel.cpp @@ -21,8 +21,8 @@ #include #include #include -#include #include +#include #include #include #include @@ -145,8 +145,8 @@ TEST(HybridGaussianFactorGraph, TwoStateModel) { // Importance sampling run with 100k samples gives 50.051/49.949 // approximateDiscreteMarginal(hbn, hybridMotionModel, given); TableDistribution expected(m1, "50 50"); - EXPECT(assert_equal(expected, - *(bn->at(2)->asDiscrete()))); + EXPECT( + assert_equal(expected, *(bn->at(2)->asDiscrete()))); } { @@ -163,8 +163,8 @@ TEST(HybridGaussianFactorGraph, TwoStateModel) { // Values taken from an importance sampling run with 100k samples: // approximateDiscreteMarginal(hbn, hybridMotionModel, given); TableDistribution expected(m1, "44.3854 55.6146"); - EXPECT(assert_equal( - expected, *(bn->at(2)->asDiscrete()), 0.02)); + EXPECT(assert_equal(expected, *(bn->at(2)->asDiscrete()), + 0.02)); } } @@ -253,8 +253,7 @@ TEST(HybridGaussianFactorGraph, TwoStateModel2) { // approximateDiscreteMarginal(hbn, hybridMotionModel, given); TableDistribution expected(m1, "48.3158 51.6842"); EXPECT(assert_equal( - expected, *(eliminated->at(2)->asDiscrete()), - 0.02)); + expected, *(eliminated->at(2)->asDiscrete()), 0.02)); } { @@ -269,8 +268,8 @@ TEST(HybridGaussianFactorGraph, TwoStateModel2) { // Values taken from an importance sampling run with 100k samples: // approximateDiscreteMarginal(hbn, hybridMotionModel, given); TableDistribution expected(m1, "55.396 44.604"); - EXPECT(assert_equal( - expected, *(bn->at(2)->asDiscrete()), 0.02)); + EXPECT(assert_equal(expected, *(bn->at(2)->asDiscrete()), + 0.02)); } } @@ -347,8 +346,8 @@ TEST(HybridGaussianFactorGraph, TwoStateModel3) { // Values taken from an importance sampling run with 100k samples: // approximateDiscreteMarginal(hbn, hybridMotionModel, given); TableDistribution expected(m1, "51.7762 48.2238"); - EXPECT(assert_equal( - expected, *(bn->at(2)->asDiscrete()), 0.02)); + EXPECT(assert_equal(expected, *(bn->at(2)->asDiscrete()), + 0.02)); } { @@ -363,8 +362,8 @@ TEST(HybridGaussianFactorGraph, TwoStateModel3) { // Values taken from an importance sampling run with 100k samples: // approximateDiscreteMarginal(hbn, hybridMotionModel, given); TableDistribution expected(m1, "49.0762 50.9238"); - EXPECT(assert_equal( - expected, *(bn->at(2)->asDiscrete()), 0.05)); + EXPECT(assert_equal(expected, *(bn->at(2)->asDiscrete()), + 0.05)); } } @@ -390,8 +389,8 @@ TEST(HybridGaussianFactorGraph, TwoStateModel4) { // Values taken from an importance sampling run with 100k samples: // approximateDiscreteMarginal(hbn, hybridMotionModel, given); TableDistribution expected(m1, "8.91527 91.0847"); - EXPECT(assert_equal( - expected, *(bn->at(2)->asDiscrete()), 0.01)); + EXPECT(assert_equal(expected, *(bn->at(2)->asDiscrete()), + 0.01)); } /* ************************************************************************* */ @@ -496,7 +495,7 @@ TEST(HybridGaussianFactorGraph, DifferentMeans) { VectorValues{{X(0), Vector1(0.0)}, {X(1), Vector1(0.25)}}, DiscreteValues{{M(1), 1}}); - // EXPECT(assert_equal(expected, actual)); + EXPECT(assert_equal(expected, actual)); { DiscreteValues dv{{M(1), 0}}; @@ -546,8 +545,8 @@ TEST(HybridGaussianFactorGraph, DifferentCovariances) { DiscreteValues dv0{{M(1), 0}}; DiscreteValues dv1{{M(1), 1}}; - DiscreteConditional expected_m1(m1, "0.5/0.5"); - DiscreteConditional actual_m1 = *(hbn->at(2)->asDiscrete()); + TableDistribution expected_m1(m1, "0.5 0.5"); + TableDistribution actual_m1 = *(hbn->at(2)->asDiscrete()); EXPECT(assert_equal(expected_m1, actual_m1)); } diff --git a/gtsam/hybrid/tests/testHybridNonlinearFactorGraph.cpp b/gtsam/hybrid/tests/testHybridNonlinearFactorGraph.cpp index 5bf97d093..3df03021b 100644 --- a/gtsam/hybrid/tests/testHybridNonlinearFactorGraph.cpp +++ b/gtsam/hybrid/tests/testHybridNonlinearFactorGraph.cpp @@ -1063,8 +1063,8 @@ TEST(HybridNonlinearFactorGraph, DifferentCovariances) { DiscreteValues dv0{{M(1), 0}}; DiscreteValues dv1{{M(1), 1}}; - DiscreteConditional expected_m1(m1, "0.5/0.5"); - DiscreteConditional actual_m1 = *(hbn->at(2)->asDiscrete()); + TableDistribution expected_m1(m1, "0.5 0.5"); + TableDistribution actual_m1 = *(hbn->at(2)->asDiscrete()); EXPECT(assert_equal(expected_m1, actual_m1)); }