Comment 2 for bug 695371

Revision history for this message
Luiz Ribeiro (luizribeiro) wrote :

The unit tests from DynamicTest testGetValue_Estimator and testGetValue_3args are probably wrong too: the DynamicDouble object created by the makeTree1 method doesn't make any sense to me, since there is more than one double value assigned to the same instant of time.

For example, on lines 471 and 472 from DynamicTypeTest.java:
intervals.add(new Interval<Double>(16.0, 21.0, 5.0));
intervals.add(new Interval<Double>(15.0, 23.0, 4.0));

There are at least two different values assigned to the interval [15.0, 21.0] (values 5.0 and 4.0). Is this really wrong or am I missing something important here? I could fix this issue easily by rewriting the algorithm on the DynamicFloat getValue method, but I think we first need to fix the unit tests.

If anyone confirm the unit tests are indeed wrong, I'll start working on this issue ASAP.