harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r462491 - in /incubator/harmony/enhanced/classlib/trunk/modules: awt/src/test/api/java/common/java/awt/ awt/src/test/api/java/common/java/awt/datatransfer/ awt/src/test/api/java/common/java/awt/image/ luni/src/test/java/tests/api/java/net/
Date Tue, 10 Oct 2006 18:39:19 GMT
Author: hindessm
Date: Tue Oct 10 11:39:18 2006
New Revision: 462491

URL: http://svn.apache.org/viewvc?view=rev&rev=462491
Log:
Cleaning up asserts to fail.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramPacketTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramSocketTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/MulticastSocketTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ServerSocketTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java?view=diff&rev=462491&r1=462490&r2=462491
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BorderLayoutTest.java
Tue Oct 10 11:39:18 2006
@@ -429,7 +429,7 @@
 
         try {
             layout.getLayoutComponent("Z");
-            assertTrue(false);
+            fail();
         } catch (IllegalArgumentException e) {
             assertTrue(true);
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java?view=diff&rev=462491&r1=462490&r2=462491
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/DataFlavorTest.java
Tue Oct 10 11:39:18 2006
@@ -105,7 +105,7 @@
             DataFlavor.tryToLoadClass("java.lang.Thread", null);
             assertTrue(true);
         } catch (ClassNotFoundException e) {
-            assertTrue(false);
+            fail();
         }
     }
 
@@ -150,7 +150,7 @@
 
         try {
             new DataFlavor("x/y class=java.lang.String", "z");
-            assertTrue(false);
+            fail();
         } catch (IllegalArgumentException e) {
             assertTrue(true);
         }
@@ -170,19 +170,19 @@
             assertEquals(new DataFlavor("x/y; class=java.lang.String").getRepresentationClass(),
                     String.class);
         } catch (ClassNotFoundException e1) {
-            assertTrue(false);
+            fail();
         }
 
         try {
             new DataFlavor("x/y class=java.lang.String", "z");
-            assertTrue(false);
+            fail();
         } catch (IllegalArgumentException e) {
             assertTrue(true);
         }
 
         try {
             new DataFlavor("x/y; class=java.lang.Strng");
-            assertTrue(false);
+            fail();
         } catch (ClassNotFoundException e) {
             assertTrue(true);
         }
@@ -206,12 +206,12 @@
                     Thread.currentThread().getContextClassLoader()).getRepresentationClass(),
                     String.class);
         } catch (ClassNotFoundException e1) {
-            assertTrue(false);
+            fail();
         }
 
         try {
             new DataFlavor("x/y class=java.lang.String", "z");
-            assertTrue(false);
+            fail();
         } catch (IllegalArgumentException e) {
             assertTrue(true);
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java?view=diff&rev=462491&r1=462490&r2=462491
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/SystemFlavorMapTest.java
Tue Oct 10 11:39:18 2006
@@ -60,7 +60,7 @@
             assertEquals(SystemFlavorMap.decodeDataFlavor(null), null);
             assertEquals(SystemFlavorMap.decodeDataFlavor("z"), null);
         } catch (ClassNotFoundException e) {
-            assertTrue(false);
+            fail();
         }
 
         try {
@@ -68,7 +68,7 @@
                     "org.apache.harmony.awt.datatransfer" +
                     ":application/x-java-serialized-object; class=Ing"),
                     DataFlavor.stringFlavor);
