Home
last modified time | relevance | path

Searched refs:input (Results 1 – 25 of 217) sorted by relevance

123456789

/libcore/ojluni/src/test/java/lang/Math/
DHyperbolicTests.java334 double input = Double.longBitsToDouble(i); in testSinh() local
337 StrictMath.exp(input + offset) * in testSinh()
338 StrictMath.exp(offset - ((input + offset) - input)); in testSinh()
340 testSinhCaseWithUlpDiff(input, expected, 4.0); in testSinh()
353 public static int testSinhCaseWithTolerance(double input, in testSinhCaseWithTolerance() argument
358 input, Math.sinh(input), in testSinhCaseWithTolerance()
361 -input, Math.sinh(-input), in testSinhCaseWithTolerance()
365 input, StrictMath.sinh(input), in testSinhCaseWithTolerance()
368 -input, StrictMath.sinh(-input), in testSinhCaseWithTolerance()
373 public static void testSinhCaseWithUlpDiff(double input, in testSinhCaseWithUlpDiff() argument
[all …]
DWorstCaseTests.java103 private static void testExpCase(double input, double expected) { in testExpCase() argument
105 Tests.testBounds("Math.exp", input, Math.exp(input), expected, out); in testExpCase()
106 Tests.testBounds("StrictMath.exp", input, StrictMath.exp(input), expected, out); in testExpCase()
131 private static void testLogCase(double input, double expected) { in testLogCase() argument
133 Tests.testBounds("Math.log", input, Math.log(input), expected, out); in testLogCase()
134 Tests.testBounds("StrictMath.log", input, StrictMath.log(input), expected, out); in testLogCase()
160 private static void testSinCase(double input, double expected) { in testSinCase() argument
162 Tests.testBounds("Math.sin", input, Math.sin(input), expected, out); in testSinCase()
163 Tests.testBounds("StrictMath.sin", input, StrictMath.sin(input), expected, out); in testSinCase()
188 private static void testAsinCase(double input, double expected) { in testAsinCase() argument
[all …]
DLog10Tests.java47 static void testLog10Case(double input, double expected) { in testLog10Case() argument
48 Tests.test("Math.log10(double)", input, in testLog10Case()
49 Math.log10(input), expected); in testLog10Case()
51 Tests.test("StrictMath.log10(double)", input, in testLog10Case()
52 StrictMath.log10(input), expected); in testLog10Case()
97 double input = Double.longBitsToDouble(rand.nextLong()); in testLog10() local
98 if (!Double.isFinite(input)) { in testLog10()
101 input = Math.abs(input); in testLog10()
103 double expected = StrictMath.log(input) / LN_10; in testLog10()
109 if (Math.abs(((result = Math.log10(input)) - expected) / Math.ulp(expected)) in testLog10()
[all …]
DTests.java237 public static void test(String testName, float input, in test() argument
240 "\tFor input " + input + "\t(" + toHexString(input) + ")\n" + in test()
245 public static void test(String testName, double input, in test() argument
248 "\tFor input " + input + "\t(" + toHexString(input) + ")\n" + in test()
271 public static void test(String testName, float input, in test() argument
274 "\tFor input " + input + "\t(" + toHexString(input) + ")\n" + in test()
279 public static void test(String testName, double input, in test() argument
282 "\tFor input " + input + "\t(" + toHexString(input) + ")\n" + in test()
287 public static void test(String testName, float input, in test() argument
290 "\tFor input " + input + "\t(" + toHexString(input) + ")\n" + in test()
[all …]
DRint.java35 static void testRintCase(double input, double expected) { in testRintCase() argument
36 Tests.test("Math.rint", input, Math.rint(input), expected); in testRintCase()
37 Tests.test("Math.rint", -input, Math.rint(-input), -expected); in testRintCase()
39 input, StrictMath.rint(input), expected); in testRintCase()
40 Tests.test("StrictMath.rint", -input, in testRintCase()
41 StrictMath.rint(-input), -expected); in testRintCase()
/libcore/ojluni/src/main/java/java/net/
DIDN.java105 public static String toASCII(String input, int flag) { in toASCII() argument
108 return ExtendedIDNA.convertIDNToASCII(input, flag).toString(); in toASCII()
112 if (".".equals(input)) { in toASCII()
113 return input; in toASCII()
115 throw new IllegalArgumentException("Invalid input to toASCII: " + input, e); in toASCII()
137 public static String toASCII(String input) { in toASCII() argument
138 return toASCII(input, 0); in toASCII()
160 public static String toUnicode(String input, int flag) { in toUnicode() argument
165 return convertFullStop(ExtendedIDNA.convertIDNToUnicode(input, flag)).toString(); in toUnicode()
169 return input; in toUnicode()
[all …]
DURISyntaxException.java43 private String input; field in URISyntaxException
61 public URISyntaxException(String input, String reason, int index) { in URISyntaxException() argument
63 if ((input == null) || (reason == null)) in URISyntaxException()
67 this.input = input; in URISyntaxException()
81 public URISyntaxException(String input, String reason) { in URISyntaxException() argument
82 this(input, reason, -1); in URISyntaxException()
91 return input; in getInput()
131 sb.append(input); in getMessage()
/libcore/ojluni/src/main/java/java/util/zip/
DInflater.java102 private ByteBuffer input = ZipUtils.defaultBuf; field in Inflater
165 public void setInput(byte[] input, int off, int len) { in setInput() argument
166 if (off < 0 || len < 0 || off > input.length - len) { in setInput()
170 this.input = null; in setInput()
171 this.inputArray = input; in setInput()
187 public void setInput(byte[] input) { in setInput() argument
188 setInput(input, 0, input.length); in setInput()
213 public void setInput(ByteBuffer input) { in setInput() argument
214 Objects.requireNonNull(input); in setInput()
216 this.input = input; in setInput()
[all …]
DDeflater.java102 private ByteBuffer input = ZipUtils.defaultBuf; field in Deflater
243 public void setInput(byte[] input, int off, int len) { in setInput() argument
244 if (off < 0 || len < 0 || off > input.length - len) { in setInput()
248 this.input = null; in setInput()
249 this.inputArray = input; in setInput()
264 public void setInput(byte[] input) { in setInput() argument
265 setInput(input, 0, input.length); in setInput()
290 public void setInput(ByteBuffer input) { in setInput() argument
291 Objects.requireNonNull(input); in setInput()
293 this.input = input; in setInput()
[all …]
/libcore/ojluni/src/test/java/util/regex/
DPatternStreamTest.java68 String input = "XXXXXX"; in makeStreamTestData() local
70 data.add(new Object[]{description, input, pattern}); in makeStreamTestData()
73 input = "XYXYXYYXYX"; in makeStreamTestData()
75 data.add(new Object[]{description, input, pattern}); in makeStreamTestData()
78 input = "YXYXYXYYXYXY"; in makeStreamTestData()
80 data.add(new Object[]{description, input, pattern}); in makeStreamTestData()
83 input = "awgqwefg1fefw4vssv1vvv1"; in makeStreamTestData()
85 data.add(new Object[]{description, input, pattern}); in makeStreamTestData()
87 input = "afbfq\u00a3abgwgb\u00a3awngnwggw\u00a3a\u00a3ahjrnhneerh"; in makeStreamTestData()
89 data.add(new Object[]{description, input, pattern}); in makeStreamTestData()
[all …]
/libcore/ojluni/src/main/java/javax/crypto/
DMacSpi.java77 protected abstract void engineUpdate(byte input); in engineUpdate() argument
87 protected abstract void engineUpdate(byte[] input, int offset, int len); in engineUpdate() argument
101 protected void engineUpdate(ByteBuffer input) { in engineUpdate() argument
102 if (input.hasRemaining() == false) { in engineUpdate()
105 if (input.hasArray()) { in engineUpdate()
106 byte[] b = input.array(); in engineUpdate()
107 int ofs = input.arrayOffset(); in engineUpdate()
108 int pos = input.position(); in engineUpdate()
109 int lim = input.limit(); in engineUpdate()
111 input.position(lim); in engineUpdate()
[all …]
DNullCipherSpi.java79 protected byte[] engineUpdate(byte[] input, int inputOffset, in engineUpdate() argument
81 if (input == null) return null; in engineUpdate()
83 System.arraycopy(input, inputOffset, x, 0, inputLen); in engineUpdate()
87 protected int engineUpdate(byte[] input, int inputOffset, in engineUpdate() argument
90 if (input == null) return 0; in engineUpdate()
91 System.arraycopy(input, inputOffset, output, outputOffset, inputLen); in engineUpdate()
95 protected byte[] engineDoFinal(byte[] input, int inputOffset, in engineDoFinal() argument
98 return engineUpdate(input, inputOffset, inputLen); in engineDoFinal()
101 protected int engineDoFinal(byte[] input, int inputOffset, in engineDoFinal() argument
105 return engineUpdate(input, inputOffset, inputLen, in engineDoFinal()
DCipherSpi.java489 protected abstract byte[] engineUpdate(byte[] input, int inputOffset, in engineUpdate() argument
518 protected abstract int engineUpdate(byte[] input, int inputOffset, in engineUpdate() argument
553 protected int engineUpdate(ByteBuffer input, ByteBuffer output) in engineUpdate() argument
556 return bufferCrypt(input, output, true); in engineUpdate()
610 protected abstract byte[] engineDoFinal(byte[] input, int inputOffset, in engineDoFinal() argument
667 protected abstract int engineDoFinal(byte[] input, int inputOffset, in engineDoFinal() argument
728 protected int engineDoFinal(ByteBuffer input, ByteBuffer output) in engineDoFinal() argument
731 return bufferCrypt(input, output, false); in engineDoFinal()
745 private int bufferCrypt(ByteBuffer input, ByteBuffer output, in bufferCrypt() argument
748 if ((input == null) || (output == null)) { in bufferCrypt()
[all …]
/libcore/ojluni/src/main/java/java/security/
DMessageDigestSpi.java81 protected abstract void engineUpdate(byte input); in engineUpdate() argument
94 protected abstract void engineUpdate(byte[] input, int offset, int len); in engineUpdate() argument
106 protected void engineUpdate(ByteBuffer input) { in engineUpdate() argument
107 if (input.hasRemaining() == false) { in engineUpdate()
110 if (input.hasArray()) { in engineUpdate()
111 byte[] b = input.array(); in engineUpdate()
112 int ofs = input.arrayOffset(); in engineUpdate()
113 int pos = input.position(); in engineUpdate()
114 int lim = input.limit(); in engineUpdate()
116 input.position(lim); in engineUpdate()
[all …]
DMessageDigest.java362 public void update(byte input) { in update() argument
363 engineUpdate(input); in update()
378 public void update(byte[] input, int offset, int len) { in update() argument
379 if (input == null) { in update()
382 if (input.length - offset < len) { in update()
385 engineUpdate(input, offset, len); in update()
394 public void update(byte[] input) { in update() argument
395 engineUpdate(input, 0, input.length); in update()
409 public final void update(ByteBuffer input) { in update() argument
410 if (input == null) { in update()
[all …]
DSignatureSpi.java142 protected void engineUpdate(ByteBuffer input) { in engineUpdate() argument
143 if (input.hasRemaining() == false) { in engineUpdate()
147 if (input.hasArray()) { in engineUpdate()
148 byte[] b = input.array(); in engineUpdate()
149 int ofs = input.arrayOffset(); in engineUpdate()
150 int pos = input.position(); in engineUpdate()
151 int lim = input.limit(); in engineUpdate()
153 input.position(lim); in engineUpdate()
155 int len = input.remaining(); in engineUpdate()
159 input.get(b, 0, chunk); in engineUpdate()
/libcore/ojluni/src/main/java/java/util/regex/
DPattern.java979 public Matcher matcher(CharSequence input) { in matcher() argument
989 Matcher m = new Matcher(this, input); in matcher()
1030 public static boolean matches(String regex, CharSequence input) { in matches() argument
1032 Matcher m = p.matcher(input); in matches()
1118 public String[] split(CharSequence input, int limit) { in split() argument
1120 String[] fast = fastSplit(pattern, input.toString(), limit); in split()
1128 Matcher m = matcher(input); in split()
1144 String match = input.subSequence(index, m.start()).toString(); in split()
1148 String match = input.subSequence(index, in split()
1149 input.length()).toString(); in split()
[all …]
/libcore/luni/src/test/java/libcore/java/nio/file/
DInvalidPathExceptionTest.java27 String input = "input"; in test_Constructor$String$String$Int() local
30 InvalidPathException exception = new InvalidPathException(input, reason, index); in test_Constructor$String$String$Int()
33 assertEquals(input, exception.getInput()); in test_Constructor$String$String$Int()
37 exception = new InvalidPathException(input, reason, index); in test_Constructor$String$String$Int()
40 assertEquals(input, exception.getInput()); in test_Constructor$String$String$Int()
45 new InvalidPathException(input, reason, index); in test_Constructor$String$String$Int()
66 new InvalidPathException(input, null, index); in test_Constructor$String$String$Int()
73 new InvalidPathException(input, null, index); in test_Constructor$String$String$Int()
80 String input = "input"; in test_Constructor$String$String() local
82 InvalidPathException exception = new InvalidPathException(input, reason); in test_Constructor$String$String()
[all …]
/libcore/ojluni/src/main/java/java/nio/file/
DInvalidPathException.java41 private String input; field in InvalidPathException
59 public InvalidPathException(String input, String reason, int index) { in InvalidPathException() argument
61 if ((input == null) || (reason == null)) in InvalidPathException()
65 this.input = input; in InvalidPathException()
79 public InvalidPathException(String input, String reason) { in InvalidPathException() argument
80 this(input, reason, -1); in InvalidPathException()
89 return input; in getInput()
129 sb.append(input); in getMessage()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/
DMacSpiTest.java67 protected void engineUpdate(byte input) { in engineUpdate() argument
68 super.engineUpdate(input); in engineUpdate()
72 protected void engineUpdate(byte[] input, int offset, int len) { in engineUpdate() argument
73 super.engineUpdate(input, offset, len); in engineUpdate()
101 protected void engineUpdate(byte input) { in engineUpdate() argument
102 super.engineUpdate(input); in engineUpdate()
106 protected void engineUpdate(byte[] input, int offset, int len) { in engineUpdate() argument
107 super.engineUpdate(input, offset, len); in engineUpdate()
110 protected void engineUpdate(ByteBuffer input) { in engineUpdate() argument
111 super.engineUpdate(input); in engineUpdate()
[all …]
/libcore/ojluni/src/test/java/lang/String/
DStrip.java99 static void report(String message, String inputTag, String input, in report() argument
104 System.err.println(input.codePoints() in report()
118 static void equal(String input, String expected) { in equal() argument
119 if (input == null || expected == null || !expected.equals(input)) { in equal()
120 report("Failed equal", "Input:", input, "Expected:", expected); in equal()
125 private static String String_stripCommon(String method, String input) { in String_stripCommon() argument
129 return (String) strip.invokeExact(input); in String_stripCommon()
136 private static String String_strip(String input) { in String_strip() argument
137 return String_stripCommon("strip", input); in String_strip()
141 private static String String_stripLeading(String input) { in String_stripLeading() argument
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/regex/
DSplitTest.java90 String input = "poodle zoo"; in testSplit1() local
93 tokens = p.split(input, 1); in testSplit1()
95 assertTrue(tokens[0].equals(input)); in testSplit1()
96 tokens = p.split(input, 2); in testSplit1()
100 tokens = p.split(input, 5); in testSplit1()
104 tokens = p.split(input, -2); in testSplit1()
108 tokens = p.split(input, 0); in testSplit1()
112 tokens = p.split(input); in testSplit1()
119 tokens = p.split(input, 1); in testSplit1()
121 assertTrue(tokens[0].equals(input)); in testSplit1()
[all …]
/libcore/luni/src/main/java/javax/xml/parsers/
DSAXParser.java130 InputSource input = new InputSource(is); in parse() local
131 this.parse(input, hb); in parse()
161 InputSource input = new InputSource(is); in parse() local
162 input.setSystemId(systemId); in parse()
163 this.parse(input, hb); in parse()
186 InputSource input = new InputSource(is); in parse() local
187 this.parse(input, dh); in parse()
214 InputSource input = new InputSource(is); in parse() local
215 input.setSystemId(systemId); in parse()
216 this.parse(input, dh); in parse()
[all …]
/libcore/ojluni/src/test/java/io/InputStream/
DTransferTo.java48 try (InputStream in = input()) { in ifOutIsNullThenNpeIsThrown()
52 try (InputStream in = input((byte) 1)) { in ifOutIsNullThenNpeIsThrown()
56 try (InputStream in = input((byte) 1, (byte) 2)) { in ifOutIsNullThenNpeIsThrown()
77 transferToThenCheckIfAnyClosed(input(0, new byte[]{1, 2, 3}), output()); in ifExceptionInInputNeitherStreamIsClosed()
78 transferToThenCheckIfAnyClosed(input(1, new byte[]{1, 2, 3}), output()); in ifExceptionInInputNeitherStreamIsClosed()
79 transferToThenCheckIfAnyClosed(input(2, new byte[]{1, 2, 3}), output()); in ifExceptionInInputNeitherStreamIsClosed()
85 transferToThenCheckIfAnyClosed(input(new byte[]{1, 2, 3}), output(0)); in ifExceptionInOutputNeitherStreamIsClosed()
86 transferToThenCheckIfAnyClosed(input(new byte[]{1, 2, 3}), output(1)); in ifExceptionInOutputNeitherStreamIsClosed()
87 transferToThenCheckIfAnyClosed(input(new byte[]{1, 2, 3}), output(2)); in ifExceptionInOutputNeitherStreamIsClosed()
90 private static void transferToThenCheckIfAnyClosed(InputStream input, in transferToThenCheckIfAnyClosed() argument
[all …]
/libcore/ojluni/src/test/java/io/Reader/
DTransferTo.java49 try (Reader in = input()) { in ifOutIsNullThenNpeIsThrown()
53 try (Reader in = input((char) 1)) { in ifOutIsNullThenNpeIsThrown()
57 try (Reader in = input((char) 1, (char) 2)) { in ifOutIsNullThenNpeIsThrown()
78 transferToThenCheckIfAnyClosed(input(0, new char[]{1, 2, 3}), output()); in ifExceptionInInputNeitherStreamIsClosed()
79 transferToThenCheckIfAnyClosed(input(1, new char[]{1, 2, 3}), output()); in ifExceptionInInputNeitherStreamIsClosed()
80 transferToThenCheckIfAnyClosed(input(2, new char[]{1, 2, 3}), output()); in ifExceptionInInputNeitherStreamIsClosed()
86 transferToThenCheckIfAnyClosed(input(new char[]{1, 2, 3}), output(0)); in ifExceptionInOutputNeitherStreamIsClosed()
87 transferToThenCheckIfAnyClosed(input(new char[]{1, 2, 3}), output(1)); in ifExceptionInOutputNeitherStreamIsClosed()
88 transferToThenCheckIfAnyClosed(input(new char[]{1, 2, 3}), output(2)); in ifExceptionInOutputNeitherStreamIsClosed()
91 private static void transferToThenCheckIfAnyClosed(Reader input, in transferToThenCheckIfAnyClosed() argument
[all …]

123456789