Add a comment about a assertion.

This commit is contained in:
youtaol
2012-05-03 11:27:19 +08:00
parent 94c11face5
commit c3c0ab7947
@@ -41,7 +41,8 @@ public class AdaptiveLocationListenerPolicyTest extends TestCase {
/** /**
* Tests the * Tests the
* {@link AdaptiveLocationListenerPolicy#getDesiredPollingInterval()} in four situations. * {@link AdaptiveLocationListenerPolicy#getDesiredPollingInterval()} in four
* situations.
* <ul> * <ul>
* <li>The newIdleTime is bigger than max interval.</li> * <li>The newIdleTime is bigger than max interval.</li>
* <li>The newIdleTime is between min and max interval.</li> * <li>The newIdleTime is between min and max interval.</li>
@@ -54,8 +55,9 @@ public class AdaptiveLocationListenerPolicyTest extends TestCase {
assertEquals(MAX, adocationListenerPolicy.getDesiredPollingInterval()); assertEquals(MAX, adocationListenerPolicy.getDesiredPollingInterval());
adocationListenerPolicy.updateIdleTime(NEW_IDLE_TIME_NORMAL); adocationListenerPolicy.updateIdleTime(NEW_IDLE_TIME_NORMAL);
assertEquals((NEW_IDLE_TIME_NORMAL / 2000) // First get the half of NEW_IDLE_TIME_NORMAL, and then round it to the
* 1000, // nearest second.
assertEquals((NEW_IDLE_TIME_NORMAL / 2 / 1000) * 1000,
adocationListenerPolicy.getDesiredPollingInterval()); adocationListenerPolicy.getDesiredPollingInterval());
adocationListenerPolicy.updateIdleTime(NEW_IDLE_TIME_SMALL); adocationListenerPolicy.updateIdleTime(NEW_IDLE_TIME_SMALL);