Fix test
parent
06fb94144b
commit
113fbf10fe
|
@ -243,27 +243,27 @@ TEST(DiscreteBayesTree, Dot) {
|
||||||
string actual = self.bayesTree->dot();
|
string actual = self.bayesTree->dot();
|
||||||
EXPECT(actual ==
|
EXPECT(actual ==
|
||||||
"digraph G{\n"
|
"digraph G{\n"
|
||||||
"0[label=\"13,11,6,7\"];\n"
|
"0[label=\"13, 11, 6, 7\"];\n"
|
||||||
"0->1\n"
|
"0->1\n"
|
||||||
"1[label=\"14 : 11,13\"];\n"
|
"1[label=\"14 : 11, 13\"];\n"
|
||||||
"1->2\n"
|
"1->2\n"
|
||||||
"2[label=\"9,12 : 14\"];\n"
|
"2[label=\"9, 12 : 14\"];\n"
|
||||||
"2->3\n"
|
"2->3\n"
|
||||||
"3[label=\"3 : 9,12\"];\n"
|
"3[label=\"3 : 9, 12\"];\n"
|
||||||
"2->4\n"
|
"2->4\n"
|
||||||
"4[label=\"2 : 9,12\"];\n"
|
"4[label=\"2 : 9, 12\"];\n"
|
||||||
"2->5\n"
|
"2->5\n"
|
||||||
"5[label=\"8 : 12,14\"];\n"
|
"5[label=\"8 : 12, 14\"];\n"
|
||||||
"5->6\n"
|
"5->6\n"
|
||||||
"6[label=\"1 : 8,12\"];\n"
|
"6[label=\"1 : 8, 12\"];\n"
|
||||||
"5->7\n"
|
"5->7\n"
|
||||||
"7[label=\"0 : 8,12\"];\n"
|
"7[label=\"0 : 8, 12\"];\n"
|
||||||
"1->8\n"
|
"1->8\n"
|
||||||
"8[label=\"10 : 13,14\"];\n"
|
"8[label=\"10 : 13, 14\"];\n"
|
||||||
"8->9\n"
|
"8->9\n"
|
||||||
"9[label=\"5 : 10,13\"];\n"
|
"9[label=\"5 : 10, 13\"];\n"
|
||||||
"8->10\n"
|
"8->10\n"
|
||||||
"10[label=\"4 : 10,13\"];\n"
|
"10[label=\"4 : 10, 13\"];\n"
|
||||||
"}");
|
"}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,8 @@ All Rights Reserved
|
||||||
|
|
||||||
See LICENSE for the license information
|
See LICENSE for the license information
|
||||||
|
|
||||||
Unit tests for Linear Factor Graphs.
|
Unit tests for Gaussian Bayes Nets.
|
||||||
Author: Frank Dellaert & Gerry Chen
|
Author: Frank Dellaert
|
||||||
"""
|
"""
|
||||||
# pylint: disable=invalid-name, no-name-in-module, no-member
|
# pylint: disable=invalid-name, no-name-in-module, no-member
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ class TestGraphvizFormatting(GtsamTestCase):
|
||||||
graphviz_formatting.paperHorizontalAxis = gtsam.GraphvizFormatting.Axis.X
|
graphviz_formatting.paperHorizontalAxis = gtsam.GraphvizFormatting.Axis.X
|
||||||
graphviz_formatting.paperVerticalAxis = gtsam.GraphvizFormatting.Axis.Y
|
graphviz_formatting.paperVerticalAxis = gtsam.GraphvizFormatting.Axis.Y
|
||||||
self.assertEqual(self.graph.dot(self.values,
|
self.assertEqual(self.graph.dot(self.values,
|
||||||
formatting=graphviz_formatting),
|
writer=graphviz_formatting),
|
||||||
textwrap.dedent(expected_result))
|
textwrap.dedent(expected_result))
|
||||||
|
|
||||||
def test_factor_points(self):
|
def test_factor_points(self):
|
||||||
|
@ -100,7 +100,7 @@ class TestGraphvizFormatting(GtsamTestCase):
|
||||||
graphviz_formatting.plotFactorPoints = False
|
graphviz_formatting.plotFactorPoints = False
|
||||||
|
|
||||||
self.assertEqual(self.graph.dot(self.values,
|
self.assertEqual(self.graph.dot(self.values,
|
||||||
formatting=graphviz_formatting),
|
writer=graphviz_formatting),
|
||||||
textwrap.dedent(expected_result))
|
textwrap.dedent(expected_result))
|
||||||
|
|
||||||
def test_width_height(self):
|
def test_width_height(self):
|
||||||
|
@ -127,7 +127,7 @@ class TestGraphvizFormatting(GtsamTestCase):
|
||||||
graphviz_formatting.figureHeightInches = 10
|
graphviz_formatting.figureHeightInches = 10
|
||||||
|
|
||||||
self.assertEqual(self.graph.dot(self.values,
|
self.assertEqual(self.graph.dot(self.values,
|
||||||
formatting=graphviz_formatting),
|
writer=graphviz_formatting),
|
||||||
textwrap.dedent(expected_result))
|
textwrap.dedent(expected_result))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue