equal
deleted
inserted
replaced
153 if (canCast) |
153 if (canCast) |
154 throw ex; |
154 throw ex; |
155 } |
155 } |
156 } |
156 } |
157 } |
157 } |
158 } |
|
159 |
|
160 @Test |
|
161 public void testIdentity() throws Throwable { |
|
162 MethodHandle id = ValueConversions.identity(); |
|
163 Object expResult = "foo"; |
|
164 Object result = id.invokeExact(expResult); |
|
165 assertEquals(expResult, result); |
|
166 } |
158 } |
167 |
159 |
168 @Test |
160 @Test |
169 public void testConvert() throws Throwable { |
161 public void testConvert() throws Throwable { |
170 for (long tval = 0, ctr = 0;;) { |
162 for (long tval = 0, ctr = 0;;) { |