test ProcModules
This commit is contained in:
		
							parent
							
								
									d034a2a16e
								
							
						
					
					
						commit
						bfff8bc922
					
				@ -27,6 +27,7 @@ public class SigarTestRunner extends SigarCommandBase {
 | 
			
		||||
        TestProcArgs.class,
 | 
			
		||||
        TestProcEnv.class,
 | 
			
		||||
        TestProcExe.class,
 | 
			
		||||
        TestProcModules.class,
 | 
			
		||||
        TestProcFd.class,
 | 
			
		||||
        TestProcList.class,
 | 
			
		||||
        TestProcMem.class,
 | 
			
		||||
 | 
			
		||||
@ -0,0 +1,30 @@
 | 
			
		||||
package net.hyperic.sigar.test;
 | 
			
		||||
 | 
			
		||||
import java.io.File;
 | 
			
		||||
import java.util.List;
 | 
			
		||||
 | 
			
		||||
import net.hyperic.sigar.Sigar;
 | 
			
		||||
import net.hyperic.sigar.SigarNotImplementedException;
 | 
			
		||||
 | 
			
		||||
public class TestProcModules extends SigarTestCase {
 | 
			
		||||
 | 
			
		||||
    public TestProcModules(String name) {
 | 
			
		||||
        super(name);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public void testCreate() throws Exception {
 | 
			
		||||
        Sigar sigar = new Sigar();
 | 
			
		||||
 | 
			
		||||
        traceln("");
 | 
			
		||||
 | 
			
		||||
        try {
 | 
			
		||||
            List modules = sigar.getProcModules(sigar.getPid());
 | 
			
		||||
 | 
			
		||||
            for (int i=0; i<modules.size(); i++) {
 | 
			
		||||
                traceln(i + "=" + modules.get(i));
 | 
			
		||||
            }
 | 
			
		||||
        } catch (SigarNotImplementedException e) {
 | 
			
		||||
            //ok
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user