/libcore/luni/src/test/java/libcore/java/util/ |
D | SetOfTest.java | 143 Integer[] l = template.toArray(new Integer[0]); in null_comprehensive() local 144 l[i] = null; in null_comprehensive() 145 npe(i <= 0, () -> Set.of(l[0])); in null_comprehensive() 146 npe(i <= 1, () -> Set.of(l[0], l[1])); in null_comprehensive() 147 npe(i <= 2, () -> Set.of(l[0], l[1], l[2])); in null_comprehensive() 148 npe(i <= 3, () -> Set.of(l[0], l[1], l[2], l[3])); in null_comprehensive() 149 npe(i <= 4, () -> Set.of(l[0], l[1], l[2], l[3], l[4])); in null_comprehensive() 150 npe(i <= 5, () -> Set.of(l[0], l[1], l[2], l[3], l[4], l[5])); in null_comprehensive() 151 npe(i <= 6, () -> Set.of(l[0], l[1], l[2], l[3], l[4], l[5], l[6])); in null_comprehensive() 152 npe(i <= 7, () -> Set.of(l[0], l[1], l[2], l[3], l[4], l[5], l[6], l[7])); in null_comprehensive() [all …]
|
D | ListOfTest.java | 134 Integer[] l = template.toArray(new Integer[0]); in null_comprehensive() local 135 l[i] = null; in null_comprehensive() 136 npe(i <= 0, () -> List.of(l[0])); in null_comprehensive() 137 npe(i <= 1, () -> List.of(l[0], l[1])); in null_comprehensive() 138 npe(i <= 2, () -> List.of(l[0], l[1], l[2])); in null_comprehensive() 139 npe(i <= 3, () -> List.of(l[0], l[1], l[2], l[3])); in null_comprehensive() 140 npe(i <= 4, () -> List.of(l[0], l[1], l[2], l[3], l[4])); in null_comprehensive() 141 npe(i <= 5, () -> List.of(l[0], l[1], l[2], l[3], l[4], l[5])); in null_comprehensive() 142 npe(i <= 6, () -> List.of(l[0], l[1], l[2], l[3], l[4], l[5], l[6])); in null_comprehensive() 143 npe(i <= 7, () -> List.of(l[0], l[1], l[2], l[3], l[4], l[5], l[6], l[7])); in null_comprehensive() [all …]
|
D | ListDefaultMethodTester.java | 26 public static void test_replaceAll(List<Integer> l) { in test_replaceAll() argument 27 l.add(5); in test_replaceAll() 28 l.add(2); in test_replaceAll() 29 l.add(-3); in test_replaceAll() 30 l.replaceAll(v -> v * 2); in test_replaceAll() 31 assertEquals((Integer)10, l.get(0)); in test_replaceAll() 32 assertEquals((Integer)4, l.get(1)); in test_replaceAll() 33 assertEquals((Integer)(-6), l.get(2)); in test_replaceAll() 36 l.replaceAll(null); in test_replaceAll() 41 public static void test_sort(List<Double> l) { in test_sort() argument [all …]
|
D | LocaleTest.java | 255 for (Locale l : array) { in assertOnce() 256 if (l.equals(element)) { in assertOnce() 495 Locale l = b.build(); in test_Builder_setLocale() local 496 assertEquals("en", l.getLanguage()); in test_Builder_setLocale() 497 assertEquals("US", l.getCountry()); in test_Builder_setLocale() 498 assertEquals("variant_VARIANT", l.getVariant()); in test_Builder_setLocale() 511 l = b.build(); in test_Builder_setLocale() 512 assertEquals("fr", l.getLanguage()); in test_Builder_setLocale() 513 assertEquals("FR", l.getCountry()); in test_Builder_setLocale() 556 Locale l = b.clear().build(); in test_Builder_clear() local [all …]
|
D | OldListIteratorTest.java | 27 ListIterator<Integer> l = null; field in OldListIteratorTest 38 assertTrue(l.hasNext()); in testHasNext() 39 l.next(); in testHasNext() 41 assertFalse(l.hasNext()); in testHasNext() 46 assertTrue(objArray[i].equals(l.next())); in testNext() 50 l.next(); in testNext() 101 l.remove(); in testRemove() 107 l.next(); in testRemove() 108 l.remove(); in testRemove() 109 assertFalse(l.hasPrevious()); in testRemove() [all …]
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
D | CountDownLatchTest.java | 43 final CountDownLatch l = new CountDownLatch(2); in testGetCount() local 44 assertEquals(2, l.getCount()); in testGetCount() 45 l.countDown(); in testGetCount() 46 assertEquals(1, l.getCount()); in testGetCount() 53 final CountDownLatch l = new CountDownLatch(1); in testCountDown() local 54 assertEquals(1, l.getCount()); in testCountDown() 55 l.countDown(); in testCountDown() 56 assertEquals(0, l.getCount()); in testCountDown() 57 l.countDown(); in testCountDown() 58 assertEquals(0, l.getCount()); in testCountDown() [all …]
|
D | AbstractExecutorServiceTest.java | 275 List<Callable<Long>> l = new ArrayList<Callable<Long>>(); in testInvokeAny3() local 276 l.add(new Callable<Long>() { in testInvokeAny3() 278 l.add(null); in testInvokeAny3() 280 e.invokeAny(l); in testInvokeAny3() 292 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny4() local 293 l.add(new NPETask()); in testInvokeAny4() 295 e.invokeAny(l); in testInvokeAny4() 309 List<Callable<String>> l = new ArrayList<Callable<String>>(); in testInvokeAny5() local 310 l.add(new StringTask()); in testInvokeAny5() 311 l.add(new StringTask()); in testInvokeAny5() [all …]
|
/libcore/ojluni/src/test/java/util/concurrent/tck/ |
D | CountDownLatchTest.java | 66 final CountDownLatch l = new CountDownLatch(2); in testGetCount() local 67 assertEquals(2, l.getCount()); in testGetCount() 68 l.countDown(); in testGetCount() 69 assertEquals(1, l.getCount()); in testGetCount() 76 final CountDownLatch l = new CountDownLatch(1); in testCountDown() local 77 assertEquals(1, l.getCount()); in testCountDown() 78 l.countDown(); in testCountDown() 79 assertEquals(0, l.getCount()); in testCountDown() 80 l.countDown(); in testCountDown() 81 assertEquals(0, l.getCount()); in testCountDown() [all …]
|
D | AbstractExecutorServiceTest.java | 298 List<Callable<Long>> l = new ArrayList<>(); in testInvokeAny3() local 299 l.add(new Callable<Long>() { in testInvokeAny3() 301 l.add(null); in testInvokeAny3() 303 e.invokeAny(l); in testInvokeAny3() 315 List<Callable<String>> l = new ArrayList<>(); in testInvokeAny4() local 316 l.add(new NPETask()); in testInvokeAny4() 318 e.invokeAny(l); in testInvokeAny4() 332 List<Callable<String>> l = new ArrayList<>(); in testInvokeAny5() local 333 l.add(new StringTask()); in testInvokeAny5() 334 l.add(new StringTask()); in testInvokeAny5() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/helpers/ |
D | LocatorImplTest.java | 35 LocatorImpl l = new LocatorImpl(); in testLocatorImpl() local 37 assertEquals(null, l.getPublicId()); in testLocatorImpl() 38 assertEquals(null, l.getSystemId()); in testLocatorImpl() 39 assertEquals(0, l.getLineNumber()); in testLocatorImpl() 40 assertEquals(0, l.getColumnNumber()); in testLocatorImpl() 69 LocatorImpl l = new LocatorImpl(); in testSetPublicIdGetPublicId() local 71 l.setPublicId(PUB); in testSetPublicIdGetPublicId() 72 assertEquals(PUB, l.getPublicId()); in testSetPublicIdGetPublicId() 74 l.setPublicId(null); in testSetPublicIdGetPublicId() 75 assertEquals(null, l.getPublicId()); in testSetPublicIdGetPublicId() [all …]
|
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/ |
D | NodeBuilderTest.java | 62 for (List<Integer> l : ls) { in createNodeBuilders() 64 params[i++] = new Object[]{l, m}; in createNodeBuilders() 72 public void testIteration(List<Integer> l, Function<Integer, Node.Builder<Integer>> m) { in testIteration() argument 73 Node.Builder<Integer> nb = m.apply(l.size()); in testIteration() 74 nb.begin(l.size()); in testIteration() 75 for (Integer i : l) { in testIteration() 81 assertEquals(n.count(), l.size()); in testIteration() 87 assertContents(_l, l); in testIteration() 107 for (List<Integer> l : ls) { in createIntNodeBuilders() 109 params[i++] = new Object[]{l, m}; in createIntNodeBuilders() [all …]
|
D | DoubleNodeTest.java | 52 nodes.add(tree(toList(array), l -> Nodes.node(toDoubleArray(l)))); in createSizes() 72 List<Double> l = new ArrayList<>(); in toList() local 74 l.add(i); in toList() 77 return l; in toList() 80 private double[] toDoubleArray(List<Double> l) { in toDoubleArray() argument 81 double[] a = new double[l.size()]; in toDoubleArray() 84 for (Double e : l) { in toDoubleArray() 112 private Node.OfDouble tree(List<Double> l, Function<List<Double>, Node.OfDouble> m) { in tree() argument 113 if (l.size() < 3) { in tree() 114 return m.apply(l); in tree() [all …]
|
D | IntNodeTest.java | 52 nodes.add(tree(toList(array), l -> Nodes.node(toIntArray(l)))); in createSizes() 72 List<Integer> l = new ArrayList<>(); in toList() local 74 l.add(i); in toList() 77 return l; in toList() 80 private int[] toIntArray(List<Integer> l) { in toIntArray() argument 81 int[] a = new int[l.size()]; in toIntArray() 84 for (Integer e : l) { in toIntArray() 112 private Node.OfInt tree(List<Integer> l, Function<List<Integer>, Node.OfInt> m) { in tree() argument 113 if (l.size() < 3) { in tree() 114 return m.apply(l); in tree() [all …]
|
D | LongNodeTest.java | 52 nodes.add(tree(toList(array), l -> Nodes.node(toLongArray(l)))); in createSizes() 72 List<Long> l = new ArrayList<>(); in toList() local 74 l.add(i); in toList() 77 return l; in toList() 80 private long[] toLongArray(List<Long> l) { in toLongArray() argument 81 long[] a = new long[l.size()]; in toLongArray() 84 for (Long e : l) { in toLongArray() 112 private Node.OfLong tree(List<Long> l, Function<List<Long>, Node.OfLong> m) { in tree() argument 113 if (l.size() < 3) { in tree() 114 return m.apply(l); in tree() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/ext/ |
D | Locator2ImplTest.java | 40 Locator2Impl l = new Locator2Impl(); in testLocatorImpl() local 42 assertEquals(null, l.getPublicId()); in testLocatorImpl() 43 assertEquals(null, l.getSystemId()); in testLocatorImpl() 44 assertEquals(0, l.getLineNumber()); in testLocatorImpl() 45 assertEquals(0, l.getColumnNumber()); in testLocatorImpl() 47 assertEquals(null, l.getEncoding()); in testLocatorImpl() 48 assertEquals(null, l.getXMLVersion()); in testLocatorImpl() 94 Locator2Impl l = new Locator2Impl(); in testSetXMLVersionGetXMLVersion() local 96 l.setXMLVersion(XML); in testSetXMLVersionGetXMLVersion() 97 assertEquals(XML, l.getXMLVersion()); in testSetXMLVersionGetXMLVersion() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | LocaleTest.java | 30 Locale l; field in LocaleTest 108 assertTrue("Clone failed", l.clone().equals(l)); in test_clone() 119 assertTrue("Different locales returned true", !testLocale.equals(l)); in test_equalsLjava_lang_Object() 161 Locale.setDefault(l); in test_getDefault() 207 assertEquals("anglais", new Locale("en", "CA", "WIN32").getDisplayLanguage(l)); in test_getDisplayLanguageLjava_util_Locale() 215 assertEquals("anglais (Canada,WIN32)", new Locale("en", "CA", "WIN32").getDisplayName(l)); in test_getDisplayNameLjava_util_Locale() 235 + testLocale.getDisplayVariant(l), testLocale in test_getDisplayVariantLjava_util_Locale() 236 .getDisplayVariant(l).equals("WIN32")); in test_getDisplayVariantLjava_util_Locale() 248 Locale l = new Locale("", "CD"); in test_getISO3Country() local 249 assertEquals("COD", l.getISO3Country()); in test_getISO3Country() [all …]
|
/libcore/ojluni/src/main/java/java/util/ |
D | Formatter.java | 1857 private final Locale l; field in Formatter 1893 private Formatter(Locale l, Appendable a) { in Formatter() argument 1895 this.l = l; in Formatter() 1896 this.zero = getZero(l); in Formatter() 1899 private Formatter(Charset charset, Locale l, File file) in Formatter() argument 1902 this(l, in Formatter() 1950 public Formatter(Locale l) { in Formatter() argument 1951 this(l, new StringBuilder()); in Formatter() 1966 public Formatter(Appendable a, Locale l) { in Formatter() argument 1967 this(l, nonNullAppendable(a)); in Formatter() [all …]
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/javax/net/ssl/ |
D | SSLEngineResultTest.java | 103 for (int l = 0; l < pos.length; l++) { in test_bytesConsumed() 105 enHS[j], pos[n], pos[l]); in test_bytesConsumed() 126 for (int l = 0; l < pos.length; ++l) { in test_bytesProduced() 128 enHS[j], pos[n], pos[l]); in test_bytesProduced() 129 assertEquals("Incorrect bytesProduced", pos[l], in test_bytesProduced() 149 for (int l = 0; l < pos.length; ++l) { in test_getHandshakeStatus() 151 enHS[j], pos[n], pos[l]); in test_getHandshakeStatus() 172 for (int l = 0; l < pos.length; ++l) { in test_getStatus() 174 enHS[j], pos[n], pos[l]); in test_getStatus() 195 for (int l = 0; l < pos.length; ++l) { in test_toString() [all …]
|
/libcore/luni/src/test/java/libcore/java/util/logging/ |
D | OldLevelTest.java | 28 Level l = new MockLevel("level1", 120); in testGetResourceBundleName() local 29 assertNull("level's localization resource bundle name is not null", l in testGetResourceBundleName() 31 l = new MockLevel("level1", 120, bundleName); in testGetResourceBundleName() 32 assertEquals("bundleName is non equal to actual value", bundleName, l in testGetResourceBundleName() 34 l = new MockLevel("level1", 120, bundleName + "+abcdef"); in testGetResourceBundleName() 36 + "+abcdef", l.getResourceBundleName()); in testGetResourceBundleName() 44 Level l = new MockLevel("level1", value1); in testIntValue() local 46 value1, l.intValue()); in testIntValue()
|
/libcore/luni/src/test/java/libcore/libcore/icu/ |
D | LocaleDataTest.java | 52 LocaleData l = LocaleData.get(Locale.US); in test_en_US() local 53 assertEquals("AM", l.amPm[0]); in test_en_US() 55 assertEquals("BC", l.eras[0]); in test_en_US() 57 assertEquals("January", l.longMonthNames[0]); in test_en_US() 58 assertEquals("Jan", l.shortMonthNames[0]); in test_en_US() 59 assertEquals("J", l.tinyMonthNames[0]); in test_en_US() 61 assertEquals("January", l.longStandAloneMonthNames[0]); in test_en_US() 62 assertEquals("Jan", l.shortStandAloneMonthNames[0]); in test_en_US() 63 assertEquals("J", l.tinyStandAloneMonthNames[0]); in test_en_US() 65 assertEquals("Sunday", l.longWeekdayNames[1]); in test_en_US() [all …]
|
D | DateIntervalFormatTest.java | 176 ULocale l = ULocale.US; in test8862241() local 178 Calendar c = Calendar.getInstance(tz, l); in test8862241() 185 …assertEquals("Jan 19, 2042 – Oct 4, 2046", formatDateRange(l, tz, jan_19_2042, oct_4_2046, flags)); in test8862241() 190 ULocale l = ULocale.US; in test10089890() local 196 …assertEquals("Jan 1, 1970, 00:00 – Jan 2, 1970, 00:00", formatDateRange(l, utc, 0, DAY + 1, flags)… in test10089890() 198 …assertEquals("Dec 31, 1969, 16:00 – Jan 1, 1970, 16:00", formatDateRange(l, pacific, 0, DAY, flags… in test10089890() 212 ULocale l = ULocale.US; in test10318326() local 216 assertEquals("00:00", formatDateRange(l, utc, midnight, midnight, time24)); in test10318326() 217 assertEquals("12:00 AM", formatDateRange(l, utc, midnight, midnight, time12)); in test10318326() 218 assertEquals("16:00", formatDateRange(l, utc, teaTime, teaTime, time24)); in test10318326() [all …]
|
/libcore/ojluni/src/main/java/java/util/logging/ |
D | Level.java | 537 KnownLevel(Level l) { in KnownLevel() argument 538 this.levelObject = l; in KnownLevel() 539 if (l.getClass() == Level.class) { in KnownLevel() 540 this.mirroredLevel = l; in KnownLevel() 543 this.mirroredLevel = new Level(l.name, l.value, l.resourceBundleName, false); in KnownLevel() 547 static synchronized void add(Level l) { in add() argument 550 KnownLevel o = new KnownLevel(l); in add() 551 List<KnownLevel> list = nameToLevels.get(l.name); in add() 554 nameToLevels.put(l.name, list); in add() 558 list = intToLevels.get(l.value); in add() [all …]
|
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/ |
D | ForEachOpTest.java | 92 List<Integer> l = new ArrayList<>(); 93 s.forEachOrdered(l::add); 94 return l; 113 List<Integer> l = Collections.synchronizedList(new ArrayList<>()); 114 s.forEach(l::add); 115 return l; 140 List<Integer> l = new ArrayList<>(); 141 s.forEachOrdered(l::add); 142 return l; 161 List<Integer> l = Collections.synchronizedList(new ArrayList<Integer>()); [all …]
|
/libcore/luni/src/test/java/libcore/java/util/concurrent/ |
D | CopyOnWriteArrayListTest.java | 310 List<Double> l = new CopyOnWriteArrayList<>(new Double[] {5.0, 2.0, -3.0}); in test_replaceAll() local 311 l.replaceAll(v -> v * 2); in test_replaceAll() 312 assertEquals(10.0, l.get(0)); in test_replaceAll() 313 assertEquals(4.0, l.get(1)); in test_replaceAll() 314 assertEquals(-6.0, l.get(2)); in test_replaceAll() 318 l.replaceAll(null); in test_replaceAll() 325 List<Double> l = new CopyOnWriteArrayList<>(new Double[] {5.0, 2.0, -3.0}); in test_sort() local 326 l.sort((v1, v2) -> v1.compareTo(v2)); in test_sort() 327 assertEquals(-3.0, l.get(0)); in test_sort() 328 assertEquals(2.0, l.get(1)); in test_sort() [all …]
|
/libcore/ojluni/src/main/java/javax/crypto/spec/ |
D | DHParameterSpec.java | 64 private int l; field in DHParameterSpec 76 this.l = 0; in DHParameterSpec() 89 public DHParameterSpec(BigInteger p, BigInteger g, int l) { in DHParameterSpec() argument 92 this.l = l; in DHParameterSpec() 121 return this.l; in getL()
|