From 51a205920f241eb5fa91d5f220e3ee0a7a573190 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 3 Apr 2008 05:06:31 +0000 Subject: [PATCH] add assertions --- bindings/java/src/org/hyperic/sigar/test/TestMem.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bindings/java/src/org/hyperic/sigar/test/TestMem.java b/bindings/java/src/org/hyperic/sigar/test/TestMem.java index cdaf4f00..69f5aed4 100644 --- a/bindings/java/src/org/hyperic/sigar/test/TestMem.java +++ b/bindings/java/src/org/hyperic/sigar/test/TestMem.java @@ -37,8 +37,14 @@ public class TestMem extends SigarTestCase { assertGtZeroTrace("Used", mem.getUsed()); traceln("UsedPercent=" + mem.getUsedPercent()); + assertGtZeroTrace("(long)UsedPercent", (long)mem.getUsedPercent()); + + assertTrue(mem.getUsedPercent() <= 100); traceln("FreePercent=" + mem.getFreePercent()); + assertGtEqZeroTrace("(long)FreePercent", (long)mem.getFreePercent()); + + assertTrue(mem.getFreePercent() < 100); assertGtZeroTrace("Free", mem.getFree());