01: package org.bouncycastle.asn1.test;
02:
03: public class BitStringConstantTester {
04: private static final int[] bits = { 1 << 7, 1 << 6, 1 << 5, 1 << 4,
05: 1 << 3, 1 << 2, 1 << 1, 1 << 0, 1 << 15, 1 << 14, 1 << 13,
06: 1 << 12, 1 << 11, 1 << 10, 1 << 9, 1 << 8, 1 << 23,
07: 1 << 22, 1 << 21, 1 << 20, 1 << 19, 1 << 18, 1 << 17,
08: 1 << 16, 1 << 31, 1 << 30, 1 << 29, 1 << 28, 1 << 27,
09: 1 << 26, 1 << 25, 1 << 24 };
10:
11: public static void testFlagValueCorrect(int bitNo, int value) {
12: if (bits[bitNo] != value) {
13: throw new IllegalArgumentException("bit value " + bitNo
14: + " wrong");
15: }
16: }
17: }
|