harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r463608 - in /incubator/harmony/enhanced/classlib/trunk/modules: archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/ auth/src/test/java/common/javax/security/auth/ auth/src/test/java/common/org/apache/harmony/auth/tests/ja...
Date Fri, 13 Oct 2006 09:47:18 GMT
Author: hindessm
Date: Fri Oct 13 02:47:12 2006
New Revision: 463608

URL: http://svn.apache.org/viewvc?view=rev&rev=463608
Log:
Converting things like:

  assertTrue(blah == [true|false|null]) to assert[True|False|Null]
  assertEquals(blah, [true,false,null]) to assert[True|False|Null]
  assertEquals([true,false,null], blah) to assert[True|False|Null]

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/UnsupportedCallbackExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AppConfigurationEntryTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/GSSExceptionTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/MessagePropTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java
    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/ButtonTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ComponentTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuShortcutTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.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/event/AdjustmentEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/FocusEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InvocationEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/WindowEventTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/LineBreakMeasurerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextHitInfoTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextLayoutTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/archive/src/test/java/org/apache/harmony/archive/tests/java/util/zip/InflaterTest.java
Fri Oct 13 02:47:12 2006
@@ -76,7 +76,7 @@
 			}
 			assertTrue(
 					"the method finished() returned false when no more data needs to be decompressed",
-					inflate.finished() == true);
+					inflate.finished());
 		} catch (DataFormatException e) {
 			fail("Invalid input to be decompressed");
 		}
@@ -430,16 +430,16 @@
 		}
 		assertTrue(
 				"method needsDictionary returned false when dictionary was used in deflater",
-				inflateDiction.needsDictionary() == true);
+				inflateDiction.needsDictionary());
 
 		// testing without dictionary
 		Inflater inflate = new Inflater();
 		try {
 			inflate.setInput(outPutBuff1);
 			inflate.inflate(outPutInf);
-			assertTrue(
+			assertFalse(
 					"method needsDictionary returned true when dictionary was not used in deflater",
-					inflate.needsDictionary() == false);
+					inflate.needsDictionary());
 		} catch (DataFormatException e) {
 			fail(
 					"Input to inflate is invalid or corrupted - needsDictionary");
@@ -462,20 +462,20 @@
 		Inflater inflate = new Inflater();
 		assertTrue(
 				"needsInput give the wrong boolean value as a result of no input buffer",
-				inflate.needsInput() == true);
+				inflate.needsInput());
 
 		byte byteArray[] = { 2, 3, 4, 't', 'y', 'u', 'e', 'w', 7, 6, 5, 9 };
 		inflate.setInput(byteArray);
