/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 6359979
* @summary Compare List implementations for identical behavior
* @author Martin Buchholz
*/
@SuppressWarnings("unchecked")
public class LockStep {
}
new LinkedList(),
new Vector());
}
}
equal(x, y);
equal(y, x);
}
for (int i = 0; i < size; i++) {
}
}
{
new F(){void f(){
new F(){void f(){
new F(){void f(){
new F(){void f(){
new F(){void f(){
new F(){void f(){
}
}
final int s = l.size();
THROWS(IndexOutOfBoundsException.class,
);
THROWS(IllegalArgumentException.class,
}
}
}
}
}
}
}
final int s = l.size();
for (int i = 0; i < subListCount; i++)
if (! useIterator) {
if (atBeginning) {
default: throw new Error();
}
} else {
default: throw new Error();
}
}
} else {
if (atBeginning) {
} else {
}
}}};
}
final int s = l.size();
for (int i = 0; i < subListCount; i++)
switch (position) {
case 0: // beginning
case 1: {
THROWS(IllegalStateException.class,
THROWS(IllegalStateException.class,
break;}
case 2: {
THROWS(IllegalStateException.class,
THROWS(IllegalStateException.class,
break;}
default: throw new Error();
}
break;
case 1: // midpoint
case 1: {
break;
}
case 2: {
break;
}
default: throw new Error();
}
break;
case 2: // end
case 2:
THROWS(IllegalStateException.class,
THROWS(IllegalStateException.class,
break;
default: throw new Error();
}
break;
default: throw new Error();
}}};
}
//--------------------- Infrastructure ---------------------------
else fail(x + " not equal to " + y);}
abstract class F {abstract void f() throws Throwable;}
for (F f : fs)
catch (Throwable t) {
else unexpected(t);}}
try {
return baos.toByteArray();
} catch (IOException e) { throw new RuntimeException(e); }}
throws IOException, ClassNotFoundException {
@SuppressWarnings("unchecked")
catch (Exception e) { throw new RuntimeException(e); }}
}