ForgetMeNot.java revision 2362
5459N/A * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. 5459N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5459N/A * This code is free software; you can redistribute it and/or modify it 5459N/A * under the terms of the GNU General Public License version 2 only, as 5459N/A * published by the Free Software Foundation. 5459N/A * This code is distributed in the hope that it will be useful, but WITHOUT 5459N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5459N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5459N/A * version 2 for more details (a copy is included in the LICENSE file that 5459N/A * You should have received a copy of the GNU General Public License version 5459N/A * 2 along with this work; if not, write to the Free Software Foundation, 5459N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5459N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5459N/A * or visit www.oracle.com if you need additional information or have any 5459N/A * @summary Test ForgetMeNot implementation feature (and more) 5459N/A for (
int j =
0; j <
2; j++) {
5459N/A for (
int j =
0; j <
2; j++) {
5459N/A //---------------------------------------------------------------- 5459N/A //---------------------------------------------------------------- //---------------------------------------------------------------- //---------------------------------------------------------------- //---------------------------------------------------------------- // @see PriorityQueue.forgetMeNot //---------------------------------------------------------------- final Integer[] a = {
0,
4,
1,
6,
7,
2,
3};
// Carefully chosen! //--------------------- Infrastructure --------------------------- else fail(x +
" not equal to " + y);}
private static abstract class Fun {
abstract void f()
throws Throwable;}
try { f.f();
fail(
"Expected " + k.
getName() +
" not thrown"); }