/*
* 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 4495754
* @summary Basic test for int bit twiddling
* @author Josh Bloch
*/
public class BitTwiddle {
private static final int N = 1000; // # of repetitions per test
throw new RuntimeException("a");
throw new RuntimeException("b");
throw new RuntimeException("c");
throw new RuntimeException("d");
throw new RuntimeException("e");
throw new RuntimeException("f");
for (int i = 0; i < N; i++) {
}
throw new RuntimeException("h");
throw new RuntimeException("i");
throw new RuntimeException("j");
throw new RuntimeException("k");
throw new RuntimeException("l");
throw new RuntimeException("m");
for (int i = 0; i < N; i++) {
}
throw new RuntimeException("o");
for (int i = 0; i < SIZE; i++) {
int pow2 = 1 << i;
throw new RuntimeException("p: " + i);
throw new RuntimeException("q: " + i);
}
for (int i = 0; i < N; i++) {
}
for (int i = 0; i < N; i++) {
toHexString(dist));
toHexString(dist));
toHexString(dist));
toHexString(dist));
}
throw new RuntimeException("w");
for (int i = 0; i < N; i++) {
}
throw new RuntimeException("y");
for (int i = 0; i < N; i++) {
}
}
}