/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | SubmissionPublisherTest.java | 389 TestSubscriber s1 = new TestSubscriber(); in testCloseCompletes() local 391 p.subscribe(s1); in testCloseCompletes() 397 s1.awaitComplete(); in testCloseCompletes() 398 assertEquals(1, s1.nexts); in testCloseCompletes() 399 assertEquals(1, s1.completes); in testCloseCompletes() 411 TestSubscriber s1 = new TestSubscriber(); in testCloseExceptionallyError() local 413 p.subscribe(s1); in testCloseExceptionallyError() 418 s1.awaitSubscribe(); in testCloseExceptionallyError() 419 s1.awaitError(); in testCloseExceptionallyError() 420 assertTrue(s1.nexts <= 1); in testCloseExceptionallyError() [all …]
|
/libcore/ojluni/src/test/java/lang/String/concat/ |
D | ImplicitStringConcatArgCount.java | 100 static final String s1 = "o"; field in ImplicitStringConcatArgCount 106 test("fo", s + s1); in testImplicitStringConcatArgCount() 107 test("foo", s + s1 + s2); in testImplicitStringConcatArgCount() 108 test("foo7", s + s1 + s2 + i); in testImplicitStringConcatArgCount() 109 test("foo77", s + s1 + s2 + i + i); in testImplicitStringConcatArgCount() 110 test("foo777", s + s1 + s2 + i + i + i); in testImplicitStringConcatArgCount() 111 test("foo7777", s + s1 + s2 + i + i + i + i); in testImplicitStringConcatArgCount() 112 test("foo77777", s + s1 + s2 + i + i + i + i + i); in testImplicitStringConcatArgCount() 113 test("foo777777", s + s1 + s2 + i + i + i + i + i + i); in testImplicitStringConcatArgCount() 114 test("foo7777777", s + s1 + s2 + i + i + i + i + i + i + i); in testImplicitStringConcatArgCount() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/ |
D | SequenceInputStreamTest.java | 31 String s1 = "Hello"; field in SequenceInputStreamTest 58 InputStream is = new ByteArrayInputStream(s1.getBytes("UTF-8")); in test_Constructor_LInputStreamLInputStream_Null() 74 streams[0] = new ByteArrayInputStream(s1.getBytes("UTF-8")); in test_ConstructorLjava_util_Enumeration() 89 byte buf[] = new byte[s1.length() + s2.length()]; in test_ConstructorLjava_util_Enumeration() 90 si.read(buf, 0, s1.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() 108 si.available() == s1.length()); in test_available() 130 assertTrue("Read incorrect char", (char) si.read() == s1.charAt(1)); in test_read() 148 byte buf[] = new byte[s1.length() + s2.length()]; in test_read$BII() [all …]
|
/libcore/ojluni/src/test/java/util/Collections/ |
D | CheckedListBash.java | 50 List s1 = newList(); in main() local 51 AddRandoms(s1, listSize); in main() 56 List intersection = clone(s1); intersection.retainAll(s2); in main() 57 List diff1 = clone(s1); diff1.removeAll(s2); in main() 58 List diff2 = clone(s2); diff2.removeAll(s1); in main() 59 List union = clone(s1); union.addAll(s2); in main() 95 s1.clear(); in main() 96 if (s1.size() != 0) in main() 99 s1.addAll(0, s2); in main() 100 if (!(s1.equals(s2) && s2.equals(s1))) in main() [all …]
|
D | CheckedSetBash.java | 61 Set<Integer> s1 = supplier.get(); in testCheckedSet() local 62 assertTrue(s1.isEmpty()); in testCheckedSet() 64 AddRandoms(s1, setSize); in testCheckedSet() 72 Set<Integer> intersection = clone(s1, supplier); in testCheckedSet() 74 Set<Integer> diff1 = clone(s1, supplier); diff1.removeAll(s2); in testCheckedSet() 75 Set<Integer> diff2 = clone(s2, supplier); diff2.removeAll(s1); in testCheckedSet() 76 Set<Integer> union = clone(s1, supplier); union.addAll(s2); in testCheckedSet() 117 s1.clear(); in testCheckedSet() 118 if (!s1.isEmpty()) in testCheckedSet()
|
/libcore/luni/src/test/java/libcore/java/io/ |
D | OldSequenceInputStreamTest.java | 30 final String s1 = "Hello"; field in OldSequenceInputStreamTest 34 assertEquals("Returned incorrect number of bytes!", s1.length(), si.available()); in test_available() 37 si.available() == s1.length()); in test_available() 60 s1.charAt(1), (char) si.read()); in test_read() 66 s1.charAt(2), (char) si.read()); in test_read() 134 simple1 = new Support_ASimpleInputStream(s1); in test_read$BII_Excpetion() 187 assertEquals(s1.length(), sequenceInputStream1.read(buf, 0, s1.length())); in test_readArraySkipsEmpty() 188 assertEquals(s1, new String(buf, 0, s1.length())); in test_readArraySkipsEmpty() 191 assertEquals(-1, sequenceInputStream1.read(buf, 0, s1.length())); in test_readArraySkipsEmpty() 196 for (int i=0;i < s1.length(); i++) { in test_readSkipsEmpty() [all …]
|
/libcore/ojluni/src/main/java/jdk/random/ |
D | Xoroshiro128PlusPlus.java | 226 long s1 = x1; in nextLong() local 229 final long result = Long.rotateLeft(s0 + s1, 17) + s0; // "plusplus" scrambler in nextLong() 231 s1 ^= s0; in nextLong() 232 x0 = Long.rotateLeft(s0, 49) ^ s1 ^ (s1 << 21); // a, b in nextLong() 233 x1 = Long.rotateLeft(s1, 28); // c in nextLong() 263 long s0 = 0, s1 = 0; in jumpAlgorithm() local 268 s1 ^= x1; in jumpAlgorithm() 274 x1 = s1; in jumpAlgorithm()
|
D | Xoshiro256PlusPlus.java | 289 long s0 = 0, s1 = 0, s2 = 0, s3 = 0; in jumpAlgorithm() local 294 s1 ^= x1; in jumpAlgorithm() 302 x1 = s1; in jumpAlgorithm()
|
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/ |
D | ProviderServiceTest.java | 160 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testGetAlgorithm() local 162 assertTrue(s1.getAlgorithm().equals("algorithm")); in testGetAlgorithm() 172 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testGetClassName() local 174 assertTrue(s1.getClassName().equals("className")); in testGetClassName() 184 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testGetProvider() local 186 assertTrue(s1.getProvider() == p); in testGetProvider() 196 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testGetType() local 198 assertTrue(s1.getType().equals("type")); in testGetType() 208 Provider.Service s1 = new Provider.Service(p, "type", "algorithm", in testSupportsParameter() local 210 assertTrue(s1.supportsParameter(null)); in testSupportsParameter() [all …]
|
D | SignerTest.java | 60 Signer s1 = new SignerStub("testToString1"); in test_toString() local 61 assertEquals("[Signer]testToString1", s1.toString()); in test_toString() 68 s1.setKeyPair(kp); in test_toString() 69 s1.toString(); in test_toString()
|
D | ProviderTest.java | 241 Set s1 = p.keySet(); in testKeySet() local 243 assertNotSame(s, s1); in testKeySet() 244 assertFalse(s1.isEmpty()); in testKeySet() 245 assertEquals(8, s1.size()); in testKeySet() 247 assertTrue(s1.contains("MessageDigest.SHA-256")); in testKeySet() 248 assertTrue(s1.contains("MessageDigest.SHA-1")); in testKeySet() 249 assertTrue(s1.contains("Alg.Alias.MessageDigest.SHA1")); in testKeySet() 250 assertTrue(s1.contains("MessageDigest.abc")); in testKeySet() 251 assertTrue(s1.contains("Provider.id info")); in testKeySet() 252 assertTrue(s1.contains("Provider.id className")); in testKeySet() [all …]
|
/libcore/ojluni/src/test/java/net/Socket/ |
D | ShutdownInput.java | 51 Socket s1 = new Socket(iaddr, ss.getLocalPort()); in main() 54 test(s1, s2, "Testing NET"); in main() 59 SocketChannel s1 = SocketChannel.open( 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 72 OutputStream os = s1.getOutputStream(); in test()
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | RangeTest.java | 249 Spliterator.OfLong s1 = s.trySplit(); in testLongLongRange() local 250 assertNotSizedAndSubSized(s1); in testLongLongRange() 253 Spliterator.OfLong s2 = s1.trySplit(); in testLongLongRange() 254 assertSizedAndSubSized(s1); in testLongLongRange() 258 assertTrue(s1.estimateSize() < Long.MAX_VALUE); in testLongLongRange() 261 assertEquals(s.estimateSize() + s1.estimateSize() + s2.estimateSize(), in testLongLongRange() 275 Spliterator.OfLong s1 = s.trySplit(); in testLongLongRange() 276 assertSizedAndSubSized(s1); in testLongLongRange() 280 assertTrue(s1.estimateSize() < Long.MAX_VALUE); in testLongLongRange() 282 assertEquals(s.estimateSize() + s1.estimateSize(), end - start); in testLongLongRange() [all …]
|
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 152 IntStream result = IntStream.concat(s1.mapToInt(Integer::intValue), in assertIntConcat() 159 …private void assertLongConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean or… in assertLongConcat() argument 160 LongStream result = LongStream.concat(s1.mapToLong(Integer::longValue), in assertLongConcat() 167 …private void assertDoubleConcat(Stream<Integer> s1, Stream<Integer> s2, boolean parallel, boolean … in assertDoubleConcat() argument 168 DoubleStream result = DoubleStream.concat(s1.mapToDouble(Integer::doubleValue), in assertDoubleConcat()
|
/libcore/ojluni/src/test/java/util/LinkedHashSet/ |
D | Basic.java | 49 Set s1 = new LinkedHashSet(); in main() local 50 AddRandoms(s1, setSize); in main() 55 Set intersection = clone(s1); in main() 57 Set diff1 = clone(s1); diff1.removeAll(s2); in main() 58 Set diff2 = clone(s2); diff2.removeAll(s1); in main() 59 Set union = clone(s1); union.addAll(s2); in main() 100 s1.clear(); in main() 101 if (!s1.isEmpty()) in main()
|
/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() 55 int len = s1.length(); in caseIgnoreMatch() 61 char c1 = s1.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/ojluni/src/test/java/util/Collection/ |
D | BiggernYours.java | 100 static void compareNavigableSets(NavigableSet s1, NavigableSet s2) { in compareNavigableSets() argument 101 compareCollections(s1, s2); in compareNavigableSets() 102 compareCollections(s1.descendingSet(), in compareNavigableSets() 104 compareCollections(s1.tailSet(Integer.MIN_VALUE), in compareNavigableSets() 154 static void testNavigableSets(NavigableSet s1, NavigableSet s2) { 156 compareNavigableSets(s1, s2); 158 for (Set s : new Set[]{s1, s2}) { 161 compareNavigableSets(s1, s2);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | TreeSetTest.java | 312 Set s1 = new TreeSet(); in test_equals() local 314 s1.add("key1"); in test_equals() 315 s1.add("key2"); 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() 322 s1 = new TreeSet(); in test_equals() 324 s1.add("key"); 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()
|
/libcore/ojluni/src/test/java/lang/ref/ |
D | CleanerTest.java | 359 Semaphore s1 = new Semaphore(0); in setupPhantom() local 360 Cleaner.Cleanable c1 = cleaner.register(obj, () -> s1.release()); in setupPhantom() 362 return new CleanableCase(new PhantomReference<>(obj, null), c1, s1); in setupPhantom() 375 Semaphore s1 = new Semaphore(0); in setupPhantomSubclass() local 379 s1.release(); in setupPhantomSubclass() 383 return new CleanableCase(new PhantomReference<>(obj, null), c1, s1); in setupPhantomSubclass() 396 Semaphore s1 = new Semaphore(0); in setupPhantomSubclassException() local 400 s1.release(); in setupPhantomSubclassException() 405 return new CleanableCase(new PhantomReference<>(obj, null), c1, s1, true); in setupPhantomSubclassException() 573 Semaphore s1 = new Semaphore(0); in testReferentNotAvailable() local [all …]
|
/libcore/ojluni/src/main/java/sun/net/www/protocol/file/ |
D | Handler.java | 128 String s1 = u1.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/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() 44 char c1 = s1.charAt(i); in compare()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/ |
D | ServerSocketChannelTest.java | 254 ServerSocket s1 = this.serverChannel.socket(); in testSocket_Block_BeforeClose() local 255 assertFalse(s1.isClosed()); in testSocket_Block_BeforeClose() 256 assertSocketNotAccepted(s1); in testSocket_Block_BeforeClose() 259 assertSame(s1, s2); in testSocket_Block_BeforeClose() 262 s1.close(); in testSocket_Block_BeforeClose() 270 ServerSocket s1 = this.serverChannel.socket(); in testSocket_NonBlock_BeforeClose() local 271 assertFalse(s1.isClosed()); in testSocket_NonBlock_BeforeClose() 272 assertSocketNotAccepted(s1); in testSocket_NonBlock_BeforeClose() 275 assertSame(s1, s2); in testSocket_NonBlock_BeforeClose() 278 s1.close(); in testSocket_NonBlock_BeforeClose() [all …]
|
/libcore/ojluni/src/test/java/util/ServiceLoader/basic/ |
D | Basic.java | 43 private static <T> void checkEquals(Set<T> s1, Set<T> s2, boolean eq) { in checkEquals() argument 44 if (s1.equals(s2) != eq) in checkEquals() 46 eq, s1, s2)); in checkEquals()
|
/libcore/luni/src/test/java/tests/java/lang/String/ |
D | Tests.java | 43 String s1 = "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/BitSet/ |
D | ImportExport.java | 124 BitSet s1 = BitSet.valueOf(longs); in test() local 127 equal(s1, s2); in test() 128 equal(s1, s3); in test() 130 equal(longs, s1.toLongArray()); in test() 135 equal(s1.get(i), ((longs [i/64] & (1L<<(i%64))) != 0)); in test()
|