-            assertTrue(false);
+            fail();
         } catch (ClassNotFoundException e) {
             assertTrue(true);
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java?view=diff&rev=462491&r1=462490&r2=462491
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/MultiPixelPackedSampleModelTest.java
Tue Oct 10 11:39:18 2006
@@ -356,13 +356,13 @@
         try {
             sm = mppsmb1.createSubsetSampleModel(null);
         } catch (RasterFormatException e) {
-            assertTrue(false);
+            fail();
         }
 
         try {
             sm = mppsmb1.createSubsetSampleModel(bands);
         } catch (RasterFormatException e) {
-            assertTrue(false);
+            fail();
         }
 
         try {
@@ -2743,4 +2743,4 @@
             int bank) {
         return createPixelsFromIntData(x, y, width, height);
     }
-}
\ No newline at end of file
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramPacketTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramPacketTest.java?view=diff&rev=462491&r1=462490&r2=462491
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramPacketTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramPacketTest.java
Tue Oct 10 11:39:18 2006
@@ -311,9 +311,7 @@
 			try {
 				DatagramPacket thePacket = new DatagramPacket(buf, 1,
 						new mySocketAddress());
-				assertFalse(
-						"No exception when constructing using unsupported SocketAddress subclass",
-						true);
+				fail("No exception when constructing using unsupported SocketAddress subclass");
 			} catch (IllegalArgumentException ex) {
 			}
 
@@ -322,9 +320,7 @@
 
 			try {
 				DatagramPacket thePacket = new DatagramPacket(buf, 1, null);
-				assertFalse(
-						"No exception when constructing address using null",
-						true);
+				fail("No exception when constructing address using null");
 			} catch (IllegalArgumentException ex) {
 			}
 
@@ -359,9 +355,7 @@
 			try {
 				DatagramPacket thePacket = new DatagramPacket(buf, 1, 1,
 						new mySocketAddress());
-				assertFalse(
-						"No exception when constructing using unsupported SocketAddress subclass",
-						true);
+				fail("No exception when constructing using unsupported SocketAddress subclass");
 			} catch (IllegalArgumentException ex) {
 			}
 
@@ -370,9 +364,7 @@
 
 			try {
 				DatagramPacket thePacket = new DatagramPacket(buf, 1, 1, null);
-				assertFalse(
-						"No exception when constructing address using null",
-						true);
+				fail("No exception when constructing address using null");
 			} catch (IllegalArgumentException ex) {
 			}
 
@@ -429,9 +421,7 @@
 			DatagramPacket thePacket = new DatagramPacket(buf, 1);
 			try {
 				thePacket.setSocketAddress(new mySocketAddress());
-				assertFalse(
-						"No exception when setting address using unsupported SocketAddress subclass",
-						true);
+				fail("No exception when setting address using unsupported SocketAddress subclass");
 			} catch (IllegalArgumentException ex) {
 			}
 
@@ -440,8 +430,7 @@
 			thePacket = new DatagramPacket(buf, 1);
 			try {
 				thePacket.setSocketAddress(null);
-				assertFalse("No exception when setting address using null",
-						true);
+				fail("No exception when setting address using null");
 			} catch (IllegalArgumentException ex) {
 			}
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramSocketTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramSocketTest.java?view=diff&rev=462491&r1=462490&r2=462491
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramSocketTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/DatagramSocketTest.java
Tue Oct 10 11:39:18 2006
@@ -1162,9 +1162,7 @@
 								.getNextPort());
 				theSocket.bind(theAddress);
 				theSocket2.bind(theAddress);
-				assertFalse(
-						"No exception binding to address that is not available",
-						true);
+				fail("No exception binding to address that is not available");
 			} catch (SocketException ex) {
 			}
 			theSocket.close();
@@ -1174,9 +1172,7 @@
 			theSocket = new DatagramSocket(null);
 			try {
 				theSocket.bind(new mySocketAddress());
-				assertFalse(
-						"No exception when binding using unsupported SocketAddress subclass",
-						true);
+				fail("No exception when binding using unsupported SocketAddress subclass");
 			} catch (IllegalArgumentException ex) {
 			}
 			theSocket.close();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/MulticastSocketTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/MulticastSocketTest.java?view=diff&rev=462491&r1=462490&r2=462491
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/MulticastSocketTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/MulticastSocketTest.java
Tue Oct 10 11:39:18 2006
@@ -384,9 +384,7 @@
 				groupSockAddr = new InetSocketAddress(InetAddress
 						.getByName("255.255.255.255"), groupPort);
 				mss.joinGroup(groupSockAddr, null);
