From 4c8cbbd148b3478a597ac6bc95c17115fdd865a8 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Sun, 5 Oct 2014 14:46:28 -0700 Subject: 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 --- .../src/test/java/org/apache/harmony/tests/java/lang/RuntimeTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'harmony-tests/src') 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()); } -- cgit v1.1