/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/ |
D | BidiTest.java | 28 Bidi bd; field in BidiTest 50 bd = new Bidi(null, Bidi.DIRECTION_RIGHT_TO_LEFT); in testNullPointerConstructor() 57 bd = new Bidi(null, 0, new byte[] { 0 }, 0, 0, in testNullPointerConstructor() 65 bd = new Bidi(null); in testNullPointerConstructor() 70 bd = new Bidi("a".toCharArray(), 0, null, 0, 1, in testNullPointerConstructor() 76 bd = new Bidi("1".toCharArray(), 0, new byte[] { 0 }, 0, 20, in testBadLength() 84 bd = new Bidi("1234567".toCharArray(), 0, new byte[] { 0 }, 0, 4, in testBadLength() 92 bd = new Bidi("1234567".toCharArray(), 4, new byte[] { 0, 1, 2, 3, in testBadLength() 100 bd = new Bidi("1234567".toCharArray(), 0, new byte[] { 0, 1, 2, 3, in testBadLength() 109 bd = new Bidi(new char[] { 't','t','t'}, -1, new byte[] { 2, 2 }, 1, 1, 1); in testBadLength() [all …]
|
/libcore/luni/src/test/java/libcore/java/math/ |
D | OldBigDecimalConstructorsTest.java | 48 BigDecimal bd; in testConstrBigIntegerMathContext() local 53 bd = new BigDecimal(bi, mc); in testConstrBigIntegerMathContext() 54 assertEquals("incorrect value", "1.234567890123456789012345678902E+34", bd.toString()); in testConstrBigIntegerMathContext() 55 bd = new BigDecimal(nbi, mc); in testConstrBigIntegerMathContext() 56 assertEquals("incorrect value", "-1.234567890123456789012345678902E+34", bd.toString()); in testConstrBigIntegerMathContext() 59 bd = new BigDecimal(bi, mc); in testConstrBigIntegerMathContext() 60 assertEquals("incorrect value", "1.234567890123456789012345678E+34", bd.toString()); in testConstrBigIntegerMathContext() 61 bd = new BigDecimal(nbi, mc); in testConstrBigIntegerMathContext() 62 assertEquals("incorrect value", "-1.234567890123456789012345678E+34", bd.toString()); in testConstrBigIntegerMathContext() 65 bd = new BigDecimal(bi, mc); in testConstrBigIntegerMathContext() [all …]
|
D | OldBigDecimalArithmeticTest.java | 477 BigDecimal bd; in testRoundNonTrivial() local 480 bd = new BigDecimal(new BigInteger("123456789012345678"), 3, mc); in testRoundNonTrivial() 481 assertEquals("incorrect value", "123456789012345.67", bd.toString()); in testRoundNonTrivial() 484 bd = (new BigDecimal(biStr)).round(mc); in testRoundNonTrivial() 485 assertEquals("incorrect value", "1.234567890123456789012345678902E+44", bd.toString()); in testRoundNonTrivial() 486 bd = (new BigDecimal(nbiStr)).round(mc); in testRoundNonTrivial() 487 assertEquals("incorrect value", "-1.234567890123456789012345678902E+44", bd.toString()); in testRoundNonTrivial() 490 bd = (new BigDecimal(biStr)).round(mc); in testRoundNonTrivial() 491 assertEquals("incorrect value", "1.234567890123456789012345678E+44", bd.toString()); in testRoundNonTrivial() 492 bd = (new BigDecimal(nbiStr)).round(mc); in testRoundNonTrivial() [all …]
|
D | OldBigDecimalTest.java | 62 BigDecimal bd; in test_constructor_String_plus_exp() local 63 bd = new BigDecimal("+23e-0"); in test_constructor_String_plus_exp() 64 assertEquals("incorrect value", "23", bd.toString()); in test_constructor_String_plus_exp() 65 bd = new BigDecimal("-23e+0"); in test_constructor_String_plus_exp() 66 assertEquals("incorrect value", "-23", bd.toString()); in test_constructor_String_plus_exp()
|
D | OldBigDecimalConvertTest.java | 441 BigDecimal bd = new BigDecimal("1"); in test_stripTrailingZeros() local 444 assertEquals("incorrect value", bdResult.unscaledValue(), bd.unscaledValue()); in test_stripTrailingZeros()
|
/libcore/luni/src/test/java/libcore/java/text/ |
D | OldBidiTest.java | 28 Bidi bd = new Bidi("bidi", 173); in testToString() local 29 assertNotNull("Bidi representation is null", bd.toString()); in testToString() 43 Bidi bd = new Bidi("text", Bidi.DIRECTION_LEFT_TO_RIGHT); in testGetRunLevelLInt() local 45 assertEquals(0, bd.getRunLevel(0)); in testGetRunLevelLInt() 46 assertEquals(0, bd.getRunLevel(bd.getRunCount())); in testGetRunLevelLInt() 51 bd = new Bidi("text", Bidi.DIRECTION_RIGHT_TO_LEFT); in testGetRunLevelLInt() 53 assertEquals(2, bd.getRunLevel(0)); in testGetRunLevelLInt() 58 bd = new Bidi("text", Bidi.DIRECTION_DEFAULT_RIGHT_TO_LEFT); in testGetRunLevelLInt() 60 assertEquals(0, bd.getRunLevel(0)); in testGetRunLevelLInt() 67 Bidi bd = new Bidi(new char[] { 's', 's', 's' }, 0, new byte[] { (byte) -7, in testGetRunStart() local [all …]
|
D | DecimalFormatTest.java | 71 BigDecimal bd = new BigDecimal(longDec); in testBigDecimalBug1897917() local 72 assertBigDecimalWithFraction(bd, "1,123.46%", 2); in testBigDecimalBug1897917() 73 assertBigDecimalWithFraction(bd, "1,123.45678901%", 8); in testBigDecimalBug1897917() 74 assertBigDecimalWithFraction(bd, "1,123.4567890123%", 10); in testBigDecimalBug1897917() 75 assertBigDecimalWithFraction(bd, "1,123.45678901234567890123%", 20); in testBigDecimalBug1897917() 76 assertBigDecimalWithFraction(bd, "1,123.456789012345678901234567890123%", 30); in testBigDecimalBug1897917() 263 private void assertBigDecimalWithFraction(BigDecimal bd, String expectedResult, int fraction) { in assertBigDecimalWithFraction() argument 266 assertEquals(expectedResult, pf.format(bd)); in assertBigDecimalWithFraction()
|
/libcore/luni/src/main/java/javax/xml/datatype/ |
D | Duration.java | 936 private String toString(BigDecimal bd) { in toString() argument 937 String intString = bd.unscaledValue().toString(); in toString() 938 int scale = bd.scale(); in toString()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
D | BigDecimalTest.java | 885 BigDecimal bd = new BigDecimal(in, 0, 9); in test_BigDecimal_serialization() local 889 oos.writeObject(bd); in test_BigDecimal_serialization() 895 assertEquals(bd.intValue(), nbd.intValue()); in test_BigDecimal_serialization() 896 assertEquals(bd.doubleValue(), nbd.doubleValue(), 0.0); in test_BigDecimal_serialization() 897 assertEquals(bd.toString(), nbd.toString()); in test_BigDecimal_serialization()
|
/libcore/ojluni/src/main/java/java/math/ |
D | BigDecimal.java | 3761 static void setIntCompactVolatile(BigDecimal bd, long val) { in setIntCompactVolatile() argument 3762 unsafe.putLongVolatile(bd, intCompactOffset, val); in setIntCompactVolatile() 3765 static void setIntValVolatile(BigDecimal bd, BigInteger val) { in setIntValVolatile() argument 3766 unsafe.putObjectVolatile(bd, intValOffset, val); in setIntValVolatile() 3913 private static void print(String name, BigDecimal bd) { in print() argument 3916 bd.intCompact, in print() 3917 bd.intVal, in print() 3918 bd.scale, in print() 3919 bd.precision); in print()
|
/libcore/luni/src/test/java/libcore/java/sql/ |
D | OldPreparedStatementTest.java | 1307 BigDecimal bd = new BigDecimal("50"); in testSetBigDecimal() local 1314 ps.setBigDecimal(1, bd); in testSetBigDecimal() 1319 ps.setBigDecimal(2, bd); in testSetBigDecimal() 1327 ps.setBigDecimal(-2, bd); in testSetBigDecimal() 1336 ps1.setBigDecimal(1, bd); in testSetBigDecimal()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | FormatterTest.java | 4003 BigDecimal bd = new BigDecimal("1.0"); in test_formatLjava_lang_String$Ljava_lang_Object_BigDecimalExceptionOrder() local 4026 f.format("%+ ,e", bd); in test_formatLjava_lang_String$Ljava_lang_Object_BigDecimalExceptionOrder() 4036 f.format("%+ -e", bd); in test_formatLjava_lang_String$Ljava_lang_Object_BigDecimalExceptionOrder() 4046 f.format("%-F", bd); in test_formatLjava_lang_String$Ljava_lang_Object_BigDecimalExceptionOrder()
|