/libcore/benchmarks/src/benchmarks/regression/ |
H A D | IntConstantDivisionBenchmark.java | 21 int result = 1; 23 result /= 2; 25 return result; 28 int result = 1; 30 result /= 8; 32 return result; 35 int result = 1; 37 result /= 10; 39 return result; 42 int result [all...] |
H A D | IntConstantRemainderBenchmark.java | 21 int result = 1; 23 result %= 2; 25 return result; 28 int result = 1; 30 result %= 8; 32 return result; 36 int result = 1; 38 result %= 10; 40 return result; 43 int result [all...] |
H A D | IntConstantMultiplicationBenchmark.java | 21 int result = 1; 23 result *= 6; 25 return result; 28 int result = 1; 30 result *= 7; 32 return result; 35 int result = 1; 37 result *= 8; 39 return result; 42 int result [all...] |
H A D | StringIsEmptyBenchmark.java | 21 boolean result = true; 23 result &= !("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".isEmpty()); 25 if (!result) throw new RuntimeException(); 29 boolean result = true; 31 result &= ("".isEmpty()); 33 if (!result) throw new RuntimeException(); 37 boolean result = true; 39 result &= !("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".length() == 0); 41 if (!result) throw new RuntimeException(); 45 boolean result [all...] |
H A D | MathBenchmark.java | 29 // NOTE: To avoid the benchmarked function from being optimized away, we store the result 31 // the future, a smart compiler could determine that the result value will depend on whether 35 double result = d; 37 result = Math.abs(d); 39 return result; 43 float result = f; 45 result = Math.abs(f); 47 return result; 51 int result = i; 53 result [all...] |
H A D | DoubleBenchmark.java | 24 long result = 123; 26 result = Double.doubleToLongBits(d); 28 if (result != l) { 29 throw new RuntimeException(Long.toString(result)); 34 long result = 123; 36 result = Double.doubleToRawLongBits(d); 38 if (result != l) { 39 throw new RuntimeException(Long.toString(result)); 44 double result = 123.0; 46 result [all...] |
H A D | FloatBenchmark.java | 24 int result = 123; 26 result = Float.floatToIntBits(f); 28 if (result != i) { 29 throw new RuntimeException(Integer.toString(result)); 34 int result = 123; 36 result = Float.floatToRawIntBits(f); 38 if (result != i) { 39 throw new RuntimeException(Integer.toString(result)); 44 float result = 123.0f; 46 result [all...] |
/libcore/benchmarks/src/benchmarks/ |
H A D | FieldAccessBenchmark.java | 34 int result = 0; 36 result = intVal; 38 return result; 41 int result = 0; 43 result = finalIntVal; 45 return result; 48 int result = 0; 50 result = staticIntVal; 52 return result; 55 int result [all...] |
H A D | MultiplicationBenchmark.java | 24 int result = 1; 26 result *= 10; 28 return result; 31 int result = 1; 33 result *= 8; 35 return result; 38 int result = 1; 41 result *= factor; 43 return result; 46 int result [all...] |
H A D | AdditionBenchmark.java | 24 int result = 0; 26 result += 123; 28 return result; 31 int result = 0; 34 result += constant; 36 return result; 39 long result = 0; 41 result += 123L; 43 return result; 46 long result [all...] |
/libcore/ojluni/src/main/java/java/util/concurrent/ |
H A D | RecursiveTask.java | 39 * A recursive result-bearing {@link ForkJoinTask}. 72 * The result of the computation. 74 V result; field in class:RecursiveTask 78 * @return the result of the computation 83 return result; 87 result = value; 94 result = compute();
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | ListResourceBundleTest.java | 36 Vector<String> result = new Vector<String>(); 38 result.addElement(keys.nextElement()); 40 assertTrue("Missing key parent1", result.contains("parent1")); 41 assertTrue("Missing key parent2", result.contains("parent2")); 42 assertTrue("Missing key parent3", result.contains("parent3")); 43 assertTrue("Missing key parent4", result.contains("parent4")); 44 assertTrue("Missing key child1", result.contains("child1")); 45 assertTrue("Missing key child2", result.contains("child2")); 46 assertTrue("Missing key child3", result.contains("child3")); 56 Vector result [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/ |
H A D | BigDecimalConvertTest.java | 39 double result = -1.2380964839238476E53; 40 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); 49 double result = 1.2380964839238476E53; 50 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); 59 double result = Double.POSITIVE_INFINITY; 60 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); 69 double result = Double.NEGATIVE_INFINITY; 70 assertEquals("incorrect value", result, aNumber.doubleValue(), 0); 80 double result = aNumber.doubleValue(); 81 assertTrue("incorrect value", Double.doubleToLongBits(result) [all...] |
H A D | BigIntegerToStringTest.java | 39 String result = aNumber.toString(45); 40 assertTrue(result.equals(value)); 50 String result = aNumber.toString(radix); 51 assertTrue(result.equals(value)); 61 String result = aNumber.toString(radix); 62 assertTrue(result.equals(value)); 72 String result = aNumber.toString(radix); 73 assertTrue(result.equals(value)); 83 String result = aNumber.toString(radix); 84 assertTrue(result [all...] |
H A D | BigIntegerAddTest.java | 42 BigInteger result = aNumber.add(bNumber); 44 resBytes = result.toByteArray(); 48 assertEquals("incorrect sign", 1, result.signum()); 62 BigInteger result = aNumber.add(bNumber); 64 resBytes = result.toByteArray(); 68 assertEquals("incorrect sign", -1, result.signum()); 84 BigInteger result = aNumber.add(bNumber); 86 resBytes = result.toByteArray(); 90 assertEquals("incorrect sign", 1, result.signum()); 106 BigInteger result [all...] |
/libcore/support/src/test/java/libcore/tlswire/handshake/ |
H A D | HandshakeMessage.java | 39 HandshakeMessage result; 42 result = new ClientHello(); 45 result = new HandshakeMessage(); 48 result.type = type; 50 result.body = new byte[bodyLength]; 51 in.readFully(result.body); 52 result.parseBody(new DataInputStream(new ByteArrayInputStream(result.body))); 53 return result;
|
H A D | HelloExtension.java | 74 HelloExtension result; 77 result = new ServerNameHelloExtension(); 80 result = new EllipticCurvesHelloExtension(); 83 result = new HelloExtension(); 86 result.type = type; 87 result.name = TYPE_TO_NAME.get(result.type); 88 if (result.name == null) { 89 result.name = String.valueOf(result [all...] |
/libcore/support/src/test/java/libcore/tlswire/record/ |
H A D | TlsRecord.java | 32 TlsRecord result = new TlsRecord(); 33 result.type = in.readUnsignedByte(); 34 result.version = TlsProtocolVersion.read(in); 36 result.fragment = new byte[fragmentLength]; 37 in.readFully(result.fragment); 38 return result;
|
/libcore/luni/src/main/java/libcore/reflect/ |
H A D | ListOfTypes.java | 53 Type[] result = resolvedTypes; 54 if (result == null) { 55 result = resolveTypes(types); 56 resolvedTypes = result; 58 return result; 66 Type[] result = new Type[size]; 70 result[i] = ((ParameterizedTypeImpl) type).getResolvedType(); 72 result[i] = type; 75 return result; 79 StringBuilder result [all...] |
/libcore/luni/src/test/java/libcore/java/math/ |
H A D | OldBigIntegerOperateBitsTest.java | 41 int result = aNumber.getLowestSetBit(); 42 assertTrue("incorrect value", result == iNumber); 56 int result = aNumber.getLowestSetBit(); 57 assertTrue("incorrect value", result == iNumber); 64 result = aNumber.getLowestSetBit(); 65 assertTrue("incorrect value", result == iNumber); 72 result = aNumber.getLowestSetBit(); 73 assertTrue("incorrect value", result == iNumber); 87 int result = aNumber.getLowestSetBit(); 88 assertTrue("incorrect value", result [all...] |
/libcore/luni/src/test/java/libcore/xml/ |
H A D | KxmlPullParserDtdTest.java | 25 KXmlParser result = new KXmlParser(); 26 result.setFeature(XmlPullParser.FEATURE_PROCESS_DOCDECL, true); 27 return result;
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | EnumSet.java | 130 EnumSet<E> result = noneOf(elementType); 131 result.addAll(); 132 return result; 176 EnumSet<E> result = EnumSet.of(first); 178 result.add(i.next()); 179 return result; 194 EnumSet<E> result = copyOf(s); 195 result.complement(); 196 return result; 214 EnumSet<E> result [all...] |
/libcore/ojluni/src/main/java/java/lang/ |
H A D | StackTraceElement.java | 174 StringBuilder result = new StringBuilder(); 175 result.append(getClassName()).append(".").append(methodName); 177 result.append("(Native Method)"); 180 result.append("(").append(fileName).append(":").append(lineNumber).append(")"); 182 result.append("(").append(fileName).append(")"); 187 result.append("(Unknown Source:").append(lineNumber).append(")"); 189 result.append("(Unknown Source)"); 192 return result.toString(); 230 int result = 31*declaringClass.hashCode() + methodName.hashCode(); 231 result [all...] |
/libcore/ojluni/src/main/java/sun/nio/ch/ |
H A D | CompletedFuture.java | 34 * A Future representing the result of an I/O operation that has already 39 private final V result; field in class:CompletedFuture 42 private CompletedFuture(V result, Throwable exc) { argument 43 this.result = result; 47 static <V> CompletedFuture<V> withResult(V result) { argument 48 return new CompletedFuture<V>(result, null); 58 static <V> CompletedFuture<V> withResult(V result, Throwable exc) { argument 60 return withResult(result); 70 return result; [all...] |
/libcore/luni/src/test/java/tests/java/sql/ |
H A D | MultiThreadAccessTest.java | 163 ResultSet result = statement.executeQuery(selectQuery + id1); 164 assertFalse("The record was not deleted", result.next()); 166 result = statement.executeQuery(selectQuery + id2); 167 assertTrue("The record was not inserted", result.next()); 170 + id2, result.getString("field1")); 172 assertEquals("Wrong value of field2", Integer.valueOf(id2).intValue(), result 174 assertEquals("Wrong value of field3", Integer.valueOf(id2).intValue(), result 176 result.close(); 178 result = statement.executeQuery(selectQuery + oldID); 179 assertFalse("The record was not deleted", result [all...] |