add assertions

This commit is contained in:
Doug MacEachern 2008-04-03 05:06:31 +00:00
parent 565c48cca3
commit 51a205920f
1 changed files with 6 additions and 0 deletions

View File

@ -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());