summaryrefslogtreecommitdiffstats
path: root/harmony-tests
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2014-10-05 14:46:28 -0700
committerMathieu Chartier <mathieuc@google.com>2014-10-05 14:46:28 -0700
commit4c8cbbd148b3478a597ac6bc95c17115fdd865a8 (patch)
tree64fa1f39370e2afdcd8a4014d93ef1d053d94de9 /harmony-tests
parentd3b74a8affe39699df64469c955d0e925e1566fb (diff)
downloadlibcore-4c8cbbd148b3478a597ac6bc95c17115fdd865a8.zip
libcore-4c8cbbd148b3478a597ac6bc95c17115fdd865a8.tar.gz
libcore-4c8cbbd148b3478a597ac6bc95c17115fdd865a8.tar.bz2
Fix RuntimeTest.freeMemory
Previously the test asserted that freeMemory > 0, but it can be 0 if the heap is full. Now we check that it is non negative. Bug: 17448025 Change-Id: If8198e8f76543caea665caf77a37ac33dda38517
Diffstat (limited to 'harmony-tests')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java
index 11b7769..03a4aa0 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java
@@ -114,7 +114,7 @@ public class RuntimeTest extends junit.framework.TestCase {
* java.lang.Runtime#maxMemory()
*/
public void test_memory() {
- assertTrue("freeMemory <= 0", r.freeMemory() > 0);
+ assertTrue("freeMemory < 0", r.freeMemory() >= 0);
assertTrue("totalMemory() < freeMemory()", r.totalMemory() >= r.freeMemory());
assertTrue("maxMemory() < totalMemory()", r.maxMemory() >= r.totalMemory());
}