-				assertFalse(
-						"Did not get exception when group is not a multicast address",
-						true);
+				fail("Did not get exception when group is not a multicast address");
 			} catch (IOException e) {
 			}
 
@@ -398,9 +396,7 @@
 				group = InetAddress.getByName("224.0.0.3");
 				groupSockAddr = new InetSocketAddress(group, groupPort);
 				mss.joinGroup(groupSockAddr, null);
-				assertFalse(
-						"Did not get exception when joining group is not allowed",
-						true);
+				fail( "Did not get exception when joining group is not allowed");
 			} catch (SecurityException e) {
 			}
 			System.setSecurityManager(null);
@@ -645,9 +641,7 @@
 				group = InetAddress.getByName("255.255.255.255");
 				groupSockAddr = new InetSocketAddress(group, groupPort);
 				mss.leaveGroup(groupSockAddr, null);
-				assertFalse(
-						"Did not get exception when group is not a multicast address",
-						true);
+				fail("Did not get exception when group is not a multicast address");
 			} catch (IOException e) {
 			}
 
@@ -659,9 +653,7 @@
 				group = InetAddress.getByName("224.0.0.3");
 				groupSockAddr = new InetSocketAddress(group, groupPort);
 				mss.leaveGroup(groupSockAddr, null);
-				assertFalse(
-						"Did not get exception when joining group is not allowed",
-						true);
+				fail("Did not get exception when joining group is not allowed");
 			} catch (SecurityException e) {
 			}
 			System.setSecurityManager(null);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ServerSocketTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ServerSocketTest.java?view=diff&rev=462491&r1=462490&r2=462491
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ServerSocketTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/ServerSocketTest.java
Tue Oct 10 11:39:18 2006
@@ -436,9 +436,7 @@
 						Support_PortManager.getNextPort());
 				theSocket.bind(theAddress);
 				theSocket2.bind(theAddress);
-				assertFalse(
-						"No exception binding to address that is not available",
-						true);
+				fail("No exception binding to address that is not available");
 			} catch (IOException ex) {
 			}
 			theSocket.close();
@@ -463,9 +461,7 @@
 			theSocket = new ServerSocket();
 			try {
 				theSocket.bind(new mySocketAddress());
-				assertFalse(
-						"No exception when binding using unsupported SocketAddress subclass",
-						true);
+				fail("No exception when binding using unsupported SocketAddress subclass");
 			} catch (IllegalArgumentException ex) {
 			}
 			theSocket.close();
@@ -527,9 +523,7 @@
 						Support_PortManager.getNextPort());
 				theSocket.bind(theAddress, 5);
 				theSocket2.bind(theAddress, 5);
-				assertFalse(
-						"No exception binding to address that is not available",
-						true);
+				fail("No exception binding to address that is not available");
 			} catch (IOException ex) {
 			}
 			theSocket.close();

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java?view=diff&rev=462491&r1=462490&r2=462491
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/SocketTest.java
Tue Oct 10 11:39:18 2006
@@ -1084,8 +1084,8 @@
 			theSocket.bind(new InetSocketAddress(InetAddress
 					.getByAddress(Support_Configuration.nonLocalAddressBytes),
 					Support_PortManager.getNextPort()));
-			assertFalse("No exception when binding to bad address:"
-					+ theSocket.getLocalSocketAddress().toString(), true);
+			fail("No exception when binding to bad address:"
+		  	     + theSocket.getLocalSocketAddress().toString());
 		} catch (IOException ex) {
 		}
 		theSocket.close();
@@ -1147,9 +1147,7 @@
 					Support_PortManager.getNextPort());
 			theSocket.bind(theAddress);
 			theSocket2.bind(theAddress);
-			assertFalse(
-					"No exception binding to address that is not available",
-					true);
+			fail("No exception binding to address that is not available");
 		} catch (IOException ex) {
 		}
 		theSocket.close();



Mime
View raw message