diff --git a/gtsam/inference/tests/testOrdering.cpp b/gtsam/inference/tests/testOrdering.cpp index 37b6ce3c6..8f2c417d3 100644 --- a/gtsam/inference/tests/testOrdering.cpp +++ b/gtsam/inference/tests/testOrdering.cpp @@ -239,7 +239,7 @@ TEST(Ordering, MetisLoop) { sfg.push_factor(0, 5); // METIS -#ifdef LINUX +#if !defined(__APPLE__) { Ordering actual = Ordering::Create(Ordering::METIS, sfg); // - P( 0 4 1) diff --git a/gtsam/symbolic/tests/testSymbolicBayesTree.cpp b/gtsam/symbolic/tests/testSymbolicBayesTree.cpp index 979786515..93c38b324 100644 --- a/gtsam/symbolic/tests/testSymbolicBayesTree.cpp +++ b/gtsam/symbolic/tests/testSymbolicBayesTree.cpp @@ -729,20 +729,33 @@ TEST(SymbolicBayesTree, COLAMDvsMETIS) { // METIS { Ordering ordering = Ordering::Create(Ordering::METIS, sfg); +// Linux and Mac split differently when using mettis +#if !defined(__APPLE__) + EXPECT(assert_equal(Ordering(list_of(3)(2)(5)(0)(4)(1)), ordering)); +#else EXPECT(assert_equal(Ordering(list_of(5)(4)(2)(1)(0)(3)), ordering)); +#endif // - P( 1 0 3) // | - P( 4 | 0 3) // | | - P( 5 | 0 4) // | - P( 2 | 1 3) SymbolicBayesTree expected; +#if !defined(__APPLE__) expected.insertRoot( - MakeClique(list_of(1)(0)(3), 3, + MakeClique(list_of(2)(4)(1), 3, list_of( - MakeClique(list_of(4)(0)(3), 1, + MakeClique(list_of(0)(1)(4), 1, list_of(MakeClique(list_of(5)(0)(4), 1))))( - MakeClique(list_of(2)(1)(3), 1)))); - + MakeClique(list_of(3)(2)(4), 1)))); +#else + expected.insertRoot( + MakeClique(list_of(1)(0)(3), 3, + list_of( + MakeClique(list_of(4)(0)(3), 1, + list_of(MakeClique(list_of(5)(0)(4), 1))))( + MakeClique(list_of(2)(1)(3), 1)))); +#endif SymbolicBayesTree actual = *sfg.eliminateMultifrontal(ordering); EXPECT(assert_equal(expected, actual)); }