package net.hyperic.sigar.test;

import net.hyperic.sigar.Sigar;
import net.hyperic.sigar.CpuInfo;

public class TestCpuInfo extends SigarTestCase {

    public TestCpuInfo(String name) {
        super(name);
    }

    public void testCreate() throws Exception {
        Sigar sigar = getSigar();

        CpuInfo[] infos = sigar.getCpuInfoList();

        for (int i=0; i<infos.length; i++) {
            CpuInfo info = infos[i];

            traceln("num=" + i);
            traceln("vendor=" + info.getVendor());
            traceln("model=" + info.getModel());
            traceln("mhz=" + info.getMhz());
            traceln("cache size=" + info.getCacheSize());
        }
    }
}

@@ -671,16 +671,178 @@
        %7D
+%0A%0A        int mhz = infos%5B0%5D.getMhz();%0A        int current = sigar.getCpuInfoList()%5B0%5D.getMhz();%0A        assertEquals(%22Mhz=%22 + current + %22/%22 + mhz, current, mhz);
 %0A    %7D%0A%7D

make sure mhz dont change