harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r396484 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java
Date Mon, 24 Apr 2006 09:13:10 GMT
Author: tellison
Date: Mon Apr 24 02:13:06 2006
New Revision: 396484

URL: http://svn.apache.org/viewcvs?rev=396484&view=rev
Log:
Apply patch HARMONY-399 (test/java/tests/api/java/net/Inet6AddressTest.java doesn't follow
JUnit exception handling convention)

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java?rev=396484&r1=396483&r2=396484&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/Inet6AddressTest.java
Mon Apr 24 02:13:06 2006
@@ -831,7 +831,7 @@
 	/**
 	 * @tests java.net.Inet6Address#getByAddress(String, byte[], int)
 	 */
-	public void test_getByAddressLString$BI(){
+	public void test_getByAddressLString$BI() throws UnknownHostException{
 		try {
 			Inet6Address.getByAddress("123", null, 0);
 			fail("should throw UnknownHostException");
@@ -850,16 +850,10 @@
 				0x11, 0x25, (byte) 0xFF, (byte) 0xFE, (byte) 0xF8, (byte) 0x7C,
 				(byte) 0xB2 };
 		
-		try {
-			Inet6Address.getByAddress("123", addr2, 3);
-		} catch (UnknownHostException e) {
-			fail("no exception should be thrown");
-		}
-		try {
-			Inet6Address.getByAddress("123", addr2, 3);
-		} catch (UnknownHostException e) {
-			fail("no exception should be thrown");
-		}
+		// should not throw any exception
+		Inet6Address.getByAddress("123", addr2, 3);
+		Inet6Address.getByAddress("123", addr2, 0);
+		Inet6Address.getByAddress("123", addr2, -1);
 	}
 
 	protected void setUp() {



Mime
View raw message