|
3 | 3 | import java.math.BigDecimal; |
4 | 4 | import java.math.BigInteger; |
5 | 5 | import java.nio.ByteBuffer; |
| 6 | +import java.util.ArrayList; |
6 | 7 | import java.util.Date; |
| 8 | +import java.util.HashMap; |
| 9 | +import java.util.List; |
| 10 | +import java.util.Map; |
7 | 11 | import java.util.Random; |
8 | 12 |
|
9 | 13 | import org.junit.Ignore; |
@@ -273,41 +277,6 @@ public void testDoubleArray(double[] v) throws Exception { |
273 | 277 | public void testNil() throws Exception { |
274 | 278 | } |
275 | 279 |
|
276 | | - public void testBigInteger() throws Exception { |
277 | | - // FIXME testBigInteger(null); |
278 | | - testBigInteger(BigInteger.valueOf(0)); |
279 | | - testBigInteger(BigInteger.valueOf(-1)); |
280 | | - testBigInteger(BigInteger.valueOf(1)); |
281 | | - testBigInteger(BigInteger.valueOf(Integer.MIN_VALUE)); |
282 | | - testBigInteger(BigInteger.valueOf(Integer.MAX_VALUE)); |
283 | | - testBigInteger(BigInteger.valueOf(Long.MIN_VALUE)); |
284 | | - testBigInteger(BigInteger.valueOf(Long.MAX_VALUE)); |
285 | | - BigInteger max = BigInteger.valueOf(Long.MAX_VALUE).setBit(63); |
286 | | - testBigInteger(max); |
287 | | - Random rand = new Random(); |
288 | | - for (int i = 0; i < 1000; i++) { |
289 | | - testBigInteger(max.subtract(BigInteger.valueOf(Math.abs(rand.nextLong())))); |
290 | | - } |
291 | | - } |
292 | | - |
293 | | - public void testBigInteger(BigInteger v) throws Exception { |
294 | | - } |
295 | | - |
296 | | - public void testBigDecimal() throws Exception { |
297 | | - // FIXME testBigDecimal(null); |
298 | | - testBigDecimal(BigDecimal.valueOf(0)); |
299 | | - testBigDecimal(BigDecimal.valueOf(-1)); |
300 | | - testBigDecimal(BigDecimal.valueOf(1)); |
301 | | - testBigDecimal(BigDecimal.valueOf(Integer.MIN_VALUE)); |
302 | | - testBigDecimal(BigDecimal.valueOf(Integer.MAX_VALUE)); |
303 | | - testBigDecimal(BigDecimal.valueOf(Long.MIN_VALUE)); |
304 | | - testBigDecimal(BigDecimal.valueOf(Long.MAX_VALUE)); |
305 | | - // TODO |
306 | | - } |
307 | | - |
308 | | - public void testBigDecimal(BigDecimal v) throws Exception { |
309 | | - } |
310 | | - |
311 | 280 | public void testString() throws Exception { |
312 | 281 | // TODO testString(null); |
313 | 282 | testString(""); |
@@ -370,6 +339,83 @@ public void testByteBuffer() throws Exception { |
370 | 339 | public void testByteBuffer(ByteBuffer v) throws Exception { |
371 | 340 | } |
372 | 341 |
|
| 342 | + public void testList() throws Exception { |
| 343 | + // FIXME testList(null); |
| 344 | + List<Integer> list0 = new ArrayList<Integer>(); |
| 345 | + testList(list0); |
| 346 | + List<Integer> list1 = new ArrayList<Integer>(); |
| 347 | + Random rand1 = new Random(); |
| 348 | + for (int i = 0; i < 1000; ++i) { |
| 349 | + list1.add(rand1.nextInt()); |
| 350 | + } |
| 351 | + testList(list1); |
| 352 | + List<String> list2 = new ArrayList<String>(); |
| 353 | + Random rand2 = new Random(); |
| 354 | + for (int i = 0; i < 1000; ++i) { |
| 355 | + list2.add("xx" + rand2.nextInt()); |
| 356 | + } |
| 357 | + testList(list2); |
| 358 | + } |
| 359 | + |
| 360 | + public void testList(List v) throws Exception { |
| 361 | + } |
| 362 | + |
| 363 | + public void testMap() throws Exception { |
| 364 | + // FIXME testMap(null); |
| 365 | + Map<Integer, Integer> map0 = new HashMap<Integer, Integer>(); |
| 366 | + testMap(map0); |
| 367 | + Map<Integer, Integer> map1 = new HashMap<Integer, Integer>(); |
| 368 | + Random rand1 = new Random(); |
| 369 | + for (int i = 0; i < 1000; ++i) { |
| 370 | + map1.put(rand1.nextInt(), rand1.nextInt()); |
| 371 | + } |
| 372 | + testMap(map1); |
| 373 | + Map<String, Integer> map2 = new HashMap<String, Integer>(); |
| 374 | + Random rand2 = new Random(); |
| 375 | + for (int i = 0; i < 1000; ++i) { |
| 376 | + map2.put("xx" + rand2.nextInt(), rand2.nextInt()); |
| 377 | + } |
| 378 | + testMap(map2); |
| 379 | + } |
| 380 | + |
| 381 | + public void testMap(Map v) throws Exception { |
| 382 | + } |
| 383 | + |
| 384 | + public void testBigInteger() throws Exception { |
| 385 | + // FIXME testBigInteger(null); |
| 386 | + testBigInteger(BigInteger.valueOf(0)); |
| 387 | + testBigInteger(BigInteger.valueOf(-1)); |
| 388 | + testBigInteger(BigInteger.valueOf(1)); |
| 389 | + testBigInteger(BigInteger.valueOf(Integer.MIN_VALUE)); |
| 390 | + testBigInteger(BigInteger.valueOf(Integer.MAX_VALUE)); |
| 391 | + testBigInteger(BigInteger.valueOf(Long.MIN_VALUE)); |
| 392 | + testBigInteger(BigInteger.valueOf(Long.MAX_VALUE)); |
| 393 | + BigInteger max = BigInteger.valueOf(Long.MAX_VALUE).setBit(63); |
| 394 | + testBigInteger(max); |
| 395 | + Random rand = new Random(); |
| 396 | + for (int i = 0; i < 1000; i++) { |
| 397 | + testBigInteger(max.subtract(BigInteger.valueOf(Math.abs(rand.nextLong())))); |
| 398 | + } |
| 399 | + } |
| 400 | + |
| 401 | + public void testBigInteger(BigInteger v) throws Exception { |
| 402 | + } |
| 403 | + |
| 404 | + public void testBigDecimal() throws Exception { |
| 405 | + // FIXME testBigDecimal(null); |
| 406 | + testBigDecimal(BigDecimal.valueOf(0)); |
| 407 | + testBigDecimal(BigDecimal.valueOf(-1)); |
| 408 | + testBigDecimal(BigDecimal.valueOf(1)); |
| 409 | + testBigDecimal(BigDecimal.valueOf(Integer.MIN_VALUE)); |
| 410 | + testBigDecimal(BigDecimal.valueOf(Integer.MAX_VALUE)); |
| 411 | + testBigDecimal(BigDecimal.valueOf(Long.MIN_VALUE)); |
| 412 | + testBigDecimal(BigDecimal.valueOf(Long.MAX_VALUE)); |
| 413 | + // TODO |
| 414 | + } |
| 415 | + |
| 416 | + public void testBigDecimal(BigDecimal v) throws Exception { |
| 417 | + } |
| 418 | + |
373 | 419 | public void testDate() throws Exception { |
374 | 420 | // FIXME testDate(null); |
375 | 421 | Date d0 = new Date(); |
|
0 commit comments