commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r436673 - /jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java
Date Fri, 25 Aug 2006 06:27:03 GMT
Author: bayard
Date: Thu Aug 24 23:27:02 2006
New Revision: 436673

URL: http://svn.apache.org/viewvc?rev=436673&view=rev
Log:
Added test for StopWatch.toSplitString

Modified:
    jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java

Modified: jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java?rev=436673&r1=436672&r2=436673&view=diff
==============================================================================
--- jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java
(original)
+++ jakarta/commons/proper/lang/trunk/src/test/org/apache/commons/lang/time/StopWatchTest.java
Thu Aug 24 23:27:02 2006
@@ -74,12 +74,15 @@
             try {Thread.sleep(550);} catch (InterruptedException ex) {}
         watch.split();
         long splitTime = watch.getSplitTime();
+        String splitStr = watch.toSplitString();
             try {Thread.sleep(550);} catch (InterruptedException ex) {}
         watch.unsplit();
             try {Thread.sleep(550);} catch (InterruptedException ex) {}
         watch.stop();
         long totalTime = watch.getTime();
-        
+
+        assertEquals("Formatted split string not the correct length", 
+                     splitStr.length(), 11);
         assertTrue(splitTime >= 500);
         assertTrue(splitTime < 700);
         assertTrue(totalTime >= 1500);



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message