/libcore/ojluni/src/main/native/ |
D | io_util.h | 88 #define WITH_PLATFORM_STRING(env, strexp, var) \ argument 90 const char *var; \ 91 jstring _##var##str = (strexp); \ 92 if (_##var##str == NULL) { \ 94 goto _##var##end; \ 96 var = JNU_GetStringPlatformChars((env), _##var##str, NULL); \ 97 if (var == NULL) goto _##var##end; 99 #define WITH_FIELD_PLATFORM_STRING(env, object, id, var) \ argument 104 var) 106 #define END_PLATFORM_STRING(env, var) \ argument [all …]
|
D | ProcessEnvironment_md.c | 71 jbyteArray var, val; in ProcessEnvironment_environ() local 75 var = (*env)->NewByteArray(env, varLength); in ProcessEnvironment_environ() 76 if (var == NULL) return NULL; in ProcessEnvironment_environ() 79 (*env)->SetByteArrayRegion(env, var, 0, varLength, in ProcessEnvironment_environ() 83 (*env)->SetObjectArrayElement(env, result, 2*j , var); in ProcessEnvironment_environ() 85 (*env)->DeleteLocalRef(env, var); in ProcessEnvironment_environ()
|
/libcore/luni/src/test/java/libcore/java/util/ |
D | SplittableRandomTest.java | 61 var random = new SplittableRandom(); in splits_streamOfSizeZero_areEmpty() 69 var seed = 1001; in splitInstances_areTheSame_whenTheyAreSplitWithIdenticalSource() 70 var random1 = new SplittableRandom(seed); in splitInstances_areTheSame_whenTheyAreSplitWithIdenticalSource() 71 var random2 = new SplittableRandom(seed); in splitInstances_areTheSame_whenTheyAreSplitWithIdenticalSource() 73 var sourceSeed = 9999; in splitInstances_areTheSame_whenTheyAreSplitWithIdenticalSource() 75 var splitRandom1 = random1.split(new SplittableRandom(sourceSeed)); in splitInstances_areTheSame_whenTheyAreSplitWithIdenticalSource() 76 var splitRandom2 = random2.split(new SplittableRandom(sourceSeed)); in splitInstances_areTheSame_whenTheyAreSplitWithIdenticalSource() 83 var seed = 1001; in splitsInstances_areTheSame_whenTheyAreSplitWithIdenticalSource_boundedStream() 85 var random1 = new SplittableRandom(seed); in splitsInstances_areTheSame_whenTheyAreSplitWithIdenticalSource_boundedStream() 86 var random2 = new SplittableRandom(seed); in splitsInstances_areTheSame_whenTheyAreSplitWithIdenticalSource_boundedStream() [all …]
|
D | WeakHashMapTest.java | 77 var map = new WeakHashMap<String, String>(); in testContainsNullValue() 91 var map = new WeakHashMap<String, String>(); in testEntrySet_removeMapping() 103 var map = new WeakHashMap<String, String>(); in testEntrySet_clear() 113 var map = new WeakHashMap<String, String>(); in testEntrySet_entrySetValue() 117 var entry = map.entrySet().iterator().next(); in testEntrySet_entrySetValue() 125 var map = new WeakHashMap<String, String>(); in testEntrySet_entryEquals() 129 var entry = map.entrySet().iterator().next(); in testEntrySet_entryEquals() 136 var map = new WeakHashMap<String, String>(); in testKeySet_remove() 139 var keys = map.keySet(); in testKeySet_remove() 145 var map = new WeakHashMap<String, String>(); in testKeySet_clear() [all …]
|
D | ServiceLoaderTest.java | 46 var first = loader.findFirst(); in test_findFirst_nonEmptyLoader() 53 var serviceLoader = ServiceLoader.load(UnimplementedInterface.class); in test_findFirst_emptyLoader() 59 var serviceLoader = ServiceLoader.load(UnimplementedInterface.class); in test_stream_emptyLoader() 61 var result = serviceLoader.stream().toList(); in test_stream_emptyLoader() 67 var serviceLoader = ServiceLoader.load(ServiceLoaderTestInterface.class); in test_streamTypes_nonEmptyLoader() 69 var providerTypes = serviceLoader.stream().map(ServiceLoader.Provider::type).toList(); in test_streamTypes_nonEmptyLoader() 75 var serviceLoader = ServiceLoader.load(ServiceLoaderTestInterface.class); in test_stream_providerGet_nonEmptyLoader() 77 var providedTypes = serviceLoader.stream() in test_stream_providerGet_nonEmptyLoader()
|
D | PriorityQueueTest.java | 36 var pq = new PriorityQueue<Integer>(); in forEach_throwsNPE_whenConsumerIsNullAndQueueIsEmpty() 43 var pq = new PriorityQueue<Integer>(); in forEach_throwsNPE_whenConsumerIsNullAndQueueIsNotEmpty() 52 var pq = new PriorityQueue<Integer>(); in forEach_followPriorityQueueInArbitraryOrder() 64 var expected = Map.of(-10, 1, 0, 2, 10, 1, 42, 2); in forEach_followPriorityQueueInArbitraryOrder() 66 var actual = new HashMap<Integer, Integer>(); in forEach_followPriorityQueueInArbitraryOrder() 76 var pq = new PriorityQueue<>(); in forEach_throwsCME_ifConsumerModifiesQueue()
|
D | MapCopyOfTest.java | 38 var key = "this is key"; in createsCopy_whenNonNull() 39 var value = "this is value"; in createsCopy_whenNonNull() 40 var map = Map.of(key, value); in createsCopy_whenNonNull() 41 var entry = map.entrySet().iterator().next(); in createsCopy_whenNonNull() 43 var copy = Map.Entry.copyOf(entry); in createsCopy_whenNonNull()
|
D | LegacyLocalesTest.java | 65 var msg = "Test should run on V+ only, current SDK level=" + VMRuntime.getSdkVersion(); in obsoleteLocales_withFlagEnabled() 156 var collatorClass = android.icu.text.Collator.class; in clearCollator() 157 var shimField = collatorClass.getDeclaredField("shim"); in clearCollator() 161 var icuResourceBundleClass = Class.forName("android.icu.impl.ICUResourceBundle"); in clearCollator() 162 var cacheField = icuResourceBundleClass.getDeclaredField("GET_AVAILABLE_CACHE"); in clearCollator() 164 var cache = cacheField.get(null); in clearCollator() 166 var mapField = Class.forName("android.icu.impl.SoftCache").getDeclaredField("map"); in clearCollator() 168 var map = (Map) mapField.get(cache); in clearCollator()
|
D | OptionalLongTest.java | 99 var heldValueHolder = new AtomicLong(-1); in test_isPresentOrElse_whenEmpty() 100 var whenEmptyHolder = new AtomicLong(-1); in test_isPresentOrElse_whenEmpty() 109 var heldValueHolder = new AtomicLong(-1); in test_isPresentOrElse_whenNonEmpty() 110 var whenEmptyHolder = new AtomicLong(-1); in test_isPresentOrElse_whenNonEmpty() 127 var elements = OptionalLong.of(42).stream().boxed().toList(); in test_stream_nonEmpty() 133 var elements = OptionalLong.empty().stream().boxed().toList(); in test_stream_empty()
|
D | FormatterTest.java | 287 try (var os = new FileOutputStream(aFile)) { in testConstructor_Ljava_io_OutputStreamLjava_nio_charset_CharsetLjava_util_Locale() 294 try (var os = new FileOutputStream(aFile)) { in testConstructor_Ljava_io_OutputStreamLjava_nio_charset_CharsetLjava_util_Locale() 295 var formatter = new Formatter(os, UTF_8, (Locale) null); in testConstructor_Ljava_io_OutputStreamLjava_nio_charset_CharsetLjava_util_Locale() 299 try (var os = new FileOutputStream(aFile)) { in testConstructor_Ljava_io_OutputStreamLjava_nio_charset_CharsetLjava_util_Locale() 300 var locale = Locale.getDefault(); in testConstructor_Ljava_io_OutputStreamLjava_nio_charset_CharsetLjava_util_Locale() 301 var formatter = new Formatter(os, UTF_8, locale); in testConstructor_Ljava_io_OutputStreamLjava_nio_charset_CharsetLjava_util_Locale() 323 var formatter = new Formatter(aFile, UTF_8, (Locale) null); in testConstructor_Ljava_io_FileLjava_nio_charset_CharsetLjava_util_Locale() 326 var locale = Locale.getDefault(); in testConstructor_Ljava_io_FileLjava_nio_charset_CharsetLjava_util_Locale() 394 var msg = "Checks are done only starting from V. Current SDK=" + VMRuntime.getSdkVersion(); in invalidIndicesThrowsException_afterU_whenChecksAreEnabled() 396 var formatter = new Formatter(Locale.US); in invalidIndicesThrowsException_afterU_whenChecksAreEnabled() [all …]
|
/libcore/ojluni/src/test/java/util/SequencedCollection/ |
D | Basic.java | 67 var lhm = new LinkedHashMap<String, Boolean>(); in setFromMap() 68 var ss = Collections.newSequencedSetFromMap(lhm); in setFromMap() 94 var r = new ArrayList<T>(list); in copyReversed() 101 var result = new ArrayList<Object[]>(); in all() 294 var list = reverseList(mode) ? base.reversed() : base; in applyMode() 295 var sub = list.subList(2, 5); in applyMode() 310 var cases = new ArrayList<Object[]>(); in subListMods() 324 var cases = new ArrayList<Object[]>(); in iteratorMods() 337 var cases = new ArrayList<Object[]>(); in subListIteratorMods() 358 var list1 = new ArrayList<String>(); in checkContents1() [all …]
|
D | BasicMap.java | 65 for (var e : mappings) in load() 92 var result = new ArrayList<Object[]>(); in all() 226 var cases = new ArrayList<Object[]>(); in viewRemoves() 239 var cases = new ArrayList<Object[]>(); in emptyViewRemoves() 252 var cases = new ArrayList<Object[]>(); in viewAddThrows() 283 var list1 = new ArrayList<Map.Entry<String, Integer>>(); in checkContents1() 290 for (var e : ref) { in checkContents1() 300 var rref = new ArrayList<>(ref); in checkContents() 302 var rmap = map.reversed(); in checkContents() 305 var rrmap = rmap.reversed(); in checkContents() [all …]
|
/libcore/ojluni/src/test/java/io/Serializable/records/ |
D | UnsharedTest.java | 56 var foo = new Foo(6); in testReadUnshared() 58 var byteStream = serialize(foo, foo); in testReadUnshared() 59 var foo1 = (Foo) deserializeOne(byteStream); in testReadUnshared() 61 var foo2 = (Foo) deserializeOne(byteStream); in testReadUnshared() 66 var byteStream = serialize(foo, foo); in testReadUnshared() 67 var foo1 = (Foo) deserializeOneUnshared(byteStream); in testReadUnshared() 69 var expected = expectThrows(IOE, () -> deserializeOne(byteStream)); in testReadUnshared() 76 var foo = new Foo(7); in testWriteUnshared() 78 var byteStream = serializeUnshared(foo, foo); in testWriteUnshared() 79 var foo1 = (Foo) deserializeOne(byteStream); in testWriteUnshared() [all …]
|
D | StreamRefTest.java | 77 var a = new A(6); in basicRef() 78 var b = new B(a); in basicRef() 79 var c = new C(b); in basicRef() 80 var d = new D(c); in basicRef() 82 var bytes = serialize(a, b, c, d); in basicRef() 98 var a = new A(7); in reverseBasicRef() 99 var b = new B(a); in reverseBasicRef() 100 var c = new C(b); in reverseBasicRef() 101 var d = new D(c); in reverseBasicRef() 103 var bytes = serialize(d, c, b, a); in reverseBasicRef() [all …]
|
/libcore/ojluni/src/test/java/time/test/java/time/ |
D | TestInstantSource.java | 49 var test = InstantSource.system(); in test_system() 52 var millis = System.currentTimeMillis(); in test_system() 53 var testMillis = test.millis(); in test_system() 54 var testInstantMillis = test.instant().toEpochMilli(); in test_system() 63 var millis = 257265861691L; 64 var instant = Instant.ofEpochMilli(millis); 65 var duration = Duration.ofSeconds(1); 66 var test = InstantSource.tick(InstantSource.fixed(instant), duration); 76 var millis = 257265861691L; 77 var instant = Instant.ofEpochMilli(millis); [all …]
|
/libcore/ojluni/src/test/java/util/Properties/ |
D | PropertiesEntrySetTest.java | 48 var aEntrySet = a.entrySet(); in testEquals() 53 var bEntrySet = b.entrySet(); in testEquals() 67 var cEntrySet = c.entrySet(); in testEquals() 77 var dEntrySet = d.entrySet(); in testEquals() 103 var aEntrySet = a.entrySet(); in testToString() 119 var bEntrySet = b.entrySet(); in testToString() 155 var aEntrySet = a.entrySet(); in testEntrySetWithoutException() 158 var i = aEntrySet.iterator(); in testEntrySetWithoutException() 159 var e1 = i.next(); in testEntrySetWithoutException() 164 var e2 = i.next(); in testEntrySetWithoutException() [all …]
|
/libcore/ojluni/src/test/java/util/Random/ |
D | RandomExponentialTest.java | 47 var errCount = 0; in main() 48 var errSample = Double.NaN; in main() 49 var random = RandomFactory.getRandom(); in main() 51 var expVal = random.nextExponential(); in main()
|
/libcore/ojluni/src/main/java/java/util/ |
D | SequencedMap.java | 152 var it = entrySet().iterator(); in firstEntry() 169 var it = reversed().entrySet().iterator(); in lastEntry() 188 var it = entrySet().iterator(); in pollFirstEntry() 190 var entry = new NullableKeyValueHolder<>(it.next()); in pollFirstEntry() 213 var it = reversed().entrySet().iterator(); in pollLastEntry() 215 var entry = new NullableKeyValueHolder<>(it.next()); in pollLastEntry()
|
/libcore/luni/src/main/java/libcore/reflect/ |
D | TypeVariableImpl.java | 74 for (TypeVariable var : formalVars) { in findFormalVar() 75 if (name.equals(var.getName())) { in findFormalVar() 76 return var; in findFormalVar() 107 TypeVariable var; in resolve() local 108 while ((var = findFormalVar(curLayer, name)) == null) { in resolve() 114 formalVar = (TypeVariableImpl<D>) var; in resolve()
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
D | NoSuchElementExceptionTest.java | 61 var cause = new Throwable(); in test_ConstructorLjava_lang_Throwable() 62 var e = new NoSuchElementException(cause); in test_ConstructorLjava_lang_Throwable() 69 var cause = new Throwable(); in test_ConstructorLjava_langStringLjava_lang_Throwable() 70 var e = new NoSuchElementException("message", cause); in test_ConstructorLjava_langStringLjava_lang_Throwable()
|
/libcore/luni/src/test/java/libcore/java/util/random/ |
D | SplittableGeneratorTest.java | 35 var sourceSeed = 12345; in splits_produceTheSameResult_whenSourceIsIdentical() 36 var size = 10; in splits_produceTheSameResult_whenSourceIsIdentical() 41 var splitRandom1 = random1.splits().limit(size).toList(); in splits_produceTheSameResult_whenSourceIsIdentical() 42 var splitRandom2 = random2.splits().limit(size).toList(); in splits_produceTheSameResult_whenSourceIsIdentical()
|
/libcore/ojluni/src/test/java/util/zip/ZipFile/ |
D | TestCleaner.java | 81 var def = new Deflater(); in testDeInflater() 87 var inf = new Inflater(); in testDeInflater() 114 try (var fos = new FileOutputStream(zip); in openAndCloseZipFile() 115 var zos = new ZipOutputStream(fos)) { in openAndCloseZipFile() 121 var zf = new ZipFile(zip); in openAndCloseZipFile() 122 var es = zf.entries(); in openAndCloseZipFile()
|
/libcore/ojluni/src/test/java/util/ArrayList/ |
D | SubListModCount.java | 39 var root = new ArrayList<Integer>(); in main() 40 var subList = root.subList(0, 0); in main() 48 var subSubList = subList.subList(0, 0); in main()
|
/libcore/support/src/test/java/tests/util/ |
D | SummaryStatistics.java | 57 public double var() { in var() method in SummaryStatistics 64 return Math.sqrt(var()); in stddev() 79 sb.append(var()); in toString()
|
/libcore/ojluni/src/main/java/jdk/internal/access/ |
D | SharedSecrets.java | 90 var access = javaUtilCollectionAccess; in getJavaUtilCollectionAccess() 245 var access = javaIOFileDescriptorAccess; in getJavaIOFileDescriptorAccess() 323 var access = javaObjectInputStreamAccess; in getJavaObjectInputStreamAccess()
|