Home
last modified time | relevance | path

Searched refs:number (Results 1 – 25 of 48) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DNumberTest.java26 int number = 1231243; in test_byteValue() local
27 assertTrue("Incorrect byte returned for: " + number, in test_byteValue()
28 ((byte) new Integer(number).intValue()) == new Integer(number) in test_byteValue()
30 number = 0; in test_byteValue()
31 assertTrue("Incorrect byte returned for: " + number, in test_byteValue()
32 ((byte) new Integer(number).intValue()) == new Integer(number) in test_byteValue()
34 number = -1; in test_byteValue()
35 assertTrue("Incorrect byte returned for: " + number, in test_byteValue()
36 ((byte) new Integer(number).intValue()) == new Integer(number) in test_byteValue()
38 number = -84109328; in test_byteValue()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerOperateBitsTest.java130 int number = -7; in testClearBitException() local
133 aNumber.clearBit(number); in testClearBitException()
145 int number = 0; in testClearBitZero() local
148 BigInteger result = aNumber.clearBit(number); in testClearBitZero()
163 int number = 95; in testClearBitZeroOutside1() local
166 BigInteger result = aNumber.clearBit(number); in testClearBitZeroOutside1()
181 int number = 15; in testClearBitNegativeInside1() local
184 BigInteger result = aNumber.clearBit(number); in testClearBitNegativeInside1()
199 int number = 44; in testClearBitNegativeInside2() local
202 BigInteger result = aNumber.clearBit(number); in testClearBitNegativeInside2()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DSupport_DecimalFormat.java42 Number number = new Double(10000000.76); in t_format_with_FieldPosition() local
45 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY, 0, 1); in t_format_with_FieldPosition()
46 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER, 1, 11); in t_format_with_FieldPosition()
47 t_FormatWithField(2, format, number, text, NumberFormat.Field.GROUPING_SEPARATOR, 3, 4); in t_format_with_FieldPosition()
48 t_FormatWithField(3, format, number, text, NumberFormat.Field.DECIMAL_SEPARATOR, 11, 12); in t_format_with_FieldPosition()
49 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION, 12, 14); in t_format_with_FieldPosition()
52 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0, 0); in t_format_with_FieldPosition()
53 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT, 0, 0); in t_format_with_FieldPosition()
54 t_FormatWithField(7, format, number, text, NumberFormat.Field.EXPONENT_SIGN, 0, 0); in t_format_with_FieldPosition()
55 t_FormatWithField(8, format, number, text, NumberFormat.Field.EXPONENT_SYMBOL, 0, 0); in t_format_with_FieldPosition()
[all …]
DDecimalFormatTest.java96 Number number = form.parse("23.1", new ParsePosition(0)); in test_parse_returnType() local
97 assertTrue(number instanceof Double); in test_parse_returnType()
103 number = form.parse("23.1", new ParsePosition(0)); in test_parse_returnType()
104 assertTrue(number instanceof Double); in test_parse_returnType()
107 number = form.parse("23.1", new ParsePosition(0)); in test_parse_returnType()
109 assertTrue(number instanceof BigDecimal); in test_parse_returnType()
110 assertEquals(new BigDecimal("23.1"), number); in test_parse_returnType()
118 number = form.parse("23.1f", new ParsePosition(0)); in test_parse_returnType()
120 assertTrue(number instanceof Long); in test_parse_returnType()
122 number = form.parse("23.0", new ParsePosition(0)); in test_parse_returnType()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_DecimalFormat.java44 Number number = new Double(10000000.76); in t_format_with_FieldPosition() local
47 t_FormatWithField(0, format, number, text, NumberFormat.Field.CURRENCY, in t_format_with_FieldPosition()
49 t_FormatWithField(1, format, number, text, NumberFormat.Field.INTEGER, in t_format_with_FieldPosition()
51 t_FormatWithField(2, format, number, text, in t_format_with_FieldPosition()
53 t_FormatWithField(3, format, number, text, in t_format_with_FieldPosition()
55 t_FormatWithField(4, format, number, text, NumberFormat.Field.FRACTION, in t_format_with_FieldPosition()
59 t_FormatWithField(5, format, number, text, NumberFormat.Field.SIGN, 0, in t_format_with_FieldPosition()
61 t_FormatWithField(6, format, number, text, NumberFormat.Field.EXPONENT, in t_format_with_FieldPosition()
63 t_FormatWithField(7, format, number, text, in t_format_with_FieldPosition()
65 t_FormatWithField(8, format, number, text, in t_format_with_FieldPosition()
[all …]
/libcore/ojluni/src/main/java/java/text/
DDecimalFormat.java623 public final StringBuffer format(Object number, in format() argument
626 if (number instanceof Long || number instanceof Integer || in format()
627 number instanceof Short || number instanceof Byte || in format()
628 number instanceof AtomicInteger || in format()
629 number instanceof AtomicLong || in format()
630 (number instanceof BigInteger && in format()
631 ((BigInteger)number).bitLength () < 64)) { in format()
632 return format(((Number)number).longValue(), toAppendTo, pos); in format()
633 } else if (number instanceof BigDecimal) { in format()
634 return format((BigDecimal)number, toAppendTo, pos); in format()
[all …]
DNumberFormat.java234 public StringBuffer format(Object number, in format() argument
237 if (number instanceof Long || number instanceof Integer || in format()
238 number instanceof Short || number instanceof Byte || in format()
239 number instanceof AtomicInteger || number instanceof AtomicLong || in format()
240 (number instanceof BigInteger && in format()
241 ((BigInteger)number).bitLength() < 64)) { in format()
242 return format(((Number)number).longValue(), toAppendTo, pos); in format()
243 } else if (number instanceof Number) { in format()
244 return format(((Number)number).doubleValue(), toAppendTo, pos); in format()
288 public final String format(double number) { in format() argument
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DForkJoinTaskTest.java339 int number;
341 this.number = n;
346 int n = f.number;
359 number = ((AsyncFib)x).number + ((AsyncFib)y).number;
364 int number;
366 this.number = n;
371 int n = f.number;
398 assertEquals(21, f.number);
414 assertEquals(21, f.number);
429 assertEquals(21, f.number);
[all …]
DCountedCompleterTest.java528 int number;
533 this.number = n;
538 int n = number;
555 int n = number + rnumber;
557 p.number = n;
559 number = n;
569 int n = number + rnumber;
573 number = n;
579 int number;
584 this.number = n;
[all …]
DForkJoinPool8Test.java188 final int number; field in ForkJoinPool8Test.FibAction
190 FibAction(int n) { number = n; } in FibAction()
192 int n = number; in realCompute()
206 final int number; field in ForkJoinPool8Test.FailingFibAction
208 FailingFibAction(int n) { number = n; } in FailingFibAction()
210 int n = number; in compute()
866 int number; field in ForkJoinPool8Test.CCF
871 this.number = n; in CCF()
877 int n = number; in compute()
882 f.number = n; in compute()
[all …]
DForkJoinTask8Test.java306 int number;
308 public AsyncFib(int number) {
309 this.number = number;
310 this.expectedResult = fib[number];
316 int n = f.number;
335 number = ((AsyncFib)x).number + ((AsyncFib)y).number;
340 assertEquals(expectedResult, number);
346 int number;
348 this.number = n;
354 int n = f.number;
[all …]
/libcore/ojluni/src/test/java/util/concurrent/tck/
DForkJoinTaskTest.java361 int number;
363 this.number = n;
368 int n = f.number;
381 number = ((AsyncFib)x).number + ((AsyncFib)y).number;
386 int number;
388 this.number = n;
393 int n = f.number;
420 assertEquals(21, f.number);
436 assertEquals(21, f.number);
451 assertEquals(21, f.number);
[all …]
DCountedCompleterTest.java553 int number;
558 this.number = n;
563 int n = number;
580 int n = number + rnumber;
582 p.number = n;
584 number = n;
594 int n = number + rnumber;
598 number = n;
604 int number;
609 this.number = n;
[all …]
DForkJoinPool8Test.java212 final int number; field in ForkJoinPool8Test.FibAction
214 FibAction(int n) { number = n; } in FibAction()
216 int n = number; in realCompute()
230 final int number; field in ForkJoinPool8Test.FailingFibAction
232 FailingFibAction(int n) { number = n; } in FailingFibAction()
234 int n = number; in compute()
884 int number; field in ForkJoinPool8Test.CCF
889 this.number = n; in CCF()
895 int n = number; in compute()
900 f.number = n; in compute()
[all …]
DForkJoinTask8Test.java329 int number;
331 public AsyncFib(int number) {
332 this.number = number;
333 this.expectedResult = fib[number];
339 int n = f.number;
358 number = ((AsyncFib)x).number + ((AsyncFib)y).number;
363 assertEquals(expectedResult, number);
369 int number;
371 this.number = n;
377 int n = f.number;
[all …]
/libcore/json/src/main/java/org/json/
DJSONTokener.java304 String number = literal; in readLiteral() local
305 if (number.startsWith("0x") || number.startsWith("0X")) { in readLiteral()
306 number = number.substring(2); in readLiteral()
308 } else if (number.startsWith("0") && number.length() > 1) { in readLiteral()
309 number = number.substring(1); in readLiteral()
313 long longValue = Long.parseLong(number, base); in readLiteral()
/libcore/luni/src/test/resources/bundles/java/util/logging/
Dres_en_US.properties11 pattern=US_pattern {0, number}
12 pattern{0,number}=US
Dres.properties11 pattern=US_pattern {0, number}
12 pattern{0,number}=US
Dres3.properties11 pattern=pattern {0, number}3
12 pattern{0,number}=NOLOCALE3
Dres_zh_CN.properties11 pattern=ZH_CN_pattern {0, number}
12 pattern{0,number}=ZH_CN
Dres2.properties11 pattern=pattern {0, number}2
12 pattern{0,number}=NOLOCALE2
/libcore/luni/src/test/java/libcore/java/text/
DDecimalFormatTest.java507 double number = 0.1; in testPerMill() local
515 assertEquals("100\u2030", df.format(number)); in testPerMill()
518 assertEquals("100\u2030", df.format(number)); in testPerMill()
524 assertEquals("100;", new DecimalFormat(pattern, dfs).format(number)); in testPerMill()
534 assertEquals("\u0661\u0660\u0660\u0609", df.format(number)); in testPerMill()
538 assertEquals("\u0661\u0660\u0660\u0609", df.format(number)); in testPerMill()
551 assertEquals("1000/00", df.format(number)); in testPerMill()
555 assertEquals("100\u2030", df.format(number)); in testPerMill()
564 double number = 0.1; in testPercent() local
572 assertEquals("10%", df.format(number)); in testPercent()
[all …]
/libcore/ojluni/annotations/hiddenapi/java/text/
DNumberFormat.java52 java.lang.Object number, in format() argument
63 public final java.lang.String format(double number) { in format() argument
67 public final java.lang.String format(long number) { in format() argument
72 double number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos); in format() argument
75 long number, java.lang.StringBuffer toAppendTo, java.text.FieldPosition pos); in format() argument
/libcore/ojluni/annotations/sdk/nullability/java/text/
DNumberFormat.annotated.java54 …lic java.lang.StringBuffer format(@libcore.util.NonNull java.lang.Object number, @libcore.util.Non… in format() argument
58 @libcore.util.NonNull public final java.lang.String format(double number) { throw new RuntimeExcept… in format() argument
60 @libcore.util.NonNull public final java.lang.String format(long number) { throw new RuntimeExceptio… in format() argument
62 @libcore.util.NonNull public abstract java.lang.StringBuffer format(double number, @libcore.util.No… in format() argument
64 @libcore.util.NonNull public abstract java.lang.StringBuffer format(long number, @libcore.util.NonN… in format() argument
/libcore/luni/src/test/java/libcore/java/util/logging/
DOldLogManagerTest.java233 static int number = 0; field in OldLogManagerTest.MockHandler
240 number++; in addNumber()
248 number--; in minusNumber()

12