-		assertTrue(
+		assertFalse(
 				"methodNeedsInput returned true when the input buffer is full",
-				inflate.needsInput() == false);
+				inflate.needsInput());
 
 		inflate.reset();
 		byte byteArrayEmpty[] = new byte[0];
 		inflate.setInput(byteArrayEmpty);
 		assertTrue(
 				"needsInput give wrong boolean value as a result of an empty input buffer",
-				inflate.needsInput() == true);
+				inflate.needsInput());
 	}
 
 	/**

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/SubjectTest.java
Fri Oct 13 02:47:12 2006
@@ -144,7 +144,7 @@
     public final void testSubject() {
         Subject subject = new Subject();
 
-        assertEquals("Read only state", false, subject.isReadOnly());
+        assertFalse("Read only state", subject.isReadOnly());
         assertEquals("Principals set", 0, subject.getPrincipals().size());
 
         assertEquals("Private credential set", 0, subject
@@ -161,7 +161,7 @@
 
         Subject subject = new Subject(false, h1, h2, h3);
 
-        assertEquals("Read only state", false, subject.isReadOnly());
+        assertFalse("Read only state", subject.isReadOnly());
         assertEquals("Principals set", h1, subject.getPrincipals());
 
         assertEquals("Private credential set", h3, subject
@@ -173,7 +173,7 @@
         // the same but for read only subject        
         subject = new Subject(true, h1, h2, h3);
 
-        assertEquals("Read only state", true, subject.isReadOnly());
+        assertTrue("Read only state", subject.isReadOnly());
 
         assertEquals("Principals set", 1, subject.getPrincipals().size());
 
@@ -823,15 +823,15 @@
         Subject subject = new Subject();
 
         // check initialized value
-        assertEquals("Read only state", false, subject.isReadOnly());
+        assertFalse("Read only state", subject.isReadOnly());
 
         // set the subject as read only
         subject.setReadOnly();
-        assertEquals("Read only state", true, subject.isReadOnly());
+        assertTrue("Read only state", subject.isReadOnly());
 
         // anyway invoke it again to verify subject's state
         subject.setReadOnly();
-        assertEquals("Read only state", true, subject.isReadOnly());
+        assertTrue("Read only state", subject.isReadOnly());
     }
 
     public final void testToString() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/UnsupportedCallbackExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/UnsupportedCallbackExceptionTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/UnsupportedCallbackExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/callback/UnsupportedCallbackExceptionTest.java
Fri Oct 13 02:47:12 2006
@@ -77,8 +77,8 @@
      */
     public final void testUnsupportedCallbackException_03() {
         UnsupportedCallbackException ce = new UnsupportedCallbackException(null, null);
-        assertEquals (null, ce.getMessage());
-        assertEquals(null, ce.getCallback());
+        assertNull(ce.getMessage());
+        assertNull(ce.getCallback());
         try {
             throw ce;
         }catch (Exception e){

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AppConfigurationEntryTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AppConfigurationEntryTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AppConfigurationEntryTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/javax/security/auth/login/AppConfigurationEntryTest.java
Fri Oct 13 02:47:12 2006
@@ -119,7 +119,7 @@
         assertEquals("LoginModule2", entries[1].getLoginModuleName());
         assertEquals(options1, entries[1].getOptions());
         assertEquals("LoginModule3", entries[2].getLoginModuleName());
-        assertEquals(true, entries[2].getOptions().isEmpty());
+        assertTrue(entries[2].getOptions().isEmpty());
 
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/GSSExceptionTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/GSSExceptionTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/GSSExceptionTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/GSSExceptionTest.java
Fri Oct 13 02:47:12 2006
@@ -97,7 +97,7 @@
     public void testGetMinorString() {
         GSSException gssException= new GSSException(GSSException.BAD_NAME);
         String minorString= gssException.getMinorString();
-        assertEquals(null,  minorString );
+        assertNull(minorString);
     }
         
     public void testGetMinorString_0() {
@@ -115,14 +115,14 @@
     public void testGetMinorString_2() {
         GSSException gssException= new GSSException(GSSException.BAD_NAME, 0, "Bad day today");
         String minorString= gssException.getMinorString();
-        assertEquals(null,  minorString );
+        assertNull(minorString);
     }
     
     public void testGetMinorString_3() {
         GSSException gssException= new GSSException(GSSException.BAD_NAME);
         gssException.setMinor(0, "Bad day today");
         String minorString= gssException.getMinorString();
-        assertEquals(null,  minorString );
+        assertNull(minorString);
     }
     
     public void testGetMessage() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/MessagePropTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/MessagePropTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/MessagePropTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/ietf/jgss/MessagePropTest.java
Fri Oct 13 02:47:12 2006
@@ -150,7 +150,7 @@
     public void testGetMinorString() {
         MessageProp mp= new MessageProp(true);
         String s= mp.getMinorString();
-        assertEquals(null, s);
+        assertNull(s);
     }
     
     public void testGetMinorString_0() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/BasicStrokeTest.java
Fri Oct 13 02:47:12 2006
@@ -77,7 +77,7 @@
         assertEquals(BasicStroke.CAP_SQUARE, bs.getEndCap());
         assertEquals(BasicStroke.JOIN_MITER, bs.getLineJoin());
         assertEquals(10.0f, bs.getMiterLimit(), 0.0f);
-        assertEquals(null, bs.getDashArray());
+        assertNull(bs.getDashArray());
         assertEquals(0.0f, bs.getDashPhase(), 0.0f);
     }
 

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=463608&r1=463607&r2=463608
==============================================================================
--- 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
Fri Oct 13 02:47:12 2006
@@ -425,7 +425,7 @@
         assertEquals(layout.getLayoutComponent(BorderLayout.WEST), w);
         assertEquals(layout.getLayoutComponent(BorderLayout.CENTER), c);
         assertEquals(layout.getLayoutComponent(BorderLayout.EAST), e);
-        assertEquals(layout.getLayoutComponent(BorderLayout.PAGE_START), null);
+        assertNull(layout.getLayoutComponent(BorderLayout.PAGE_START));
 
         try {
             layout.getLayoutComponent("Z");
@@ -488,8 +488,8 @@
         assertEquals(BorderLayout.WEST, layout.getConstraints(w));
         assertEquals(BorderLayout.CENTER, layout.getConstraints(c));
         assertEquals(BorderLayout.EAST, layout.getConstraints(e));
-        assertEquals(null, layout.getConstraints(null));
-        assertEquals(null, layout.getConstraints(new Button("Z")));
+        assertNull(layout.getConstraints(null));
+        assertNull(layout.getConstraints(new Button("Z")));
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ButtonTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ButtonTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ButtonTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ButtonTest.java
Fri Oct 13 02:47:12 2006
@@ -63,7 +63,7 @@
 
     public void testGetSetLabel() {
         button.setLabel(null);
-        assertTrue(button.getLabel() == null);
+        assertNull(button.getLabel());
         Dimension nullSize = button.getPreferredSize();
 
         button.setLabel("Button");
@@ -73,7 +73,7 @@
     public void testGetSetActionCommand() {
         assertTrue(button.getActionCommand() == "Button");
         button.setLabel(null);
-        assertTrue(button.getActionCommand() == null);
+        assertNull(button.getActionCommand());
 
         button.setActionCommand("Button Command");
         assertTrue(button.getActionCommand() == "Button Command");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ComponentTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ComponentTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ComponentTest.java
Fri Oct 13 02:47:12 2006
@@ -331,7 +331,7 @@
 
     private void createFrameAndWait() {
         createRobot();
-        assertTrue(frame == null);
+        assertNull(frame);
         frame = new Frame();
         frame.setBounds(0, 0, 100, 100);
         myTestComp.setBounds(0, 0, 30, 50);
@@ -625,7 +625,7 @@
         int eventId = Event.WINDOW_DESTROY;
         createRobot();
         robot.setAutoDelay(250);
-        assertTrue(frame == null);
+        assertNull(frame);
         frame = new MyFrame();
 
         frame.setBounds(0, 0, 100, 100);
@@ -662,7 +662,7 @@
         int eventId = Event.WINDOW_ICONIFY;
         createRobot();
         robot.setAutoDelay(250);
-        assertTrue(frame == null);
+        assertNull(frame);
         frame = new MyFrame();
 
         frame.setBounds(0, 0, 200, 200);
@@ -693,7 +693,7 @@
         createRobot();
         int eventId =  Event.WINDOW_MOVED;
         robot.setAutoDelay(250);
-        assertTrue(frame == null);
+        assertNull(frame);
         frame = new MyFrame();
 
         frame.setBounds(0, 0, 200, 200);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GradientPaintTest.java
Fri Oct 13 02:47:12 2006
@@ -65,9 +65,9 @@
 
     public void testGetCyclic() {
         gp = new GradientPaint(1, 2, Color.green, 3, 4, Color.blue, true);
-        assertEquals(true, gp.isCyclic());
+        assertTrue(gp.isCyclic());
         gp = new GradientPaint(1, 2, Color.green, 3, 4, Color.blue, false);
-        assertEquals(false, gp.isCyclic());
+        assertFalse(gp.isCyclic());
     }
 
     public static void main(String[] args) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuShortcutTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuShortcutTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuShortcutTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuShortcutTest.java
Fri Oct 13 02:47:12 2006
@@ -40,17 +40,17 @@
         MenuShortcut u = new MenuShortcut(KeyEvent.VK_U, false);
 
         assertEquals(KeyEvent.VK_SPACE, s.getKey());
-        assertEquals(false, s.usesShiftModifier());
+        assertFalse(s.usesShiftModifier());
         assertEquals("Ctrl+Space", s.toString());
         assertEquals("key=32", s.paramString());
 
         assertEquals(KeyEvent.VK_T, t.getKey());
-        assertEquals(true, t.usesShiftModifier());
+        assertTrue(t.usesShiftModifier());
         assertEquals("Ctrl+Shift+T", t.toString());
         assertEquals("key=84,usesShiftModifier", t.paramString());
 
         assertEquals(KeyEvent.VK_U, u.getKey());
-        assertEquals(false, u.usesShiftModifier());
+        assertFalse(u.usesShiftModifier());
         assertEquals("Ctrl+U", u.toString());
         assertEquals("key=85", u.paramString());
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/datatransfer/ClipboardTest.java
Fri Oct 13 02:47:12 2006
@@ -38,7 +38,7 @@
     }
 
     public final void testClipboard() {
-        assertEquals(new Clipboard(null).getName(), null);
+        assertNull(new Clipboard(null).getName());
         assertEquals(new Clipboard("Clipboard").getName(), "Clipboard");
     }
 

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=463608&r1=463607&r2=463608
==============================================================================
--- 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
Fri Oct 13 02:47:12 2006
@@ -36,7 +36,7 @@
     public final void testEncodeJavaMIMEType() {
         assertEquals(SystemFlavorMap.encodeJavaMIMEType("z"), 
                 "org.apache.harmony.awt.datatransfer:z");
-        assertEquals(SystemFlavorMap.encodeJavaMIMEType(null), null);
+        assertNull(SystemFlavorMap.encodeJavaMIMEType(null));
     }
 
     public final void testDecodeJavaMIMEType() {
@@ -47,7 +47,7 @@
                 "org.apache.harmony.awt.datatransfer:" +
                 "application/x-java-serialized-object;" +
                 " class=\"java.lang.String\"");
-        assertEquals(SystemFlavorMap.encodeDataFlavor(null), null);
+        assertNull(SystemFlavorMap.encodeDataFlavor(null));
     }
 
     public final void testDecodeDataFlavor() {
@@ -57,8 +57,8 @@
                     "application/x-java-serialized-object;" +
                     " class=\"java.lang.String\""),
                     DataFlavor.stringFlavor);
-            assertEquals(SystemFlavorMap.decodeDataFlavor(null), null);
-            assertEquals(SystemFlavorMap.decodeDataFlavor("z"), null);
+            assertNull(SystemFlavorMap.decodeDataFlavor(null));
+            assertNull(SystemFlavorMap.decodeDataFlavor("z"));
         } catch (ClassNotFoundException e) {
             fail();
         }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/AdjustmentEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/AdjustmentEventTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/AdjustmentEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/AdjustmentEventTest.java
Fri Oct 13 02:47:12 2006
@@ -35,7 +35,7 @@
         assertEquals(event.getAdjustable(), adj);
         assertEquals(event.getValue(), 10);
         assertEquals(event.getAdjustmentType(), AdjustmentEvent.UNIT_DECREMENT);
-        assertEquals(event.getValueIsAdjusting(), false);
+        assertFalse(event.getValueIsAdjusting());
     }
 
     public final void testAdjustmentEventAdjustableintintintboolean() {
@@ -47,7 +47,7 @@
         assertEquals(event.getAdjustable(), adj);
         assertEquals(event.getValue(), 11);
         assertEquals(event.getAdjustmentType(), AdjustmentEvent.BLOCK_DECREMENT);
-        assertEquals(event.getValueIsAdjusting(), true);
+        assertTrue(event.getValueIsAdjusting());
     }
 
     public final void testParamString() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/FocusEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/FocusEventTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/FocusEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/FocusEventTest.java
Fri Oct 13 02:47:12 2006
@@ -33,8 +33,8 @@
         assertEquals(event.getSource(), button);
         assertEquals(event.getID(), FocusEvent.FOCUS_GAINED);
         assertEquals(event.getComponent(), button);
-        assertEquals(event.getOppositeComponent(), null);
-        assertEquals(event.isTemporary(), false);
+        assertNull(event.getOppositeComponent());
+        assertFalse(event.isTemporary());
     }
 
     public final void testFocusEventComponentintboolean() {
@@ -44,8 +44,8 @@
         assertEquals(event.getSource(), button);
         assertEquals(event.getID(), FocusEvent.FOCUS_LOST);
         assertEquals(event.getComponent(), button);
-        assertEquals(event.getOppositeComponent(), null);
-        assertEquals(event.isTemporary(), true);
+        assertNull(event.getOppositeComponent());
+        assertTrue(event.isTemporary());
     }
 
     public final void testFocusEventComponentintbooleanComponent() {
@@ -56,7 +56,7 @@
         assertEquals(event.getID(), FocusEvent.FOCUS_LOST);
         assertEquals(event.getComponent(), button);
         assertEquals(event.getOppositeComponent(), button);
-        assertEquals(event.isTemporary(), true);
+        assertTrue(event.isTemporary());
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InputMethodEventTest.java
Fri Oct 13 02:47:12 2006
@@ -37,11 +37,11 @@
 
         assertEquals(event.getSource(), button);
         assertEquals(event.getID(), InputMethodEvent.CARET_POSITION_CHANGED);
-        assertEquals(event.getText(), null);
+        assertNull(event.getText());
         assertEquals(event.getWhen(), 0);
-        assertEquals(event.getCaret(), null);
+        assertNull(event.getCaret());
         assertEquals(event.getCommittedCharacterCount(), 0);
-        assertEquals(event.getVisiblePosition(), null);
+        assertNull(event.getVisiblePosition());
         assertFalse(event.isConsumed());
 
         boolean wrongID = false;
@@ -65,9 +65,9 @@
         assertEquals(event.getID(), InputMethodEvent.INPUT_METHOD_TEXT_CHANGED);
         assertEquals(event.getText(), text);
         assertEquals(event.getWhen(), 0);
-        assertEquals(event.getCaret(), null);
+        assertNull(event.getCaret());
         assertEquals(event.getCommittedCharacterCount(), 0);
-        assertEquals(event.getVisiblePosition(), null);
+        assertNull(event.getVisiblePosition());
         assertFalse(event.isConsumed());
 
         boolean wrongID = false;
@@ -111,9 +111,9 @@
         assertEquals(event.getID(), InputMethodEvent.INPUT_METHOD_TEXT_CHANGED);
         assertEquals(event.getText(), text);
         assertEquals(event.getWhen(), 1000000000);
-        assertEquals(event.getCaret(), null);
+        assertNull(event.getCaret());
         assertEquals(event.getCommittedCharacterCount(), 0);
-        assertEquals(event.getVisiblePosition(), null);
+        assertNull(event.getVisiblePosition());
         assertFalse(event.isConsumed());
 
         boolean wrongID = false;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InvocationEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InvocationEventTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InvocationEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/InvocationEventTest.java
Fri Oct 13 02:47:12 2006
@@ -39,7 +39,7 @@
 
         assertEquals(event.getSource(), button);
         assertEquals(event.getID(), InvocationEvent.INVOCATION_DEFAULT);
-        assertEquals(event.getException(), null);
+        assertNull(event.getException());
         assertFalse(event.getWhen() == 0l);
     }
 
