diff options
Diffstat (limited to 'libjava/testsuite/libjava.lang/BuiltinBitCount.java')
-rw-r--r-- | libjava/testsuite/libjava.lang/BuiltinBitCount.java | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/libjava/testsuite/libjava.lang/BuiltinBitCount.java b/libjava/testsuite/libjava.lang/BuiltinBitCount.java deleted file mode 100644 index bcafd31..0000000 --- a/libjava/testsuite/libjava.lang/BuiltinBitCount.java +++ /dev/null @@ -1,51 +0,0 @@ -class BuiltinBitCount -{ - public static int popcount(int x) - { - return Integer.bitCount(x); - } - - public static int popcountl(long x) - { - return Long.bitCount(x); - } - - public static void main(String[] args) - { - if (Integer.bitCount(0) != 0) - throw new Error(); - if (Integer.bitCount(8) != 1) - throw new Error(); - if (Integer.bitCount(123456) != 6) - throw new Error(); - if (Integer.bitCount(-1) != 32) - throw new Error(); - - if (Long.bitCount(0) != 0) - throw new Error(); - if (Long.bitCount(8) != 1) - throw new Error(); - if (Long.bitCount(123456) != 6) - throw new Error(); - if (Long.bitCount(-1) != 64) - throw new Error(); - - if (popcount(0) != 0) - throw new Error(); - if (popcount(8) != 1) - throw new Error(); - if (popcount(123456) != 6) - throw new Error(); - if (popcount(-1) != 32) - throw new Error(); - - if (popcountl(0) != 0) - throw new Error(); - if (popcountl(8) != 1) - throw new Error(); - if (popcountl(123456) != 6) - throw new Error(); - if (popcountl(-1) != 64) - throw new Error(); - } -} |