< prev index next >

test/java/util/NavigableMap/LockStep.java

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug     6420753 6242436 6691185
  27  * @summary Compare NavigableMap implementations for identical behavior
  28  * @run main LockStep
  29  * @run main/othervm -XX:+AggressiveOpts LockStep
  30  * @run main/othervm -XX:+AggressiveOpts -Dthorough=true LockStep
  31  * @author  Martin Buchholz

  32  */
  33 
  34 import java.io.*;
  35 import java.util.*;
  36 import java.util.concurrent.*;
  37 import static java.util.Collections.*;
  38 
  39 @SuppressWarnings("unchecked")
  40 public class LockStep {
  41     static final int DEFAULT_SIZE = 5;
  42     static int size;            // Running time is O(size**2)
  43 
  44     static int intArg(String[] args, int i, int defaultValue) {
  45         return args.length > i ? Integer.parseInt(args[i]) : defaultValue;
  46     }
  47 
  48     // Pass -Dthorough=true for more exhaustive testing
  49     static final boolean thorough = Boolean.getBoolean("thorough");
  50 
  51     static boolean maybe(int n) { return rnd.nextInt(n) == 0; }




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug     6420753 6242436 6691185
  27  * @summary Compare NavigableMap implementations for identical behavior
  28  * @run main LockStep
  29  * @run main/othervm -XX:+AggressiveOpts LockStep
  30  * @run main/othervm -XX:+AggressiveOpts -Dthorough=true LockStep
  31  * @author  Martin Buchholz
  32  * @key randomness
  33  */
  34 
  35 import java.io.*;
  36 import java.util.*;
  37 import java.util.concurrent.*;
  38 import static java.util.Collections.*;
  39 
  40 @SuppressWarnings("unchecked")
  41 public class LockStep {
  42     static final int DEFAULT_SIZE = 5;
  43     static int size;            // Running time is O(size**2)
  44 
  45     static int intArg(String[] args, int i, int defaultValue) {
  46         return args.length > i ? Integer.parseInt(args[i]) : defaultValue;
  47     }
  48 
  49     // Pass -Dthorough=true for more exhaustive testing
  50     static final boolean thorough = Boolean.getBoolean("thorough");
  51 
  52     static boolean maybe(int n) { return rnd.nextInt(n) == 0; }


< prev index next >