@@ -53,7 +53,7 @@
 
         assertEquals(event.getSource(), button);
         assertEquals(event.getID(), InvocationEvent.INVOCATION_DEFAULT);
-        assertEquals(event.getException(), null);
+        assertNull(event.getException());
         assertFalse(event.getWhen() == 0l);
     }
 
@@ -68,7 +68,7 @@
 
         assertEquals(event.getSource(), button);
         assertEquals(event.getID(), InvocationEvent.INVOCATION_DEFAULT);
-        assertEquals(event.getException(), null);
+        assertNull(event.getException());
         assertFalse(event.getWhen() == 0l);
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/WindowEventTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/WindowEventTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/WindowEventTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/event/WindowEventTest.java
Fri Oct 13 02:47:12 2006
@@ -34,7 +34,7 @@
         assertEquals(event.getSource(), window);
         assertEquals(event.getID(), WindowEvent.WINDOW_ACTIVATED);
         assertEquals(event.getWindow(), window);
-        assertEquals(event.getOppositeWindow(), null);
+        assertNull(event.getOppositeWindow());
         assertEquals(event.getOldState(), Frame.NORMAL);
         assertEquals(event.getNewState(), Frame.NORMAL);
     }
@@ -60,7 +60,7 @@
         assertEquals(event.getSource(), window);
         assertEquals(event.getID(), WindowEvent.WINDOW_ACTIVATED);
         assertEquals(event.getWindow(), window);
