// @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"); }
@Test public void testAddLong() { String r = StringUtils.addLong("99999", 1); assertEquals(r, "100000"); }