Cascade assertion test
@@ -63,6 +63,14 @@ public class AssertVertexTest {
MetropolisHastings.withDefaultConfig().generatePosteriorSamples(bayesianNetwork, bayesianNetwork.getLatentVertices()).generate(10);
}
+ @Test
+ public void valuePropagationAssertion() {
+ thrown.expect(AssertionError.class);
+ ConstantDoubleVertex constDouble = new ConstantDoubleVertex(3);
+ constDouble.lessThan(new ConstantDoubleVertex(10)).assertTrue();
+ constDouble.setAndCascade(15);
+ }
+
@Test
public void optimizerWithAssertionWorks() {
thrown.expect(AssertionError.class);
@@ -82,5 +90,4 @@ public class AssertVertexTest {
assertVertex.setLabel("testAssert");
assertVertex.eval();
}
-
}
