/libcore/ojluni/src/test/java/net/Socket/ |
D | ShutdownInput.java | 52 Socket s2 = ss.accept() ) { in main() argument 54 test(s1, s2, "Testing NET"); in main() 61 SocketChannel s2 = sc.accept() ) { in main() 63 test(s1.socket(), s2.socket(), "Testing NIO"); in main() 71 public static void test(Socket s1, Socket s2, String mesg) throws Exception { in test() argument 75 InputStream in = s2.getInputStream(); in test() 76 s2.shutdownInput(); in test() 80 System.out.println(mesg + ":" + s2 + " in.available() should be 0, " + in test() 90 System.out.append(mesg + ":" + s2 + " in.read() should be -1"); in test()
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | EntryTest.java | 63 Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1); in testConstructor4() local 64 Map.Entry s = new AbstractMap.SimpleImmutableEntry(s2); in testConstructor4() 76 Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1); in testEquals() local 77 Map.Entry s = new AbstractMap.SimpleImmutableEntry(s2); in testEquals() 80 assertEquals(s2, s); in testEquals() 81 assertEquals(s2.hashCode(), s.hashCode()); in testEquals() 82 assertEquals(e2, s2); in testEquals() 83 assertEquals(e2.hashCode(), s2.hashCode()); in testEquals() 100 Map.Entry s2 = new AbstractMap.SimpleImmutableEntry(k1, v1); in testNotEquals() local 102 assertFalse(s2.equals(s)); in testNotEquals() [all …]
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | SignerTest.java | 63 Signer s2 = new SignerStub("testToString2", new SystemScope()); in test_toString() local 64 s2.toString(); in test_toString() 71 s2.setKeyPair(kp); in test_toString() 72 s2.toString(); in test_toString() 94 Signer s2 = new SignerStub(null); in testSignerString() local 95 assertNull(s2.getName()); in testSignerString() 114 Signer s2 = new SignerStub("sss4", identityScope); in testSignerStringIdentityScope() local 121 Signer s2 = new SignerStub(null); in testSignerStringIdentityScope() local 122 assertNull(s2.getName()); in testSignerStringIdentityScope()
|
D | ProviderServiceTest.java | 164 Provider.Service s2 = new Provider.Service(p, "SecureRandom", in testGetAlgorithm() local 167 assertTrue(s2.getAlgorithm().equals("algorithm")); in testGetAlgorithm() 176 Provider.Service s2 = new Provider.Service(p, "SecureRandom", in testGetClassName() local 179 assertTrue(s2.getClassName().equals("tests.java.security.support.RandomImpl")); in testGetClassName() 188 Provider.Service s2 = new Provider.Service(p, "SecureRandom", in testGetProvider() local 191 assertTrue(s2.getProvider() == p); in testGetProvider() 200 Provider.Service s2 = new Provider.Service(p, "SecureRandom", in testGetType() local 203 assertTrue(s2.getType().equals("SecureRandom")); in testGetType() 220 Provider.Service s2 = new Provider.Service(p, "SecureRandom", in testToString() local 223 s2.toString(); in testToString()
|
D | SignatureTest.java | 72 MySignature1 s2 = new MySignature1("ABCD@#&^%$)(*&"); in testConstructor() local 73 assertEquals("ABCD@#&^%$)(*&", s2.getAlgorithm()); in testConstructor() 74 assertNull(s2.getProvider()); in testConstructor() 75 assertEquals(0, s2.getState()); in testConstructor()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | SequenceInputStreamTest.java | 33 String s2 = "World"; field in SequenceInputStreamTest 75 streams[1] = new ByteArrayInputStream(s2.getBytes("UTF-8")); in test_ConstructorLjava_util_Enumeration() 89 byte buf[] = new byte[s1.length() + s2.length()]; in test_ConstructorLjava_util_Enumeration() 91 si.read(buf, s1.length(), s2.length()); in test_ConstructorLjava_util_Enumeration() 93 buf, "UTF-8").equals(s1 + s2)); in test_ConstructorLjava_util_Enumeration() 148 byte buf[] = new byte[s1.length() + s2.length()]; in test_read$BII() 150 si.read(buf, s1.length(), s2.length()); in test_read$BII() 152 buf, "UTF-8").equals(s1 + s2)); in test_read$BII() 184 new ByteArrayInputStream(s2.getBytes("UTF-8"))); in setUp()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldSequenceInputStreamTest.java | 31 final String s2 = "World"; field in OldSequenceInputStreamTest 96 s2.charAt(0), (char) si.read()); in test_read() 135 simple2 = new Support_ASimpleInputStream(s2); in test_read$BII_Excpetion() 189 assertEquals(s2.length(), sequenceInputStream1.read(buf, 0, s2.length())); in test_readArraySkipsEmpty() 190 assertEquals(s2, new String(buf, 0, s2.length())); in test_readArraySkipsEmpty() 199 for (int i=0;i < s2.length(); i++) { in test_readSkipsEmpty() 200 assertEquals(s2.charAt(i), sequenceInputStream1.read()); in test_readSkipsEmpty() 207 simple2 = new Support_ASimpleInputStream(s2); in setUp()
|
D | OldAndroidInputStreamReaderTest.java | 102 String s2 = new String(ca, 0, n); in testStringy() local 103 assertEquals(s1, s2); in testStringy()
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
D | LocaleUtils.java | 50 public static boolean caseIgnoreMatch(String s1, String s2) { in caseIgnoreMatch() argument 51 if (s1 == s2) { in caseIgnoreMatch() 56 if (len != s2.length()) { in caseIgnoreMatch() 62 char c2 = s2.charAt(i); in caseIgnoreMatch() 70 static int caseIgnoreCompare(String s1, String s2) { in caseIgnoreCompare() argument 71 if (s1 == s2) { in caseIgnoreCompare() 74 return toLowerString(s1).compareTo(toLowerString(s2)); in caseIgnoreCompare()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ |
D | ThrowableTest.java | 92 String s2 = fixStacktrace(new String(bao.toByteArray(), 0, bao.size())); in test_fillInStackTrace() local 93 assertTrue("Invalid stackTrace? length: " + s2.length() + "\n" + s2, s2 in test_fillInStackTrace() 95 assertTrue("Incorrect stackTrace printed: \n" + s2 in test_fillInStackTrace() 96 + "\n\nCompared with:\n" + s, s2.equals(s)); in test_fillInStackTrace()
|
D | String2Test.java | 281 String s2 = "s2"; in test_concatLjava_lang_String() local 282 String s3 = s1.concat(s2); in test_concatLjava_lang_String() 283 assertEquals(s2, s3); in test_concatLjava_lang_String() 286 s3 = s2.concat(s1); in test_concatLjava_lang_String() 287 assertEquals(s2, s3); in test_concatLjava_lang_String() 291 s3 = s2.concat(s1); in test_concatLjava_lang_String() 292 assertSame(s2, s3); in test_concatLjava_lang_String()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | TreeSetTest.java | 313 Set s2 = new TreeSet(); in test_equals() local 316 s2.add(new Integer(1)); in test_equals() 317 s2.add(new Integer(2)); in test_equals() 318 assertFalse("Sets should not be equal 1", s1.equals(s2)); in test_equals() 319 assertFalse("Sets should not be equal 2", s2.equals(s1)); in test_equals() 323 s2 = new HashSet(); in test_equals() 325 s2.add(new Object()); in test_equals() 326 assertFalse("Sets should not be equal 3", s1.equals(s2)); in test_equals() 327 assertFalse("Sets should not be equal 4", s2.equals(s1)); in test_equals()
|
D | LinkedHashMapTest.java | 563 Set s2 = lruhm.entrySet(); in test_ordered_entrySet() local 564 Iterator it2 = s2.iterator(); in test_ordered_entrySet() 565 assertTrue("Returned set of incorrect size 3", lruhm.size() == s2 in test_ordered_entrySet() 622 Set s2 = lruhm.keySet(); in test_ordered_keySet() local 623 Iterator it2 = s2.iterator(); in test_ordered_keySet() 624 assertTrue("Returned set of incorrect size", lruhm.size() == s2.size()); in test_ordered_keySet() 678 Collection s2 = lruhm.values(); in test_ordered_values() local 679 Iterator it2 = s2.iterator(); in test_ordered_values() 680 assertTrue("Returned set of incorrect size", lruhm.size() == s2.size()); in test_ordered_values()
|
/libcore/ojluni/src/main/java/sun/misc/ |
D | ASCIICaseInsensitiveComparator.java | 40 public int compare(String s1, String s2) { in compare() argument 41 int n1=s1.length(), n2=s2.length(); in compare() 45 char c2 = s2.charAt(i); in compare()
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/ |
D | Handler.java | 129 String s2 = u2.getHost(); in hostsEqual() local 130 if ("localhost".equalsIgnoreCase(s1) && ( s2 == null || "".equals(s2))) in hostsEqual() 132 if ("localhost".equalsIgnoreCase(s2) && ( s1 == null || "".equals(s1))) in hostsEqual()
|
/libcore/luni/src/test/java/tests/java/lang/String/ |
D | Tests.java | 44 String s2 = "abcdefg"; in test_CASE_INSENSITIVE_ORDER() local 46 assertTrue(String.CASE_INSENSITIVE_ORDER.compare(s1, s2) == 0); in test_CASE_INSENSITIVE_ORDER()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | ConcatTest.java | 145 …private void assertRefConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean ord… in assertRefConcat() argument 146 Stream<Integer> result = Stream.concat(s1, s2); in assertRefConcat() 151 …private void assertIntConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean ord… in assertIntConcat() argument 153 s2.mapToInt(Integer::intValue)); in assertIntConcat() 159 …private void assertLongConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean or… in assertLongConcat() argument 161 s2.mapToLong(Integer::longValue)); in assertLongConcat() 167 …private void assertDoubleConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean … in assertDoubleConcat() argument 169 s2.mapToDouble(Integer::doubleValue)); in assertDoubleConcat()
|
D | RangeTest.java | 253 Spliterator.OfLong s2 = s1.trySplit(); in testLongLongRange() local 255 assertSizedAndSubSized(s2); in testLongLongRange() 259 assertTrue(s2.estimateSize() < Long.MAX_VALUE); in testLongLongRange() 261 assertEquals(s.estimateSize() + s1.estimateSize() + s2.estimateSize(), in testLongLongRange() 303 Spliterator.OfLong s2 = s1.trySplit(); 305 assertSizedAndSubSized(s2); 314 assertTrue(s2.estimateSize() < Long.MAX_VALUE); 316 … assertEquals(s.estimateSize() + s3.estimateSize() + s1.estimateSize() + s2.estimateSize(),
|
D | SequentialOpTest.java | 128 UnaryOperator<Stream<Integer>> s2 = stuff[s2Index]; in testMixedSeqPar() local 129 … UnaryOperator<Stream<Integer>> composed = s -> s2.apply(c2.apply(s1.apply(c1.apply(s)))); in testMixedSeqPar()
|
/libcore/ojluni/src/main/java/java/io/ |
D | SequenceInputStream.java | 87 public SequenceInputStream(InputStream s1, InputStream s2) { in SequenceInputStream() argument 91 v.addElement(s2); in SequenceInputStream()
|
/libcore/luni/src/test/java/libcore/java/net/ |
D | DatagramSocketTest.java | 141 try (DatagramSocket s2 = new DatagramSocket()) { in testForceConnectToThrowSocketException() argument 142 forceConnectToThrowSocketException(s2); in testForceConnectToThrowSocketException() 144 s2.connect(validAddress); in testForceConnectToThrowSocketException() 147 s2.disconnect(); in testForceConnectToThrowSocketException()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | ServerSocketChannelTest.java | 257 ServerSocket s2 = this.serverChannel.socket(); in testSocket_Block_BeforeClose() local 259 assertSame(s1, s2); in testSocket_Block_BeforeClose() 273 ServerSocket s2 = this.serverChannel.socket(); in testSocket_NonBlock_BeforeClose() local 275 assertSame(s1, s2); in testSocket_NonBlock_BeforeClose() 290 ServerSocket s2 = this.serverChannel.socket(); in testSocket_Block_Closed() local 292 assertSame(s1, s2); in testSocket_Block_Closed() 303 ServerSocket s2 = this.serverChannel.socket(); in testSocket_NonBlock_Closed() local 305 assertSame(s1, s2); in testSocket_NonBlock_Closed()
|
/libcore/ojluni/annotations/hiddenapi/sun/misc/ |
D | ASCIICaseInsensitiveComparator.java | 35 public int compare(java.lang.String s1, java.lang.String s2) { in compare() argument
|
/libcore/ojluni/src/test/java/util/stream/testlib/org/openjdk/testlib/java/util/stream/ |
D | SpliteratorTestHelper.java | 366 Spliterator<T> s2 = s1.trySplit(); in testSplitOnce() local 368 long s2Size = (s2 != null) ? s2.getExactSizeIfKnown() : 0; in testSplitOnce() 370 if (s2 != null) in testSplitOnce() 371 s2.forEachRemaining(addToFromSplit); in testSplitOnce()
|
/libcore/ojluni/src/test/java/util/stream/bootlib/java/util/stream/ |
D | SpliteratorTestHelper.java | 366 Spliterator<T> s2 = s1.trySplit(); in testSplitOnce() local 368 long s2Size = (s2 != null) ? s2.getExactSizeIfKnown() : 0; in testSplitOnce() 370 if (s2 != null) in testSplitOnce() 371 s2.forEachRemaining(addToFromSplit); in testSplitOnce()
|