12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.math.BigInteger;
25 import java.util.Random;
26 import sun.misc.FDBigInteger;
27
28 /**
29 * @test
30 * @bug 7032154
31 * @summary unit testys of sun.misc.FDBigInteger
32 * @author Dmitry Nadezhin
33 */
34 public class TestFDBigInteger {
35
36 private static final int MAX_P5 = 413;
37 private static final int MAX_P2 = 65;
38 private static final long LONG_SIGN_MASK = (1L << 63);
39 private static final BigInteger FIVE = BigInteger.valueOf(5);
40 private static final FDBigInteger MUTABLE_ZERO = FDBigInteger.valueOfPow52(0, 0).leftInplaceSub(FDBigInteger.valueOfPow52(0, 0));
41 private static final FDBigInteger IMMUTABLE_ZERO = FDBigInteger.valueOfPow52(0, 0).leftInplaceSub(FDBigInteger.valueOfPow52(0, 0));
42 private static final FDBigInteger IMMUTABLE_MILLION = genMillion1();
43 private static final FDBigInteger IMMUTABLE_BILLION = genBillion1();
44 private static final FDBigInteger IMMUTABLE_TEN18 = genTen18();
45
46 static {
47 IMMUTABLE_ZERO.makeImmutable();
48 IMMUTABLE_MILLION.makeImmutable();
49 IMMUTABLE_BILLION.makeImmutable();
50 IMMUTABLE_TEN18.makeImmutable();
51 }
|
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import java.math.BigInteger;
25 import java.util.Random;
26 import sun.misc.FDBigInteger;
27
28 /**
29 * @test
30 * @bug 7032154
31 * @summary unit testys of sun.misc.FDBigInteger
32 * @modules java.base/sun.misc
33 * @author Dmitry Nadezhin
34 */
35 public class TestFDBigInteger {
36
37 private static final int MAX_P5 = 413;
38 private static final int MAX_P2 = 65;
39 private static final long LONG_SIGN_MASK = (1L << 63);
40 private static final BigInteger FIVE = BigInteger.valueOf(5);
41 private static final FDBigInteger MUTABLE_ZERO = FDBigInteger.valueOfPow52(0, 0).leftInplaceSub(FDBigInteger.valueOfPow52(0, 0));
42 private static final FDBigInteger IMMUTABLE_ZERO = FDBigInteger.valueOfPow52(0, 0).leftInplaceSub(FDBigInteger.valueOfPow52(0, 0));
43 private static final FDBigInteger IMMUTABLE_MILLION = genMillion1();
44 private static final FDBigInteger IMMUTABLE_BILLION = genBillion1();
45 private static final FDBigInteger IMMUTABLE_TEN18 = genTen18();
46
47 static {
48 IMMUTABLE_ZERO.makeImmutable();
49 IMMUTABLE_MILLION.makeImmutable();
50 IMMUTABLE_BILLION.makeImmutable();
51 IMMUTABLE_TEN18.makeImmutable();
52 }
|