From ebf212248ebbfba98c290b64728ff406e678dfd4 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Tue, 6 Mar 2007 00:05:25 +0000 Subject: [PATCH] test validate method --- .../org/hyperic/sigar/win32/test/TestPdh.java | 34 ++++++++++++++++--- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/bindings/java/src/org/hyperic/sigar/win32/test/TestPdh.java b/bindings/java/src/org/hyperic/sigar/win32/test/TestPdh.java index a9bc2972..22d56c33 100644 --- a/bindings/java/src/org/hyperic/sigar/win32/test/TestPdh.java +++ b/bindings/java/src/org/hyperic/sigar/win32/test/TestPdh.java @@ -61,9 +61,6 @@ public class TestPdh extends SigarTestCase { traceln(path + " validate: " + Pdh.validate(path)); getValue(path); } - - String bogusKey = "\\Does Not\\Exist"; - assertTrue(Pdh.validate(bogusKey) != 0); } public void testCounterMap() throws Exception { @@ -88,7 +85,8 @@ public class TestPdh extends SigarTestCase { int last = -1; for (int i=0; i" + + Integer.toHexString(status).toUpperCase() + + " != " + + Integer.toHexString(expect).toUpperCase()); + } + + assertTrue(expectedResult); + } + } + public void testPdh() throws Exception { String[] iface = Pdh.getKeys("Thread");