1 package gov.nasa.jpf.mc; 20 21 import gov.nasa.jpf.jvm.Verify; 22 23 26 public class TestRandom { 27 public static void main (String [] args) { 28 TestRandom t = new TestRandom(); 29 30 if (args.length > 0) { 31 for (int i = 0; i < args.length; i++) { 33 String func = args[i]; 34 35 if ("testRandom".equals(func)) { 38 int n = 3; 39 40 if ((i + 1) < args.length) { 41 i++; 42 n = Integer.parseInt(args[i]); 43 } 44 45 t.testRandom(n); 46 } else { 47 throw new IllegalArgumentException ("unknown test function"); 48 } 49 } 50 } else { 51 t.testRandom(3); 53 } 54 } 55 56 void testRandom (int n) { 57 int i = Verify.random(n); Verify.incrementCounter(0); System.out.println(i); 60 } 61 } | Popular Tags |