Home
last modified time | relevance | path

Searched refs:m (Results 1 – 25 of 81) sorted by relevance

1234

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/regex/
DPattern2Test.java53 Matcher m; in testCursors() local
58 m = p.matcher("foobar"); in testCursors()
59 assertTrue(m.find()); in testCursors()
60 assertEquals(0, m.start()); in testCursors()
61 assertEquals(3, m.end()); in testCursors()
62 assertFalse(m.find()); in testCursors()
65 m.reset(); in testCursors()
66 assertTrue(m.find()); in testCursors()
67 assertEquals(0, m.start()); in testCursors()
68 assertEquals(3, m.end()); in testCursors()
[all …]
DModeTest.java32 Matcher m; in testCase() local
35 m = p.matcher("cAT123#dog345"); in testCase()
36 assertTrue(m.find()); in testCase()
37 assertEquals("dog", m.group(1)); in testCase()
38 assertFalse(m.find()); in testCase()
41 m = p.matcher("cAt123#doG345"); in testCase()
42 assertTrue(m.find()); in testCase()
43 assertEquals("cAt", m.group(1)); in testCase()
44 assertTrue(m.find()); in testCase()
45 assertEquals("doG", m.group(1)); in testCase()
[all …]
DMatcher2Test.java32 Matcher m = p.matcher("bar"); in test_toString() local
33 assertNotNull(m.toString()); in test_toString()
39 Matcher m = p.matcher("bar"); in testErrorConditions() local
40 assertFalse(m.matches()); in testErrorConditions()
43 m.start(); in testErrorConditions()
49 m.end(); in testErrorConditions()
55 m.group(); in testErrorConditions()
61 m.start(1); in testErrorConditions()
67 m.end(1); in testErrorConditions()
73 m.group(1); in testErrorConditions()
[all …]
DReplaceTest.java36 Matcher m = p.matcher(target); in testSimpleReplace() local
38 assertEquals("foobarxxxarfoofo1", m.replaceFirst(repl)); in testSimpleReplace()
39 assertEquals("foobarxxxarfooxxx", m.replaceAll(repl)); in testSimpleReplace()
45 Matcher m; in testCaptureReplace() local
52 m = p.matcher(target); in testCaptureReplace()
53 s = m.replaceFirst(repl); in testCaptureReplace()
55 s = m.replaceAll(repl); in testCaptureReplace()
62 m = p.matcher(target); in testCaptureReplace()
63 s = m.replaceFirst(repl); in testCaptureReplace()
68 s = m.replaceAll(repl); in testCaptureReplace()
DMatcherTest.java46 Matcher m = p.matcher("axxxxxa"); in testRegionsIntInt() local
47 assertFalse(m.matches()); in testRegionsIntInt()
49 m.region(1, 6); in testRegionsIntInt()
50 assertEquals(1, m.regionStart()); in testRegionsIntInt()
51 assertEquals(6, m.regionEnd()); in testRegionsIntInt()
52 assertTrue(m.matches()); in testRegionsIntInt()
55 m.region(1, 0); in testRegionsIntInt()
61 m.region(-1, 2); in testRegionsIntInt()
67 m.region(10, 11); in testRegionsIntInt()
73 m.region(1, 10); in testRegionsIntInt()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/regex/tests/java/util/regex/
DModeTest.java32 Matcher m; in testCase() local
35 m = p.matcher("cAT123#dog345"); in testCase()
36 assertTrue(m.find()); in testCase()
37 assertEquals("dog", m.group(1)); in testCase()
38 assertFalse(m.find()); in testCase()
42 m = p.matcher("cAt123#doG345"); in testCase()
43 assertTrue(m.find()); in testCase()
44 assertEquals("cAt", m.group(1)); in testCase()
45 assertTrue(m.find()); in testCase()
46 assertEquals("doG", m.group(1)); in testCase()
[all …]
DPattern2Test.java133 Matcher m; in testCapturingGroups() local
137 m = p.matcher("aaaaaaaab"); in testCapturingGroups()
138 assertTrue(m.matches()); in testCapturingGroups()
139 assertEquals(1, m.groupCount()); in testCapturingGroups()
140 assertEquals("aaaaaaaa", m.group(1)); in testCapturingGroups()
143 m = p.matcher("ananas"); in testCapturingGroups()
144 assertTrue(m.matches()); in testCapturingGroups()
145 assertEquals(4, m.groupCount()); in testCapturingGroups()
146 assertEquals("ananas", m.group(0)); in testCapturingGroups()
147 assertEquals("anan", m.group(1)); in testCapturingGroups()
[all …]
DMatcher2Test.java30 Matcher m = p.matcher("bar"); in test_toString() local
31 assertNotNull(m.toString()); in test_toString()
37 Matcher m = p.matcher("bar"); in testErrorConditions() local
38 assertFalse(m.matches()); in testErrorConditions()
41 m.start(); in testErrorConditions()
47 m.end(); in testErrorConditions()
53 m.group(); in testErrorConditions()
59 m.start(1); in testErrorConditions()
65 m.end(1); in testErrorConditions()
71 m.group(1); in testErrorConditions()
[all …]
DReplaceTest.java33 Matcher m = p.matcher(target); in testSimpleReplace() local
35 assertEquals("foobarxxxarfoofo1barfort", m.replaceFirst(repl)); in testSimpleReplace()
36 assertEquals("foobarxxxarfooxxxbarxxxt", m.replaceAll(repl)); in testSimpleReplace()
42 Matcher m; in testCaptureReplace() local
49 m = p.matcher(target); in testCaptureReplace()
50 s = m.replaceFirst(repl); in testCaptureReplace()
52 s = m.replaceAll(repl); in testCaptureReplace()
59 m = p.matcher(target); in testCaptureReplace()
60 s = m.replaceFirst(repl); in testCaptureReplace()
64 s = m.replaceAll(repl); in testCaptureReplace()
/libcore/luni/src/test/java/libcore/java/util/regex/
DOldAndroidRegexTest.java28 Matcher m = p.matcher("bcd"); in testMatches() local
29 assertTrue("Should match.", m.matches()); in testMatches()
33 m = p.matcher("abcdefg"); in testMatches()
34 assertFalse("Should not match.", m.matches()); in testMatches()
37 m = p.matcher("bcdefg"); in testMatches()
38 assertFalse("Should not match.", m.matches()); in testMatches()
41 m = p.matcher("abcd"); in testMatches()
42 assertFalse("Should not match.", m.matches()); in testMatches()
46 m = p.matcher("abc"); in testMatches()
47 assertTrue(m.matches()); in testMatches()
[all …]
DOldMatcherTest.java31 Matcher m = pat.matcher("Today is XX-XX-XX ..."); in testAppendReplacement() local
34 for (int i = 0; m.find(); i++) { in testAppendReplacement()
35 m.appendReplacement(sb, new Integer(i * 10 + i).toString()); in testAppendReplacement()
37 m.appendTail(sb); in testAppendReplacement()
41 m = pat.matcher("one-cat-two-cats-in-the-yard"); in testAppendReplacement()
44 m.find(); in testAppendReplacement()
46 m.appendReplacement(null, "dog"); in testAppendReplacement()
52 m.find(); in testAppendReplacement()
54 m.appendReplacement(sb, null); in testAppendReplacement()
77 Matcher m = p.matcher("one-cat-two-cats-in-the-yard"); in testAppendTail() local
[all …]
/libcore/luni/src/main/java/java/security/spec/
DECFieldF2m.java37 private final int m; field in ECFieldF2m
52 public ECFieldF2m(int m) { in ECFieldF2m() argument
53 this.m = m; in ECFieldF2m()
54 if (this.m <= 0) { in ECFieldF2m()
77 public ECFieldF2m(int m, BigInteger rp) { in ECFieldF2m() argument
78 this.m = m; in ECFieldF2m()
79 if (this.m <= 0) { in ECFieldF2m()
90 if ((this.rp.bitLength() != (m+1)) || in ECFieldF2m()
92 (!this.rp.testBit(0) || !this.rp.testBit(m)) ) { in ECFieldF2m()
123 public ECFieldF2m(int m, int[] ks) { in ECFieldF2m() argument
[all …]
/libcore/luni/src/main/java/java/util/concurrent/
DConcurrentSkipListSet.java66 private final ConcurrentNavigableMap<E,Object> m; field in ConcurrentSkipListSet
73 m = new ConcurrentSkipListMap<E,Object>(); in ConcurrentSkipListSet()
85 m = new ConcurrentSkipListMap<E,Object>(comparator); in ConcurrentSkipListSet()
100 m = new ConcurrentSkipListMap<E,Object>(); in ConcurrentSkipListSet()
113 m = new ConcurrentSkipListMap<E,Object>(s.comparator()); in ConcurrentSkipListSet()
120 ConcurrentSkipListSet(ConcurrentNavigableMap<E,Object> m) { in ConcurrentSkipListSet() argument
121 this.m = m; in ConcurrentSkipListSet()
135 clone.setMap(new ConcurrentSkipListMap<E,Object>(m)); in clone()
161 return m.size(); in size()
169 return m.isEmpty(); in isEmpty()
[all …]
DSynchronousQueue.java198 static boolean isFulfilling(int m) { return (m & FULFILLING) != 0; } in isFulfilling() argument
331 SNode m = awaitFulfill(s, timed, nanos); in transfer() local
332 if (m == s) { // wait was cancelled in transfer()
338 return (E) ((mode == REQUEST) ? m.item : s.item); in transfer()
345 SNode m = s.next; // m is s's match in transfer() local
346 if (m == null) { // all waiters are gone in transfer()
351 SNode mn = m.next; in transfer()
352 if (m.tryMatch(s)) { in transfer()
354 return (E) ((mode == REQUEST) ? m.item : s.item); in transfer()
356 s.casNext(m, mn); // help unlink in transfer()
[all …]
/libcore/luni/src/test/java/org/apache/harmony/security/tests/java/security/
DSecurityTest.java119 Map<String, String> m = new HashMap<String, String>(); in testGetAlgorithmPropertyLjava_lang_String_java_lang_String() local
120 m.clear(); in testGetAlgorithmPropertyLjava_lang_String_java_lang_String()
121 m.put("Alg.propName.algName", "value"); in testGetAlgorithmPropertyLjava_lang_String_java_lang_String()
122 provider.putAll(m); in testGetAlgorithmPropertyLjava_lang_String_java_lang_String()
284 Map<String, String> m = new HashMap<String, String>(); in test_getProvidersLjava_util_Map() local
285 Security.getProviders(m); in test_getProvidersLjava_util_Map()
287 assertNull("Not null result on empty map", Security.getProviders(m)); in test_getProvidersLjava_util_Map()
295 m.put("AAA.BBB.CCC", "aaaa"); // key has dot instead of space in test_getProvidersLjava_util_Map()
297 Security.getProviders(m); in test_getProvidersLjava_util_Map()
306 m.clear(); in test_getProvidersLjava_util_Map()
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DAbstractCollectionTest.java28 final ConcurrentHashMap<Integer, Integer> m = new ConcurrentHashMap<Integer, Integer>(); in test_toArray() local
34 m.values().toArray(); in test_toArray()
35 m.values().toArray(new Integer[m.size()]); in test_toArray()
43 m.put(-i, -i); in test_toArray()
46 m.put(i, i); in test_toArray()
47 m.remove(i); in test_toArray()
/libcore/luni/src/test/java/org/apache/harmony/crypto/tests/javax/crypto/func/
DMacThread.java39 Mac m = Mac.getInstance(algName); in test() local
42 m.init(sks); in test()
44 byte[] res = m.doFinal(src1); in test()
46 m.init(sks); in test()
47 res = m.doFinal(src2); in test()
49 m.init(sks); in test()
50 res = m.doFinal(src3); in test()
/libcore/luni/src/test/java/libcore/java/lang/
DCharacterTest.java197 Method m = Character.class.getDeclaredMethod("isDigit" + "Impl", int.class); in test_isDigit_against_icu4c() local
198 m.setAccessible(true); in test_isDigit_against_icu4c()
200 assertEquals(m.invoke(null, i), Character.isDigit(i)); in test_isDigit_against_icu4c()
206 Method m = Character.class.getDeclaredMethod("isIdentifierIgnorable" + "Impl", int.class); in test_isIdentifierIgnorable_against_icu4c() local
207 m.setAccessible(true); in test_isIdentifierIgnorable_against_icu4c()
209 assertEquals(m.invoke(null, i), Character.isIdentifierIgnorable(i)); in test_isIdentifierIgnorable_against_icu4c()
215 Method m = Character.class.getDeclaredMethod("isLetter" + "Impl", int.class); in test_isLetter_against_icu4c() local
216 m.setAccessible(true); in test_isLetter_against_icu4c()
218 assertEquals(m.invoke(null, i), Character.isLetter(i)); in test_isLetter_against_icu4c()
224 Method m = Character.class.getDeclaredMethod("isLetterOrDigit" + "Impl", int.class); in test_isLetterOrDigit_against_icu4c() local
[all …]
DClassCastExceptionTest.java123 EnumMap m = new EnumMap(E.class); in testEnumMapPut() local
125 m.put(F.A, "world"); in testEnumMapPut()
134 EnumSet m = EnumSet.noneOf(E.class); in testMiniEnumSetAdd() local
136 m.add(F.A); in testMiniEnumSetAdd()
145 EnumSet m = EnumSet.noneOf(E.class); in testMiniEnumSetAddAll() local
148 m.addAll(n); in testMiniEnumSetAddAll()
168 EnumSet m = EnumSet.noneOf(HugeE.class); in testHugeEnumSetAdd() local
170 m.add(HugeF.A0); in testHugeEnumSetAdd()
179 EnumSet m = EnumSet.noneOf(HugeE.class); in testHugeEnumSetAddAll() local
182 m.addAll(n); in testHugeEnumSetAddAll()
/libcore/benchmarks/src/benchmarks/regression/
DReflectionBenchmark.java95 Method m = klass.getDeclaredMethod("m"); in timeMethod_invokeV() local
98 m.invoke(instance); in timeMethod_invokeV()
104 Method m = klass.getDeclaredMethod("sm"); in timeMethod_invokeStaticV() local
106 m.invoke(null); in timeMethod_invokeStaticV()
112 Method m = klass.getDeclaredMethod("setField", int.class); in timeMethod_invokeI() local
115 m.invoke(instance, 1); in timeMethod_invokeI()
121 Method m = klass.getDeclaredMethod("setField", int.class); in timeMethod_invokePreBoxedI() local
125 m.invoke(instance, one); in timeMethod_invokePreBoxedI()
131 Method m = klass.getDeclaredMethod("setStaticField", int.class); in timeMethod_invokeStaticI() local
133 m.invoke(null, 1); in timeMethod_invokeStaticI()
[all …]
/libcore/luni/src/test/java/libcore/java/lang/annotation/
DAnnotationTypeMismatchExceptionTest.java27 Method m = String.class.getMethod("length"); in testGetters() local
28 AnnotationTypeMismatchException ex = new AnnotationTypeMismatchException(m, "poop"); in testGetters()
29 assertSame(m, ex.element()); in testGetters()
34 Method m = String.class.getMethod("length"); in testSerialization() local
35 AnnotationTypeMismatchException original = new AnnotationTypeMismatchException(m, "poop"); in testSerialization()
/libcore/luni/src/test/java/tests/api/java/util/
DIdentityHashMapTest.java176 IdentityHashMap m = new IdentityHashMap(); in test_containsKeyLjava_lang_Object() local
177 m.put(null, "test"); in test_containsKeyLjava_lang_Object()
178 assertTrue("Failed with null key", m.containsKey(null)); in test_containsKeyLjava_lang_Object()
179 assertTrue("Failed with missing key matching null hash", !m in test_containsKeyLjava_lang_Object()
204 Map.Entry m = (Map.Entry) i.next(); in test_entrySet() local
205 assertTrue("Returned incorrect entry set", hm.containsKey(m in test_entrySet()
207 && hm.containsValue(m.getValue())); in test_entrySet()
223 IdentityHashMap m = new IdentityHashMap(); in test_getLjava_lang_Object() local
224 m.put(null, "test"); in test_getLjava_lang_Object()
225 assertEquals("Failed with null key", "test", m.get(null)); in test_getLjava_lang_Object()
[all …]
DHashMapTest.java191 HashMap m = new HashMap(); in test_containsKeyLjava_lang_Object() local
192 m.put(null, "test"); in test_containsKeyLjava_lang_Object()
193 assertTrue("Failed with null key", m.containsKey(null)); in test_containsKeyLjava_lang_Object()
194 assertTrue("Failed with missing key matching null hash", !m in test_containsKeyLjava_lang_Object()
219 Map.Entry m = (Map.Entry) i.next(); in test_entrySet() local
220 assertTrue("Returned incorrect entry set", hm.containsKey(m in test_entrySet()
222 && hm.containsValue(m.getValue())); in test_entrySet()
260 HashMap m = new HashMap(); in test_getLjava_lang_Object() local
261 m.put(null, "test"); in test_getLjava_lang_Object()
262 assertEquals("Failed with null key", "test", m.get(null)); in test_getLjava_lang_Object()
[all …]
DLinkedHashMapTest.java143 LinkedHashMap m = new LinkedHashMap(); in test_getLjava_lang_Object() local
144 m.put(null, "test"); in test_getLjava_lang_Object()
145 assertEquals("Failed with null key", "test", m.get(null)); in test_getLjava_lang_Object()
146 assertNull("Failed with missing key matching null hash", m in test_getLjava_lang_Object()
160 LinkedHashMap m = new LinkedHashMap(); in test_putLjava_lang_ObjectLjava_lang_Object() local
161 m.put(new Short((short) 0), "short"); in test_putLjava_lang_ObjectLjava_lang_Object()
162 m.put(null, "test"); in test_putLjava_lang_ObjectLjava_lang_Object()
163 m.put(new Integer(0), "int"); in test_putLjava_lang_ObjectLjava_lang_Object()
164 assertEquals("Failed adding to bucket containing null", "short", m.get( in test_putLjava_lang_ObjectLjava_lang_Object()
166 assertEquals("Failed adding to bucket containing null2", "int", m.get( in test_putLjava_lang_ObjectLjava_lang_Object()
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/annotation/tests/java/lang/annotation/
DAnnotationTypeMismatchExceptionTest.java39 Method m = methods[0]; in test_constructorLjava_lang_reflect_MethodLjava_lang_String() local
41 m, "some type"); in test_constructorLjava_lang_reflect_MethodLjava_lang_String()
43 assertSame("wrong method name", m, e.element()); in test_constructorLjava_lang_reflect_MethodLjava_lang_String()

1234