コード例 #1
0
 //	@Test
 // for performance test
 public void testAddLongPerformance() {
   String big = Long.MAX_VALUE + "";
   long t1 = System.currentTimeMillis();
   for (long i = 0; i < Long.MAX_VALUE; i++) {
     big = StringUtils.addLong(big, i);
   }
   long t2 = System.currentTimeMillis();
   System.out.println("spend" + (t2 - t1) + "ms");
 }
コード例 #2
0
 @Test
 public void testAddLong() {
   String r = StringUtils.addLong("99999", 1);
   assertEquals(r, "100000");
 }