Clover coverage report -
Coverage timestamp: Thu Jul 5 2007 20:02:32 EDT
file stats: LOC: 33   Methods: 3
NCLOC: 26   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
RandomString.java 0% 0% 0% 0%
coverage
 1    package org.jboss.cache.pojo.passivation;
 2   
 3    import java.util.Random;
 4   
 5    public class RandomString
 6    {
 7   
 8    private static Random rn = new Random(12);
 9   
 10  0 public static int rand(int lo, int hi)
 11    {
 12  0 int n = hi - lo + 1;
 13  0 int i = rn.nextInt() % n;
 14  0 if (i < 0)
 15  0 i = -i;
 16  0 return lo + i;
 17    }
 18   
 19  0 public static String randomstring(int lo, int hi)
 20    {
 21  0 int n = rand(lo, hi);
 22  0 byte b[] = new byte[n];
 23  0 for (int i = 0; i < n; i++)
 24  0 b[i] = (byte) rand('a', 'z');
 25  0 return new String(b);
 26    }
 27   
 28  0 public static String randomstring()
 29    {
 30  0 return randomstring(5, 25);
 31    }
 32    }
 33