unit test exposing division bug
parent
e6567457b5
commit
cb9cec30e3
|
@ -69,6 +69,15 @@ TEST(DecisionTreeFactor, constructors) {
|
|||
EXPECT_DOUBLES_EQUAL(0.8, f4(x121), 1e-9);
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
TEST(DecisionTreeFactor, Divide) {
|
||||
DiscreteKey A(0, 2), S(1, 2);
|
||||
DecisionTreeFactor pA(A % "99/1"), pS(S % "50/50");
|
||||
DecisionTreeFactor joint = pA * pS;
|
||||
DecisionTreeFactor s = joint / pA;
|
||||
EXPECT(assert_equal(pS, s));
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
TEST(DecisionTreeFactor, Error) {
|
||||
// Declare a bunch of keys
|
||||
|
|
Loading…
Reference in New Issue