-        assertEquals(event.getOppositeWindow(), null);
+        assertNull(event.getOppositeWindow());
         assertEquals(event.getOldState(), Frame.MAXIMIZED_BOTH);
         assertEquals(event.getNewState(), Frame.MAXIMIZED_HORIZ);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/LineBreakMeasurerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/LineBreakMeasurerTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/LineBreakMeasurerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/LineBreakMeasurerTest.java
Fri Oct 13 02:47:12 2006
@@ -128,7 +128,7 @@
         assertEquals(2, l1.getCharacterCount());
         assertEquals(11, l2.getCharacterCount());
         assertEquals(11, l3.getCharacterCount());
-        assertEquals(null, l4);
+        assertNull(l4);
     }
 
     public void testNextLayout1() throws Exception
@@ -140,7 +140,7 @@
         TextLayout l5 = measurer.nextLayout(500, 25, false);
 
         assertEquals(2, l1.getCharacterCount());
-        assertEquals(null, l2);
+        assertNull(l2);
         assertEquals(18, l3.getCharacterCount());
         assertEquals(1, l4.getCharacterCount());
         assertEquals(3, l5.getCharacterCount());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextHitInfoTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextHitInfoTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextHitInfoTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextHitInfoTest.java
Fri Oct 13 02:47:12 2006
@@ -85,8 +85,8 @@
 
     public void testIsLeadingEdge() throws Exception
     {
-        assertEquals(false, t3.isLeadingEdge());
-        assertEquals(true, l4.isLeadingEdge());
+        assertFalse(t3.isLeadingEdge());
+        assertTrue(l4.isLeadingEdge());
     }
 
     public void testHashCode() throws Exception
