summaryrefslogtreecommitdiffstats
path: root/harmony-tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-04-19 14:52:19 -0700
committerElliott Hughes <enh@google.com>2013-04-19 14:52:19 -0700
commit3e0dd60f27f63195548bbc87669bd361fd1f1bc2 (patch)
tree25981e32f204af77a3518e3a0bb226012e85cee5 /harmony-tests
parent42425720d022955a996560e850c797587492e431 (diff)
downloadlibcore-3e0dd60f27f63195548bbc87669bd361fd1f1bc2.zip
libcore-3e0dd60f27f63195548bbc87669bd361fd1f1bc2.tar.gz
libcore-3e0dd60f27f63195548bbc87669bd361fd1f1bc2.tar.bz2
Fix an outdated BigInteger test.
I fixed BigInteger's behavior recently, so this test needs to change. Change-Id: I2cafa987ef290afd2a56f910d58b7a9a21b2d9e0
Diffstat (limited to 'harmony-tests')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
index a81a021..1e0e4a1 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/BigIntegerConstructorsTest.java
@@ -766,13 +766,13 @@ public class BigIntegerConstructorsTest extends TestCase {
b = new BigInteger(bits, 10, rnd);
assertEquals(b.toString(), bits, b.bitLength());
- // On Android, anything less than 16 bits will be at least 16 bits
- // because that's how OpenSSL behaves...
+ // On Android, anything less than 16 bits used to be at least 16 bits
+ // because that's how OpenSSL behaves, but we recently fixed this...
bits = 2;
b = new BigInteger(bits, 10, rnd);
- assertEquals(b.toString(), 16, b.bitLength());
+ assertEquals(b.toString(), bits, b.bitLength());
- // ...unless you use the 2-arg constructor, which doesn't use OpenSSL.
+ // The 2-arg constructor has never used OpenSSL.
bits = 2;
b = new BigInteger(bits, rnd);
assertTrue(b.toString(), b.bitLength() <= bits);