Home
last modified time | relevance | path

Searched refs:res (Results 1 – 25 of 79) sorted by relevance

1234

/libcore/luni/src/test/java/libcore/java/sql/
DOldResultSetGetterTests.java47 ResultSet res = null; field in OldResultSetGetterTests
222 res = st.executeQuery(queryAllSelect); in setUp()
223 assertTrue(res.next()); in setUp()
230 res.close(); in tearDown()
234 res.close(); in tearDown()
245 res.next(); in testGetBytesInt()
247 assertNull(res.getBytes(i)); in testGetBytesInt()
252 res.close(); in testGetBytesInt()
253 res.getBytes(24); in testGetBytesInt()
265 ResultSet res = null; in testGetBytesIntVarbinary() local
[all …]
/libcore/luni/src/test/java/libcore/java/math/
DOldBigDecimalArithmeticTest.java30 BigDecimal a, b, res; in testAddMathContextNonTrivial() local
41 res = a.add(b, mc); in testAddMathContextNonTrivial()
42 assertEquals("incorrect value", "223456789012345.68", res.toString()); in testAddMathContextNonTrivial()
47 res = a.add(b, mc); in testAddMathContextNonTrivial()
48 assertEquals("Incorrect value!", "2234567890123456879012345678.90124", res.toString()); in testAddMathContextNonTrivial()
49 assertEquals("Incorrect scale!", 5, res.scale()); in testAddMathContextNonTrivial()
50 assertEquals("Incorrect precision!", 33, res.precision()); in testAddMathContextNonTrivial()
55 BigDecimal a, b, res; in testSubtractMathContextNonTrivial() local
62 res = a.subtract(b, mc); in testSubtractMathContextNonTrivial()
63 assertEquals("incorrect value", "2345678901234566.9", res.toString()); in testSubtractMathContextNonTrivial()
[all …]
DOldBigDecimalScaleOperationsTest.java31 BigDecimal res = a.movePointRight(10); in testMovePointRightEx() local
32 assertEquals("incorrect scale", 24, res.scale()); in testMovePointRightEx()
33 assertEquals("incorrect value", "123456789012345.678901234567890123456789", res.toString()); in testMovePointRightEx()
34 res = a.movePointRight(-50); in testMovePointRightEx()
35 assertEquals("incorrect scale", 84, res.scale()); in testMovePointRightEx()
36 … assertEquals("incorrect value", "1.23456789012345678901234567890123456789E-46", res.toString()); in testMovePointRightEx()
56 BigDecimal res = a.movePointRight(10); in testScaleByPowerOfTenEx() local
57 assertEquals("incorrect scale", 24, res.scale()); in testScaleByPowerOfTenEx()
58 assertEquals("incorrect value", "123456789012345.678901234567890123456789", res.toString()); in testScaleByPowerOfTenEx()
59 res = a.scaleByPowerOfTen(-50); in testScaleByPowerOfTenEx()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/math/
DBigIntegerXorTest.java37 String res = "27384627835298756289327365"; in testZeroPos() local
41 assertTrue(res.equals(result.toString())); in testZeroPos()
50 String res = "-27384627835298756289327365"; in testZeroNeg() local
54 assertTrue(res.equals(result.toString())); in testZeroNeg()
63 String res = "27384627835298756289327365"; in testPosZero() local
67 assertTrue(res.equals(result.toString())); in testPosZero()
76 String res = "-27384627835298756289327365"; in testNegPos() local
80 assertTrue(res.equals(result.toString())); in testNegPos()
89 String res = "0"; in testZeroZero() local
93 assertTrue(res.equals(result.toString())); in testZeroZero()
[all …]
DBigDecimalConstructorsTest.java104 String res = "1231212478987482988429808779810457634781384757"; in testConstrBigIntegerMathContext() local
107 assertEquals("incorrect value", res, result.unscaledValue().toString()); in testConstrBigIntegerMathContext()
121 String res = "1231212478987482988429808779810457634781384757"; in testConstrBigIntegerScaleMathContext() local
124 assertEquals("incorrect value", res, result.unscaledValue().toString()); in testConstrBigIntegerScaleMathContext()
134 String res = "-1.23804738E-419"; in testConstrChar() local
136 assertEquals("incorrect value", res, result.toString()); in testConstrChar()
155 String res = "3.804738E-40"; in testConstrCharIntInt() local
157 assertEquals("incorrect value", res, result.toString()); in testConstrCharIntInt()
179 String res = "3.805E-40"; in testConstrCharIntIntMathContext() local
181 assertEquals("incorrect value", res, result.toString()); in testConstrCharIntIntMathContext()
[all …]
DBigDecimalCompareTest.java67 BigDecimal res = aNumber.abs(mc); in testAbsMathContextNeg() local
68 assertEquals("incorrect value", result, res.toString()); in testAbsMathContextNeg()
69 assertEquals("incorrect scale", resScale, res.scale()); in testAbsMathContextNeg()
83 BigDecimal res = aNumber.abs(mc); in testAbsMathContextPos() local
84 assertEquals("incorrect value", result, res.toString()); in testAbsMathContextPos()
85 assertEquals("incorrect scale", resScale, res.scale()); in testAbsMathContextPos()
379 BigDecimal res = aNumber.plus(mc); in testPlusMathContextPositive() local
380 assertEquals("incorrect value", c, res.toString()); in testPlusMathContextPositive()
381 assertEquals("incorrect scale", cScale, res.scale()); in testPlusMathContextPositive()
409 BigDecimal res = aNumber.plus(mc); in testPlusMathContextNegative() local
[all …]
DBigDecimalConvertTest.java205 String res = "1231212478987482988429808779810457634781384756794.987"; in testScaleByPowerOfTen1() local
207 assertEquals("incorrect value", res, result.toString()); in testScaleByPowerOfTen1()
219 String res = "1.231212478987482988429808779810457634781384756794987E+74"; in testScaleByPowerOfTen2() local
221 assertEquals("incorrect value", res, result.toString()); in testScaleByPowerOfTen2()
308 … String res = "-123809648392384754573567356745735635678902957849027687876782870000000000000000"; in testToBigIntegerExact1() local
310 assertEquals("incorrect value", res, result.toString()); in testToBigIntegerExact1()
515 String res = "-65678765876567576"; in testValueOfDoubleNeg() local
517 assertEquals("incorrect value", res, result.toString()); in testValueOfDoubleNeg()
527 String res = "65678765876567576"; in testValueOfDoublePos1() local
529 assertEquals("incorrect value", res, result.toString()); in testValueOfDoublePos1()
[all …]
/libcore/ojluni/src/main/native/
DEPollPort.c44 jint res[2]; in Java_sun_nio_ch_EPollPort_socketpair() local
45 res[0] = (jint)sp[0]; in Java_sun_nio_ch_EPollPort_socketpair()
46 res[1] = (jint)sp[1]; in Java_sun_nio_ch_EPollPort_socketpair()
47 (*env)->SetIntArrayRegion(env, sv, 0, 2, &res[0]); in Java_sun_nio_ch_EPollPort_socketpair()
53 int res; in Java_sun_nio_ch_EPollPort_interrupt() local
56 RESTARTABLE(write(fd, buf, 1), res); in Java_sun_nio_ch_EPollPort_interrupt()
57 if (res < 0) { in Java_sun_nio_ch_EPollPort_interrupt()
64 int res; in Java_sun_nio_ch_EPollPort_drain1() local
66 RESTARTABLE(read(fd, buf, 1), res); in Java_sun_nio_ch_EPollPort_drain1()
67 if (res < 0) { in Java_sun_nio_ch_EPollPort_drain1()
[all …]
DEPoll.c77 int res; in Java_sun_nio_ch_EPoll_epollCtl() local
82 RESTARTABLE(epoll_ctl(epfd, (int)opcode, (int)fd, &event), res); in Java_sun_nio_ch_EPoll_epollCtl()
84 return (res == 0) ? 0 : errno; in Java_sun_nio_ch_EPoll_epollCtl()
92 int res; in Java_sun_nio_ch_EPoll_epollWait() local
94 RESTARTABLE(epoll_wait(epfd, events, numfds, -1), res); in Java_sun_nio_ch_EPoll_epollWait()
95 if (res < 0) { in Java_sun_nio_ch_EPoll_epollWait()
98 return res; in Java_sun_nio_ch_EPoll_epollWait()
103 int res; in Java_sun_nio_ch_EPoll_close0() local
104 RESTARTABLE(close(epfd), res); in Java_sun_nio_ch_EPoll_close0()
DLinuxNativeDispatcher.c86 size_t res = -1; in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0() local
94 res = (*my_fgetxattr_func)(fd, name, value, valueLen); in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0()
96 if (res == (size_t)-1) in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0()
98 return (jint)res; in Java_sun_nio_fs_LinuxNativeDispatcher_fgetxattr0()
105 int res = -1; in Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0() local
113 res = (*my_fsetxattr_func)(fd, name, value, valueLen, 0); in Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0()
115 if (res == -1) in Java_sun_nio_fs_LinuxNativeDispatcher_fsetxattr0()
123 int res = -1; in Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0() local
130 res = (*my_fremovexattr_func)(fd, name); in Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0()
132 if (res == -1) in Java_sun_nio_fs_LinuxNativeDispatcher_fremovexattr0()
[all …]
DFileKey.c60 int res; in FileKey_init() local
62 RESTARTABLE(fstat64(fdval(env, fdo), &fbuf), res); in FileKey_init()
63 if (res < 0) { in FileKey_init()
/libcore/luni/src/main/java/java/math/
DMultiplication.java130 BigInteger res = null; in powerOf10() local
135 res = bigFivePows[1].pow(intExp).shiftLeft(intExp); in powerOf10()
145 res = powerOfFive; in powerOf10()
150 res = res.multiply(powerOfFive); in powerOf10()
153 res = res.multiply(bigFivePows[1].pow(intExp)); in powerOf10()
155 res = res.shiftLeft(Integer.MAX_VALUE); in powerOf10()
158 res = res.shiftLeft(Integer.MAX_VALUE); in powerOf10()
161 res = res.shiftLeft(intExp); in powerOf10()
167 return res; in powerOf10()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/security/auth/callback/
DPasswordCallbackTest.java89 char[] res = pc.getPassword(); in test_Password() local
90 assertEquals(psw2.length, res.length); in test_Password()
91 for (int i = 0; i < res.length; i++) { in test_Password()
92 assertEquals("Incorrect password was returned", psw2[i], res[i]); in test_Password()
95 res = pc.getPassword(); in test_Password()
96 if (Arrays.equals(res, psw2)) { in test_Password()
100 res = pc.getPassword(); in test_Password()
101 assertEquals(psw1.length, res.length); in test_Password()
102 for (int i = 0; i < res.length; i++) { in test_Password()
103 assertEquals("Incorrect result", psw1[i], res[i]); in test_Password()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
DMacThread.java44 byte[] res = m.doFinal(src1); in test()
45 String sign1 = new String(res); in test()
47 res = m.doFinal(src2); in test()
48 String sign2 = new String(res); in test()
50 res = m.doFinal(src3); in test()
51 String sign3 = new String(res); in test()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/
DSSLEngineResultTest.java81 SSLEngineResult res = new SSLEngineResult(SSLEngineResult.Status.BUFFER_OVERFLOW, in test_ConstructorLjavax_net_ssl_SSLEngineResult_StatusLjavax_net_ssl_SSLEngineResult_HandshakeStatusII() local
83 assertNotNull("Null object", res); in test_ConstructorLjavax_net_ssl_SSLEngineResult_StatusLjavax_net_ssl_SSLEngineResult_HandshakeStatusII()
84 assertEquals(1, res.bytesConsumed()); in test_ConstructorLjavax_net_ssl_SSLEngineResult_StatusLjavax_net_ssl_SSLEngineResult_HandshakeStatusII()
85 assertEquals(2, res.bytesProduced()); in test_ConstructorLjavax_net_ssl_SSLEngineResult_StatusLjavax_net_ssl_SSLEngineResult_HandshakeStatusII()
104 SSLEngineResult res = new SSLEngineResult(enS[i], in test_bytesConsumed() local
107 res.bytesConsumed()); in test_bytesConsumed()
127 SSLEngineResult res = new SSLEngineResult(enS[i], in test_bytesProduced() local
130 res.bytesProduced()); in test_bytesProduced()
150 SSLEngineResult res = new SSLEngineResult(enS[i], in test_getHandshakeStatus() local
153 res.getHandshakeStatus()); in test_getHandshakeStatus()
[all …]
DSSLServerSocketTest.java204 String[] res = sss.getSupportedCipherSuites(); in test_getSupportedCipherSuites() local
205 assertNotNull("NULL result", res); in test_getSupportedCipherSuites()
206 assertTrue("no supported cipher suites available.", res.length > 0); in test_getSupportedCipherSuites()
230 String[] res = sss.getEnabledCipherSuites(); in test_EnabledCipherSuites() local
231 assertNotNull("NULL result", res); in test_EnabledCipherSuites()
235 Arrays.asList(res)); in test_EnabledCipherSuites()
244 String[] res = sss.getSupportedCipherSuites(); in test_getSupportedProtocols() local
245 assertNotNull("NULL result", res); in test_getSupportedProtocols()
246 assertTrue("no supported protocols available.", res.length > 0); in test_getSupportedProtocols()
270 String[] res = sss.getEnabledProtocols(); in test_EnabledProtocols() local
[all …]
DX509KeyManagerTest.java686 String res = manager.chooseClientAlias(new String[]{TYPE_RSA}, null, null); in test_chooseClientAlias() local
687 assertNotNull(res); in test_chooseClientAlias()
688 assertKnownAlias(res); in test_chooseClientAlias()
711 String res = manager.chooseServerAlias(TYPE_RSA, null, null); in test_chooseServerAlias() local
712 assertNotNull(res); in test_chooseServerAlias()
713 assertEquals("serverkey_00", res.toLowerCase()); in test_chooseServerAlias()
714 res = manager.chooseServerAlias(TYPE_RSA, null, new Socket()); in test_chooseServerAlias()
715 assertNotNull(res); in test_chooseServerAlias()
716 assertEquals("serverkey_00", res.toLowerCase()); in test_chooseServerAlias()
DKeyStoreBuilderParametersTest.java90 Object[] res = res_list.toArray(); in test_getParameters() local
91 assertEquals(res.length, param.length); in test_getParameters()
92 for (int i = 0; i < res.length; i++) { in test_getParameters()
93 assertEquals(param[i], res[i]); in test_getParameters()
DSSLEngineTest.java143 String[] res = sse.getSupportedProtocols(); in test_getSupportedProtocols() local
144 assertNotNull(res); in test_getSupportedProtocols()
145 assertTrue(res.length > 0); in test_getSupportedProtocols()
157 String[] res = sse.getEnabledProtocols(); in test_EnabledProtocols() local
158 assertNotNull("Null array was returned", res); in test_EnabledProtocols()
159 assertEquals("Incorrect array length", res.length, pr.length); in test_EnabledProtocols()
160 assertTrue("Incorrect array was returned", Arrays.equals(res, pr)); in test_EnabledProtocols()
175 String[] res = sse.getSupportedCipherSuites(); in test_getSupportedCipherSuites() local
176 assertNotNull(res); in test_getSupportedCipherSuites()
177 assertTrue(res.length > 0); in test_getSupportedCipherSuites()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/spec/
DDESedeKeySpecTest.java114 byte[] res = ks.getKey(); in testGetKey()
116 + "in constructor.", Arrays.equals(key, res)); in testGetKey()
117 res[0] += 1; in testGetKey()
119 + "the underlying key.", key[0] == res[0]); in testGetKey()
129 res = ks.getKey(); in testGetKey()
131 + "as specified in a constructor.", key1, res); in testGetKey()
135 + "in constructor.", Arrays.equals(exp, res)); in testGetKey()
DDESKeySpecTest.java170 byte[] res = ks.getKey(); in testGetKey()
172 + "in constructor.", Arrays.equals(key, res)); in testGetKey()
173 res[0] += 1; in testGetKey()
175 + "the underlying key.", key[0] == res[0]); in testGetKey()
184 res = ks.getKey(); in testGetKey()
186 + "as specified in a constructor.", key1, res); in testGetKey()
190 + "in constructor.", Arrays.equals(exp, res)); in testGetKey()
/libcore/luni/src/test/java/tests/targets/security/cert/
DCertificateTest.java652 CertPathValidatorResult res = certPathValidator.validate(path, params); in testVerifyMD2_chain() local
654 res instanceof PKIXCertPathValidatorResult); in testVerifyMD2_chain()
656 PKIXCertPathValidatorResult r = (PKIXCertPathValidatorResult) res; in testVerifyMD2_chain()
667 res = certPathValidator.validate(path, params); in testVerifyMD2_chain()
668 assertTrue("wrong result type", res instanceof PKIXCertPathValidatorResult); in testVerifyMD2_chain()
670 r = (PKIXCertPathValidatorResult) res; in testVerifyMD2_chain()
691 CertPathValidatorResult res = certPathValidator.validate(path, params); in testVerifyMD5_chain() local
693 res instanceof PKIXCertPathValidatorResult); in testVerifyMD5_chain()
695 PKIXCertPathValidatorResult r = (PKIXCertPathValidatorResult) res; in testVerifyMD5_chain()
705 res = certPathValidator.validate(path, params); in testVerifyMD5_chain()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DKSPrivateKeyEntryTest.java162 Certificate[] res = ksPKE.getCertificateChain(); in testGetCertificateChain() local
163 assertEquals("Incorrect chain length", testChain.length, res.length); in testGetCertificateChain()
164 for (int i = 0; i < res.length; i++) { in testGetCertificateChain()
166 .concat(Integer.toString(i)), testChain[i], res[i]); in testGetCertificateChain()
178 Certificate res = ksPKE.getCertificate(); in testGetCertificate() local
179 assertEquals("Incorrect end certificate (number 0)", testChain[0], res); in testGetCertificate()
225 String res = ksPKE.toString(); in testToString() local
226 assertNotNull("toString() returns null", res); in testToString()
/libcore/ojluni/src/main/java/sun/security/provider/certpath/
DBuildStep.java84 public BuildStep(Vertex vtx, int res) { in BuildStep() argument
90 result = res; in BuildStep()
189 public String resultToString(int res) { in resultToString() argument
191 switch (res) { in resultToString()
/libcore/ojluni/src/main/java/java/io/
DUnixFileSystem.java155 String res = cache.get(path); in canonicalize() local
156 if (res == null) { in canonicalize()
169 res = resDir + slash + filename; in canonicalize()
170 cache.put(dir + slash + filename, res); in canonicalize()
174 if (res == null) { in canonicalize()
179 res = canonicalize0(path); in canonicalize()
180 cache.put(path, res); in canonicalize()
183 resDir = parentOrNull(res); in canonicalize()
189 File f = new File(res); in canonicalize()
197 return res; in canonicalize()

1234