harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r810963 - /harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/ParseExceptionTest.java
Date Thu, 03 Sep 2009 14:18:23 GMT
Author: tellison
Date: Thu Sep  3 14:18:23 2009
New Revision: 810963

URL: http://svn.apache.org/viewvc?rev=810963&view=rev
Log:
Test case tidy-up, no functional changes.

Modified:
    harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/ParseExceptionTest.java

Modified: harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/ParseExceptionTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/ParseExceptionTest.java?rev=810963&r1=810962&r2=810963&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/ParseExceptionTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/text/src/test/java/org/apache/harmony/text/tests/java/text/ParseExceptionTest.java
Thu Sep  3 14:18:23 2009
@@ -19,48 +19,31 @@
 import java.text.DateFormat;
 import java.text.ParseException;
 
+@SuppressWarnings("nls")
 public class ParseExceptionTest extends junit.framework.TestCase {
 
-	/**
-	 * @tests java.text.ParseException#ParseException(java.lang.String, int)
-	 */
-	public void test_ConstructorLjava_lang_StringI() {
-		// Test for method java.text.ParseException(java.lang.String, int)
-		// SM
-		try {
-			DateFormat df = DateFormat.getInstance();
-			df.parse("HelloWorld");
-		} catch (ParseException e) {
-			return;
-		}
-		fail("ParseException not created/thrown.");
-	}
+    /**
+     * @tests java.text.ParseException#ParseException(java.lang.String, int)
+     */
+    public void test_ConstructorLjava_lang_StringI() {
+        try {
+            DateFormat df = DateFormat.getInstance();
+            df.parse("HelloWorld");
+            fail("ParseException not created/thrown.");
+        } catch (ParseException e) {
+            // expected
+        }
+    }
 
-	/**
-	 * @tests java.text.ParseException#getErrorOffset()
-	 */
-	public void test_getErrorOffset() {
-		// Test for method int java.text.ParseException.getErrorOffset()
-		// SM
-		try {
-			DateFormat df = DateFormat.getInstance();
-			df.parse("1999HelloWorld");
-		} catch (ParseException e) {
-			assertEquals("getErrorOffsetFailed.", 4, e.getErrorOffset());
-		}
-	}
-
-	/**
-	 * Sets up the fixture, for example, open a network connection. This method
-	 * is called before a test is executed.
-	 */
-	protected void setUp() {
-	}
-
-	/**
-	 * Tears down the fixture, for example, close a network connection. This
-	 * method is called after a test is executed.
-	 */
-	protected void tearDown() {
-	}
+    /**
+     * @tests java.text.ParseException#getErrorOffset()
+     */
+    public void test_getErrorOffset() {
+        try {
+            DateFormat df = DateFormat.getInstance();
+            df.parse("1999HelloWorld");
+        } catch (ParseException e) {
+            assertEquals("getErrorOffsetFailed.", 4, e.getErrorOffset());
+        }
+    }
 }



Mime
View raw message