Home
last modified time | relevance | path

Searched refs:get (Results 1 – 25 of 1035) sorted by relevance

12345678910>>...42

/libcore/luni/src/test/java/libcore/java/nio/
DOldAndroidNIOTest.java138 assertEquals((byte) 0xA7, b.get(7)); in byteBufferTest()
140 b.get(12); in byteBufferTest()
146 b.get(-10); in byteBufferTest()
154 assertEquals((byte) 0xA0, b.get()); in byteBufferTest()
155 assertEquals((byte) 0xA1, b.get()); in byteBufferTest()
156 assertEquals((byte) 0xA2, b.get()); in byteBufferTest()
157 assertEquals((byte) 0xA3, b.get()); in byteBufferTest()
158 assertEquals((byte) 0xA4, b.get()); in byteBufferTest()
159 assertEquals((byte) 0xA5, b.get()); in byteBufferTest()
160 assertEquals((byte) 0xA6, b.get()); in byteBufferTest()
[all …]
DBufferTest.java81 b.order(ByteOrder.BIG_ENDIAN).asCharBuffer().get(chars, 1, 4); in testByteSwappedBulkGet()
83 b.order(ByteOrder.LITTLE_ENDIAN).asCharBuffer().get(chars, 1, 4); in testByteSwappedBulkGet()
87 b.order(ByteOrder.BIG_ENDIAN).asDoubleBuffer().get(doubles, 1, 1); in testByteSwappedBulkGet()
91 b.order(ByteOrder.LITTLE_ENDIAN).asDoubleBuffer().get(doubles, 1, 1); in testByteSwappedBulkGet()
97 b.order(ByteOrder.BIG_ENDIAN).asFloatBuffer().get(floats, 1, 2); in testByteSwappedBulkGet()
102 b.order(ByteOrder.LITTLE_ENDIAN).asFloatBuffer().get(floats, 1, 2); in testByteSwappedBulkGet()
109 b.order(ByteOrder.BIG_ENDIAN).asIntBuffer().get(ints, 1, 2); in testByteSwappedBulkGet()
114 b.order(ByteOrder.LITTLE_ENDIAN).asIntBuffer().get(ints, 1, 2); in testByteSwappedBulkGet()
121 b.order(ByteOrder.BIG_ENDIAN).asLongBuffer().get(longs, 1, 1); in testByteSwappedBulkGet()
125 b.order(ByteOrder.LITTLE_ENDIAN).asLongBuffer().get(longs, 1, 1); in testByteSwappedBulkGet()
[all …]
/libcore/luni/src/test/java/libcore/java/nio/file/
DLinuxPathTest.java65 private static final Path dummyPath = Paths.get("dummyPath");
82 assertEquals(Paths.get("/"), dummyPath.toAbsolutePath().getRoot()); in test_getRoot()
91 assertEquals(Paths.get("data"), Paths.get("/data").getFileName()); in test_getFileName()
92 assertEquals(Paths.get("data"), Paths.get("/data/").getFileName()); in test_getFileName()
93 assertEquals(Paths.get(".."), Paths.get("/data/dir1/..").getFileName()); in test_getFileName()
99 assertEquals(Paths.get("rootDir"), Paths.get("rootDir/dir").getParent()); in test_getParent()
104 assertEquals(0, Paths.get("/").getNameCount()); in test_getNameCount()
105 assertEquals(1, Paths.get("/dir").getNameCount()); in test_getNameCount()
106 assertEquals(2, Paths.get("/dir/dir").getNameCount()); in test_getNameCount()
107 assertEquals(2, Paths.get("/dir/..").getNameCount()); in test_getNameCount()
[all …]
DLinuxFileSystemTest.java86 assertTrue(pathMap.get(Paths.get("/"))); in test_getRootDirectories()
130 assertTrue(pathMatcher.matches(Paths.get("f.java"))); in test_getPathMatcher_glob()
131 assertFalse(pathMatcher.matches(Paths.get("f"))); in test_getPathMatcher_glob()
134 assertTrue(pathMatcher.matches(Paths.get("f.t"))); in test_getPathMatcher_glob()
135 assertFalse(pathMatcher.matches(Paths.get("f"))); in test_getPathMatcher_glob()
138 assertTrue(pathMatcher.matches(Paths.get("f.java"))); in test_getPathMatcher_glob()
139 assertTrue(pathMatcher.matches(Paths.get("f.class"))); in test_getPathMatcher_glob()
140 assertFalse(pathMatcher.matches(Paths.get("f.clas"))); in test_getPathMatcher_glob()
141 assertFalse(pathMatcher.matches(Paths.get("f.t"))); in test_getPathMatcher_glob()
144 assertTrue(pathMatcher.matches(Paths.get("f.t"))); in test_getPathMatcher_glob()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DBitSetTest.java93 assertTrue("Clear didn't clear bit " + i, !eightbs.get(i)); in test_clear()
109 assertFalse("Failed to clear bit", eightbs.get(7)); in test_clearI()
113 assertTrue("Clear cleared incorrect bits", eightbs.get(i)); in test_clearI()
117 assertFalse("Failed to clear bit", eightbs.get(165)); in test_clearI()
180 assertFalse("Shouldn't have flipped bit " + i, bs.get(i)); in test_clearII()
182 assertTrue("Shouldn't have cleared bit " + i, bs.get(i)); in test_clearII()
186 assertFalse("Failed to clear bit " + i, bs.get(i)); in test_clearII()
191 assertFalse("Shouldn't have flipped bit " + i, bs.get(i)); in test_clearII()
193 assertTrue("Shouldn't have cleared bit " + i, bs.get(i)); in test_clearII()
198 assertFalse("Shouldn't have flipped bit " + i, bs.get(i)); in test_clearII()
[all …]
DGregorianCalendarTest.java66 1972, gc.get(Calendar.YEAR)); in test_ConstructorIII()
68 gc.get(Calendar.MONTH) == Calendar.OCTOBER); in test_ConstructorIII()
70 .get(Calendar.DAY_OF_MONTH)); in test_ConstructorIII()
84 1972, gc.get(Calendar.YEAR)); in test_ConstructorIIIII()
86 gc.get(Calendar.MONTH) == Calendar.OCTOBER); in test_ConstructorIIIII()
88 .get(Calendar.DAY_OF_MONTH)); in test_ConstructorIIIII()
89 assertEquals("Incorrect calendar constructed", 7, gc.get(Calendar.HOUR)); in test_ConstructorIIIII()
91 1, gc.get(Calendar.AM_PM)); in test_ConstructorIIIII()
93 9, gc.get(Calendar.MINUTE)); in test_ConstructorIIIII()
100 5983, gc.get(Calendar.YEAR)); in test_ConstructorIIIII()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DAtomicBooleanTest.java31 assertTrue(new AtomicBoolean(true).get()); in testConstructor()
32 assertFalse(new AtomicBoolean(false).get()); in testConstructor()
40 assertFalse(ai.get()); in testConstructor2()
48 assertTrue(ai.get()); in testGetSet()
50 assertFalse(ai.get()); in testGetSet()
52 assertTrue(ai.get()); in testGetSet()
60 assertTrue(ai.get()); in testGetLazySet()
62 assertFalse(ai.get()); in testGetLazySet()
64 assertTrue(ai.get()); in testGetLazySet()
73 assertFalse(ai.get()); in testCompareAndSet()
[all …]
DAtomicLongTest.java38 assertEquals(1, ai.get()); in testConstructor()
46 assertEquals(0, ai.get()); in testConstructor2()
54 assertEquals(1, ai.get()); in testGetSet()
56 assertEquals(2, ai.get()); in testGetSet()
58 assertEquals(-3, ai.get()); in testGetSet()
66 assertEquals(1, ai.get()); in testGetLazySet()
68 assertEquals(2, ai.get()); in testGetLazySet()
70 assertEquals(-3, ai.get()); in testGetLazySet()
80 assertEquals(-4, ai.get()); in testCompareAndSet()
82 assertEquals(-4, ai.get()); in testCompareAndSet()
[all …]
DAtomicIntegerTest.java36 assertEquals(1, ai.get()); in testConstructor()
44 assertEquals(0, ai.get()); in testConstructor2()
52 assertEquals(1, ai.get()); in testGetSet()
54 assertEquals(2, ai.get()); in testGetSet()
56 assertEquals(-3, ai.get()); in testGetSet()
64 assertEquals(1, ai.get()); in testGetLazySet()
66 assertEquals(2, ai.get()); in testGetLazySet()
68 assertEquals(-3, ai.get()); in testGetLazySet()
78 assertEquals(-4, ai.get()); in testCompareAndSet()
80 assertEquals(-4, ai.get()); in testCompareAndSet()
[all …]
DAtomicLongFieldUpdaterTest.java52 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
54 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
56 assertEquals(7, a.get(this)); in checkCompareAndSetProtectedSub()
66 assertEquals(72L, a.get(obj)); in checkPackageAccess()
68 assertEquals(73L, a.get(obj)); in checkPackageAccess()
145 assertEquals(1, a.get(this)); in testGetSet()
147 assertEquals(2, a.get(this)); in testGetSet()
149 assertEquals(-3, a.get(this)); in testGetSet()
159 assertEquals(1, a.get(this)); in testGetLazySet()
161 assertEquals(2, a.get(this)); in testGetLazySet()
[all …]
DAtomicIntegerFieldUpdaterTest.java52 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
54 assertEquals(-4, a.get(this)); in checkCompareAndSetProtectedSub()
56 assertEquals(7, a.get(this)); in checkCompareAndSetProtectedSub()
66 assertEquals(72, a.get(obj)); in checkPackageAccess()
68 assertEquals(73, a.get(obj)); in checkPackageAccess()
145 assertEquals(1, a.get(this)); in testGetSet()
147 assertEquals(2, a.get(this)); in testGetSet()
149 assertEquals(-3, a.get(this)); in testGetSet()
159 assertEquals(1, a.get(this)); in testGetLazySet()
161 assertEquals(2, a.get(this)); in testGetLazySet()
[all …]
DAtomicReferenceTest.java32 assertSame(one, ai.get()); in testConstructor()
40 assertNull(ai.get()); in testConstructor2()
48 assertSame(one, ai.get()); in testGetSet()
50 assertSame(two, ai.get()); in testGetSet()
52 assertSame(m3, ai.get()); in testGetSet()
60 assertSame(one, ai.get()); in testGetLazySet()
62 assertSame(two, ai.get()); in testGetLazySet()
64 assertSame(m3, ai.get()); in testGetLazySet()
74 assertSame(m4, ai.get()); in testCompareAndSet()
76 assertSame(m4, ai.get()); in testCompareAndSet()
[all …]
DAtomicIntegerArrayTest.java35 assertEquals(0, aa.get(i)); in testConstructor()
57 assertEquals(a[i], aa.get(i)); in testConstructor2()
67 aa.get(index); in testIndexing()
104 assertEquals(1, aa.get(i)); in testGetSet()
106 assertEquals(2, aa.get(i)); in testGetSet()
108 assertEquals(-3, aa.get(i)); in testGetSet()
119 assertEquals(1, aa.get(i)); in testGetLazySet()
121 assertEquals(2, aa.get(i)); in testGetLazySet()
123 assertEquals(-3, aa.get(i)); in testGetLazySet()
136 assertEquals(-4, aa.get(i)); in testCompareAndSet()
[all …]
/libcore/ojluni/src/test/java/time/test/java/time/chrono/
DTestIsoChronoImpl.java100 cal.set(Calendar.YEAR, isoDate.get(YEAR)); in test_IsoChrono_vsCalendar()
101 cal.set(Calendar.MONTH, isoDate.get(MONTH_OF_YEAR) - 1); in test_IsoChrono_vsCalendar()
102 cal.set(Calendar.DAY_OF_MONTH, isoDate.get(DAY_OF_MONTH)); in test_IsoChrono_vsCalendar()
105 …assertEquals(isoDate.get(DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + isoDa… in test_IsoChrono_vsCalendar()
106 …assertEquals(isoDate.get(MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch in " + isoDa… in test_IsoChrono_vsCalendar()
107 … assertEquals(isoDate.get(YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + isoDate); in test_IsoChrono_vsCalendar()
131 cal.set(Calendar.YEAR, isoDate.get(YEAR)); in test_DayOfWeek_IsoChronology_vsCalendar()
132 cal.set(Calendar.MONTH, isoDate.get(MONTH_OF_YEAR) - 1); in test_DayOfWeek_IsoChronology_vsCalendar()
133 cal.set(Calendar.DAY_OF_MONTH, isoDate.get(DAY_OF_MONTH)); in test_DayOfWeek_IsoChronology_vsCalendar()
137 …assertEquals(isoDate.get(DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch in " + isoDa… in test_DayOfWeek_IsoChronology_vsCalendar()
[all …]
DTestThaiBuddhistChronoImpl.java103 cal.set(Calendar.YEAR, thaiDate.get(ChronoField.YEAR)); in test_ThaiBuddhistChrono_vsCalendar()
104 cal.set(Calendar.MONTH, thaiDate.get(ChronoField.MONTH_OF_YEAR) - 1); in test_ThaiBuddhistChrono_vsCalendar()
105 cal.set(Calendar.DAY_OF_MONTH, thaiDate.get(ChronoField.DAY_OF_MONTH)); in test_ThaiBuddhistChrono_vsCalendar()
108 …assertEquals(thaiDate.get(ChronoField.DAY_OF_MONTH), cal.get(Calendar.DAY_OF_MONTH), "Day mismatch… in test_ThaiBuddhistChrono_vsCalendar()
109 …assertEquals(thaiDate.get(ChronoField.MONTH_OF_YEAR), cal.get(Calendar.MONTH) + 1, "Month mismatch… in test_ThaiBuddhistChrono_vsCalendar()
110 …assertEquals(thaiDate.get(ChronoField.YEAR_OF_ERA), cal.get(Calendar.YEAR), "Year mismatch in " + … in test_ThaiBuddhistChrono_vsCalendar()
119 … cal.get(Calendar.YEAR), cal.get(Calendar.MONTH) + 1, cal.get(Calendar.DAY_OF_MONTH)); in calToString()
/libcore/luni/src/test/java/libcore/java/io/
DOldObjectInputStreamGetFieldTest.java128 fields.get("noValue", false); in test_getException()
134 fields.get("noValue", (byte) 0); in test_getException()
140 fields.get("noValue", (char) 0); in test_getException()
146 fields.get("noValue", 0.0); in test_getException()
152 fields.get("noValue", 0.0f); in test_getException()
158 fields.get("noValue", (long) 0); in test_getException()
164 fields.get("noValue", 0); in test_getException()
170 fields.get("noValue", new Object()); in test_getException()
176 fields.get("noValue", (short) 0); in test_getException()
183 fields.get("byteValue", false); in test_getException()
[all …]
/libcore/luni/src/test/java/libcore/sun/security/x509/
DAlgorithmIdTest.java30 assertEquals("1.3.14.3.2.26", AlgorithmId.get("SHA-1").getOID().toString()); in test_get_String()
31 assertEquals("1.3.14.3.2.26", AlgorithmId.get("SHA1").getOID().toString()); in test_get_String()
32 assertEquals("2.16.840.1.101.3.4.2.4", AlgorithmId.get("SHA-224").getOID().toString()); in test_get_String()
35 assertEquals("2.16.840.1.101.3.4.2.4", AlgorithmId.get("SHA224").getOID().toString()); in test_get_String()
37 assertEquals("2.16.840.1.101.3.4.2.1", AlgorithmId.get("SHA-256").getOID().toString()); in test_get_String()
40 assertEquals("2.16.840.1.101.3.4.2.1", AlgorithmId.get("SHA256").getOID().toString()); in test_get_String()
43 "2.16.840.1.101.3.4.3.1", AlgorithmId.get("SHA224WithDSA").getOID().toString()); in test_get_String()
45 "2.16.840.1.101.3.4.3.2", AlgorithmId.get("SHA256WithDSA").getOID().toString()); in test_get_String()
48 "2.16.840.1.101.3.4.3.1", AlgorithmId.get("sHA224withDSA").getOID().toString()); in test_get_String()
50 "2.16.840.1.101.3.4.3.2", AlgorithmId.get("sHA256withDSA").getOID().toString()); in test_get_String()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/
DThreadLocalTest.java43 assertEquals("initial", tl.get()); in test_remove()
45 assertEquals("fixture", tl.get()); in test_remove()
47 assertEquals("initial", tl.get()); in test_remove()
56 assertNull("ThreadLocal's initial value is null", l.get()); in test_get()
69 + " but is " + l1.get(), l1.get() == INITIAL_VALUE); in test_get()
82 THREADVALUE.result = l1.get(); in test_get()
107 thrVar.get(); in test_get()
119 assertTrue("ThreadLocal's initial value is " + OBJ, l.get() == OBJ); in test_setLjava_lang_Object()
132 THREADVALUE.result = l.get(); in test_setLjava_lang_Object()
162 assertSame(INITIAL_VALUE, l1.get()); in test_withInitial()
[all …]
/libcore/support/src/test/java/tests/support/
DSupport_ListTest.java43 elem = list.get(counter); in runTest()
52 .get(50).equals(new Integer(1000))); in runTest()
55 list.get(51).equals(new Integer(50))); in runTest()
58 list.get(49).equals(new Integer(49))); in runTest()
61 assertTrue("ListTest - a) set failed--did not set", list.get(50) in runTest()
64 list.get(51).equals(new Integer(50))); in runTest()
66 .get(49).equals(new Integer(49))); in runTest()
70 list.get(50).equals(new Integer(50))); in runTest()
73 list.get(51).equals(new Integer(51))); in runTest()
76 list.get(49).equals(new Integer(49))); in runTest()
[all …]
/libcore/luni/src/main/java/libcore/icu/
DDateUtilsBridge.java151 return c2.get(Calendar.JULIAN_DAY) - c1.get(Calendar.JULIAN_DAY); in dayDistance()
161 return c.get(Calendar.HOUR_OF_DAY) == 0 && c.get(Calendar.MINUTE) == 0; in isDisplayMidnightUsingSkeleton()
165 return c.get(Calendar.MINUTE) == 0 && c.get(Calendar.SECOND) == 0; in onTheHour()
169 return c1.get(Calendar.YEAR) != c2.get(Calendar.YEAR) || in fallOnDifferentDates()
170 c1.get(Calendar.MONTH) != c2.get(Calendar.MONTH) || in fallOnDifferentDates()
171 c1.get(Calendar.DAY_OF_MONTH) != c2.get(Calendar.DAY_OF_MONTH); in fallOnDifferentDates()
175 return c1.get(Calendar.MONTH) == c2.get(Calendar.MONTH); in fallInSameMonth()
179 return c1.get(Calendar.YEAR) == c2.get(Calendar.YEAR); in fallInSameYear()
185 return c.get(Calendar.YEAR) == now.get(Calendar.YEAR); in isThisYear()
/libcore/luni/src/test/java/libcore/java/util/concurrent/
DCopyOnWriteArrayListTest.java59 bcd.get(1); in testSubListAndNonStructuralChanges()
71 bcd.get(1); in testSubListAndStructuralChanges()
84 bcd.get(1); in testSubListAndSizePreservingStructuralChanges()
200 future.get(); // this will throw the above exception in testAddAllIsAtomic()
303 assertEquals(10.0, l.get(0)); in test_replaceAll()
304 assertEquals(4.0, l.get(1)); in test_replaceAll()
305 assertEquals(-6.0, l.get(2)); in test_replaceAll()
318 assertEquals(-3.0, l.get(0)); in test_sort()
319 assertEquals(2.0, l.get(1)); in test_sort()
320 assertEquals(5.0, l.get(2)); in test_sort()
[all …]
/libcore/luni/src/test/java/libcore/java/util/function/
DLongPredicateTest.java42 assertTrue(alwaysTrueInvoked.get() && alwaysTrue2Invoked.get()); in testAnd()
47 assertTrue(alwaysTrueInvoked.get() && alwaysFalseInvoked.get()); in testAnd()
52 assertTrue(alwaysFalseInvoked.get() && !alwaysFalse2Invoked.get()); in testAnd()
57 assertTrue(alwaysFalseInvoked.get() && !alwaysTrueInvoked.get()); in testAnd()
93 assertTrue(alwaysTrueInvoked.get() && !alwaysTrue2Invoked.get()); in testOr()
98 assertTrue(alwaysTrueInvoked.get() && !alwaysFalseInvoked.get()); in testOr()
103 assertTrue(alwaysFalseInvoked.get() && alwaysFalse2Invoked.get()); in testOr()
108 assertTrue(alwaysFalseInvoked.get() && alwaysTrueInvoked.get()); in testOr()
DIntPredicateTest.java48 assertTrue(alwaysTrueInvoked.get() && alwaysTrue2Invoked.get()); in testAnd()
53 assertTrue(alwaysTrueInvoked.get() && alwaysFalseInvoked.get()); in testAnd()
58 assertTrue(alwaysFalseInvoked.get() && !alwaysFalse2Invoked.get()); in testAnd()
63 assertTrue(alwaysFalseInvoked.get() && !alwaysTrueInvoked.get()); in testAnd()
105 assertTrue(alwaysTrueInvoked.get() && !alwaysTrue2Invoked.get()); in testOr()
110 assertTrue(alwaysTrueInvoked.get() && !alwaysFalseInvoked.get()); in testOr()
115 assertTrue(alwaysFalseInvoked.get() && alwaysFalse2Invoked.get()); in testOr()
120 assertTrue(alwaysFalseInvoked.get() && alwaysTrueInvoked.get()); in testOr()
DDoublePredicateTest.java48 assertTrue(alwaysTrueInvoked.get() && alwaysTrue2Invoked.get()); in testAnd()
53 assertTrue(alwaysTrueInvoked.get() && alwaysFalseInvoked.get()); in testAnd()
58 assertTrue(alwaysFalseInvoked.get() && !alwaysFalse2Invoked.get()); in testAnd()
63 assertTrue(alwaysFalseInvoked.get() && !alwaysTrueInvoked.get()); in testAnd()
105 assertTrue(alwaysTrueInvoked.get() && !alwaysTrue2Invoked.get()); in testOr()
110 assertTrue(alwaysTrueInvoked.get() && !alwaysFalseInvoked.get()); in testOr()
115 assertTrue(alwaysFalseInvoked.get() && alwaysFalse2Invoked.get()); in testOr()
120 assertTrue(alwaysFalseInvoked.get() && alwaysTrueInvoked.get()); in testOr()
DPredicateTest.java48 assertTrue(alwaysTrueInvoked.get() && alwaysTrue2Invoked.get()); in testAnd()
53 assertTrue(alwaysTrueInvoked.get() && alwaysFalseInvoked.get()); in testAnd()
58 assertTrue(alwaysFalseInvoked.get() && !alwaysFalse2Invoked.get()); in testAnd()
63 assertTrue(alwaysFalseInvoked.get() && !alwaysTrueInvoked.get()); in testAnd()
105 assertTrue(alwaysTrueInvoked.get() && !alwaysTrue2Invoked.get()); in testOr()
110 assertTrue(alwaysTrueInvoked.get() && !alwaysFalseInvoked.get()); in testOr()
115 assertTrue(alwaysFalseInvoked.get() && alwaysFalse2Invoked.get()); in testOr()
120 assertTrue(alwaysFalseInvoked.get() && alwaysTrueInvoked.get()); in testOr()

12345678910>>...42