@@ -111,13 +111,13 @@
     public void testTrailing() throws Exception
     {
         assertEquals(4, TextHitInfo.trailing(4).getCharIndex());
-        assertEquals(false, TextHitInfo.trailing(-1).isLeadingEdge());
+        assertFalse(TextHitInfo.trailing(-1).isLeadingEdge());
     }
 
     public void testLeading() throws Exception
     {
         assertEquals(4, TextHitInfo.leading(4).getCharIndex());
-        assertEquals(true, TextHitInfo.leading(1).isLeadingEdge());
+        assertTrue(TextHitInfo.leading(1).isLeadingEdge());
     }
 
     public void testBeforeOffset() throws Exception

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextLayoutTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextLayoutTest.java?view=diff&rev=463608&r1=463607&r2=463608
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextLayoutTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/font/TextLayoutTest.java
Fri Oct 13 02:47:12 2006
@@ -295,7 +295,7 @@
     public void testGetCaretShapes() throws Exception
     {
         Shape[] shapes = tl.getCaretShapes(1);
-        assertEquals(shapes[1], null);
+        assertNull(shapes[1]);
 
         PathIterator it1 = shapes[0].getPathIterator(null);
         PathIterator it2 = tl.getCaretShape(TextHitInfo.trailing(0)).getPathIterator(null);
@@ -418,61 +418,61 @@
     public void testGetNextLeftHit() throws Exception
     {
         TextHitInfo i1 = tl.getNextLeftHit(0);
-        assertEquals(i1, null);
+        assertNull(i1);
 
         TextHitInfo i2 = tl.getNextLeftHit(4);
         assertEquals(3, i2.getCharIndex());
-        assertEquals(true, i2.isLeadingEdge());
+        assertTrue(i2.isLeadingEdge());
     }
 
     public void testGetNextLeftHit1() throws Exception
     {
         TextHitInfo i1 = tl.getNextLeftHit(TextHitInfo.leading(0));
-        assertEquals(i1, null);
+        assertNull(i1);
 
         TextHitInfo i2 = tl.getNextLeftHit(TextHitInfo.trailing(3));
         assertEquals(3, i2.getCharIndex());
-        assertEquals(true, i2.isLeadingEdge());
+        assertTrue(i2.isLeadingEdge());
     }
 
     public void testGetNextLeftHit2() throws Exception
     {
         TextHitInfo i1 = tl.getNextLeftHit(0, TextLayout.DEFAULT_CARET_POLICY);
-        assertEquals(i1, null);
+        assertNull(i1);
 
         TextHitInfo i2 = tl.getNextLeftHit(4, TextLayout.DEFAULT_CARET_POLICY);
         assertEquals(3, i2.getCharIndex());
-        assertEquals(true, i2.isLeadingEdge());
+        assertTrue(i2.isLeadingEdge());
     }
 
     public void testGetNextRightHit() throws Exception
     {
         TextHitInfo i1 = tl.getNextRightHit(tl.getCharacterCount());
-        assertEquals(i1, null);
+        assertNull(i1);
 
         TextHitInfo i2 = tl.getNextRightHit(4);
         assertEquals(5, i2.getCharIndex());
-        assertEquals(true, i2.isLeadingEdge());
+        assertTrue(i2.isLeadingEdge());
     }
 
     public void testGetNextRightHit1() throws Exception
     {
         TextHitInfo i1 = tl.getNextRightHit(TextHitInfo.trailing(tl.getCharacterCount()-1));
-        assertEquals(i1, null);
+        assertNull(i1);
 
         TextHitInfo i2 = tl.getNextRightHit(TextHitInfo.leading(4));
         assertEquals(5, i2.getCharIndex());
-        assertEquals(true, i2.isLeadingEdge());
+        assertTrue(i2.isLeadingEdge());
     }
 
     public void testGetNextRightHit2() throws Exception
     {
         TextHitInfo i1 = tl.getNextRightHit(tl.getCharacterCount(), TextLayout.DEFAULT_CARET_POLICY);
-        assertEquals(i1, null);
+        assertNull(i1);
 
         TextHitInfo i2 = tl.getNextRightHit(4, TextLayout.DEFAULT_CARET_POLICY);
         assertEquals(5, i2.getCharIndex());
-        assertEquals(true, i2.isLeadingEdge());
+        assertTrue(i2.isLeadingEdge());
     }
 
     public void testGetOutline() throws Exception
@@ -632,12 +632,12 @@
 
     public void testIsLeftToRight() throws Exception
     {
-        assertEquals(true, tl.isLeftToRight());
+        assertTrue(tl.isLeftToRight());
     }
 
     public void testIsVertical() throws Exception
     {
-        assertEquals(false, tl.isVertical());
+        assertFalse(tl.isVertical());
     }
 
     public void testGetStrongCaret() throws Exception



Mime
View raw message