harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r463636 [1/2] - /incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/
Date Fri, 13 Oct 2006 10:41:23 GMT
Author: hindessm
Date: Fri Oct 13 03:41:21 2006
New Revision: 463636

URL: http://svn.apache.org/viewvc?view=rev&rev=463636
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/swing/src/test/api/java/common/javax/swing/JButtonTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxMenuItemTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponentTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponent_MultithreadedTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDesktopPaneTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDialogTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JFrameTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame$JDesktopIconTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrameTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame_MultithreadedTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLayeredPaneTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuItemTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JOptionPaneTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPanelTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPopupMenuTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRadioButtonMenuItemTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRadioButtonTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRootPaneTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTabbedPaneTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToggleButtonTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBarTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolTipTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTreeTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JWindowTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JButtonTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JButtonTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JButtonTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JButtonTest.java Fri Oct 13 03:41:21 2006
@@ -95,8 +95,8 @@
         assertEquals("text ", text, button.getText());
         assertEquals("action", action, button.getAction());
         assertEquals("command ", command, button.getActionCommand());
-        assertEquals("selected ", false, button.isSelected());
-        assertEquals("enabled ", true, button.isEnabled());
+        assertFalse("selected ", button.isSelected());
+        assertTrue("enabled ", button.isEnabled());
 
         action.setEnabled(false);
         button = new JButton(action);
@@ -105,17 +105,17 @@
         assertEquals("text ", text, button.getText());
         assertEquals("action", action, button.getAction());
         assertEquals("command ", command, button.getActionCommand());
-        assertEquals("selected ", false, button.isSelected());
-        assertEquals("enabled ", false, button.isEnabled());
+        assertFalse("selected ", button.isSelected());
+        assertFalse("enabled ", button.isEnabled());
 
         button = new JButton((Action)null);
 
-        assertEquals("icon ", null, button.getIcon());
-        assertEquals("text ", null, button.getText());
-        assertEquals("action", null, button.getAction());
-        assertEquals("command ", null, button.getActionCommand());
-        assertEquals("selected ", false, button.isSelected());
-        assertEquals("enabled ", true, button.isEnabled());
+        assertNull("icon ", button.getIcon());
+        assertNull("text ", button.getText());
+        assertNull("action", button.getAction());
+        assertNull("command ", button.getActionCommand());
+        assertFalse("selected ", button.isSelected());
+        assertTrue("enabled ", button.isEnabled());
 
         assertTrue("button model is of the proper type", button.getModel() instanceof DefaultButtonModel);
     }
@@ -126,7 +126,7 @@
     public void testJButtonString() {
         String text = "texttext";
         jbutton = new JButton(text);
-        assertEquals("icon ", null, jbutton.getIcon());
+        assertNull("icon ", jbutton.getIcon());
         assertEquals("text ", text, jbutton.getText());
     }
 
@@ -135,7 +135,7 @@
      */
     public void testJButton() {
         assertNotNull("default buttonModel ", button.getModel());
-        assertEquals("icon ", null, jbutton.getIcon());
+        assertNull("icon ", jbutton.getIcon());
         assertEquals("text ", "", jbutton.getText());
     }
 
@@ -164,7 +164,7 @@
 
         jbutton.removeNotify();
         assertFalse("is not defaultButton now ", jbutton.isDefaultButton());
-        assertTrue("rootPane now 've no default jbutton ", pane.getDefaultButton() == null);
+        assertNull("rootPane now 've no default jbutton ", pane.getDefaultButton());
     }
 
     public void testGetUIClassID() {
@@ -208,17 +208,17 @@
 
         jbutton.configurePropertiesFromAction(null);
 
-        assertEquals("icon ", null, jbutton.getIcon());
-        assertEquals("text ", null, jbutton.getText());
-        assertEquals("action", null, jbutton.getAction());
-        assertEquals("command ", null, jbutton.getActionCommand());
-        assertEquals("selected ", false, jbutton.isSelected());
-        assertEquals("enabled ", true, jbutton.isEnabled());
+        assertNull("icon ", jbutton.getIcon());
+        assertNull("text ", jbutton.getText());
+        assertNull("action", jbutton.getAction());
+        assertNull("command ", jbutton.getActionCommand());
+        assertFalse("selected ", jbutton.isSelected());
+        assertTrue("enabled ", jbutton.isEnabled());
     }
 
     public void testSetDefaultCapable() {
         jbutton.setDefaultCapable(false);
-        assertEquals("DefaultCapable", false, jbutton.isDefaultCapable());
+        assertFalse("DefaultCapable", jbutton.isDefaultCapable());
 
         PropertyChangeController listener = new PropertyChangeController();
         jbutton.addPropertyChangeListener(listener);
@@ -232,7 +232,7 @@
     }
 
     public void testIsDefaultCapable() {
-        assertEquals("initial DefaultCapable value", true, jbutton.isDefaultCapable());
+        assertTrue("initial DefaultCapable value", jbutton.isDefaultCapable());
     }
 
     public void testIsDefaultButton() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxMenuItemTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxMenuItemTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxMenuItemTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxMenuItemTest.java Fri Oct 13 03:41:21 2006
@@ -43,7 +43,7 @@
     public void testJCheckBoxMenuItem() {
         assertFalse(menuItem.isSelected());
         assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
         assertEquals("text ", "", button.getText());
         assertFalse("default FocusPainted", menuItem.isFocusPainted());
 
@@ -78,7 +78,7 @@
         menuItem = new JCheckBoxMenuItem(text);
         assertFalse(menuItem.isSelected());
         assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
-        assertEquals("icon ", null, menuItem.getIcon());
+        assertNull("icon ", menuItem.getIcon());
         assertEquals("text ", text, menuItem.getText());
 
         assertEquals(SwingConstants.LEADING, button.getHorizontalAlignment());
@@ -135,8 +135,8 @@
         assertEquals("text ", text, menuItem.getText());
         assertEquals("action", action, menuItem.getAction());
         assertEquals("command ", command, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", true, menuItem.isEnabled());
+        assertFalse("selected ", menuItem.isSelected());
+        assertTrue("enabled ", menuItem.isEnabled());
         assertEquals("accelerator ", accelerator, menuItem.getAccelerator());
 
         action.setEnabled(false);
@@ -146,18 +146,18 @@
         assertEquals("text ", text, menuItem.getText());
         assertEquals("action", action, menuItem.getAction());
         assertEquals("command ", command, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", false, menuItem.isEnabled());
+        assertFalse("selected ", menuItem.isSelected());
+        assertFalse("enabled ", menuItem.isEnabled());
         assertFalse("default FocusPainted", menuItem.isFocusPainted());
 
         menuItem = new JCheckBoxMenuItem((Action)null);
 
-        assertEquals("icon ", null, menuItem.getIcon());
-        assertEquals("text ", null, menuItem.getText());
-        assertEquals("action", null, menuItem.getAction());
-        assertEquals("command ", null, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", true, menuItem.isEnabled());
+        assertNull("icon ", menuItem.getIcon());
+        assertNull("text ", menuItem.getText());
+        assertNull("action", menuItem.getAction());
+        assertNull("command ", menuItem.getActionCommand());
+        assertFalse("selected ", menuItem.isSelected());
+        assertTrue("enabled ", menuItem.isEnabled());
 
         assertTrue("default buttonModel ", button.getModel() instanceof ToggleButtonModel);
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JCheckBoxTest.java Fri Oct 13 03:41:21 2006
@@ -110,16 +110,16 @@
         button.setAction(action1);
 
         assertEquals("action ", action1, button.getAction());
-        assertEquals("enabled ", true, button.isEnabled());
-        assertEquals("enabled ", true, action1.isEnabled());
+        assertTrue("enabled ", button.isEnabled());
+        assertTrue("enabled ", action1.isEnabled());
         action1.setEnabled(false);
         button.isEnabled();
-        assertEquals("enabled ", false, button.isEnabled());
-        assertEquals("enabled ", false, action1.isEnabled());
+        assertFalse("enabled ", button.isEnabled());
+        assertFalse("enabled ", action1.isEnabled());
 
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
         action1.putValue(Action.SMALL_ICON, icon2);
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
         button.setIcon(icon2);
         action1.putValue(Action.SMALL_ICON, null);
         assertEquals("icon ", icon2, button.getIcon());
@@ -140,7 +140,7 @@
 
         button.setAction(action2);
         action1.putValue(Action.SHORT_DESCRIPTION, text4);
-        assertEquals("ToolTipText ", null, button.getToolTipText());
+        assertNull("ToolTipText ", button.getToolTipText());
         action2.putValue(Action.SHORT_DESCRIPTION, text4);
         assertEquals("ToolTipText ", text4, button.getToolTipText());
     }
@@ -179,21 +179,21 @@
         action.setEnabled(false);
         button = new JCheckBox(action);
 
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
         assertEquals("text ", text, button.getText());
         assertEquals("action", action, button.getAction());
         assertEquals("command ", command, button.getActionCommand());
-        assertEquals("selected ", false, button.isSelected());
-        assertEquals("enabled ", false, button.isEnabled());
+        assertFalse("selected ", button.isSelected());
+        assertFalse("enabled ", button.isEnabled());
 
         button = new JCheckBox((Action)null);
 
-        assertEquals("icon ", null, button.getIcon());
-        assertEquals("text ", null, button.getText());
-        assertEquals("action", null, button.getAction());
-        assertEquals("command ", null, button.getActionCommand());
-        assertEquals("selected ", false, button.isSelected());
-        assertEquals("enabled ", true, button.isEnabled());
+        assertNull("icon ", button.getIcon());
+        assertNull("text ", button.getText());
+        assertNull("action", button.getAction());
+        assertNull("command ", button.getActionCommand());
+        assertFalse("selected ", button.isSelected());
+        assertTrue("enabled ", button.isEnabled());
     }
 
     /*
@@ -329,7 +329,7 @@
     }
 
     public void testIsBorderPaintedFlat() {
-        assertEquals("paintedFlat", false, ((JCheckBox)button).isBorderPaintedFlat());
+        assertFalse("paintedFlat", ((JCheckBox)button).isBorderPaintedFlat());
     }
 
     public void testSetBorderPaintedFlat() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponentTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponentTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponentTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponentTest.java Fri Oct 13 03:41:21 2006
@@ -562,28 +562,28 @@
 
         action1.eventHeard = null;
         component3.processKeyEvent(event22);
-        assertTrue("event2: wrong actionPerformed called for parent", action1.eventHeard == null);
+        assertNull("event2: wrong actionPerformed called for parent", action1.eventHeard);
         assertTrue("event2: right actionPerformed called for parent", action2.eventHeard != null);
         assertTrue(event22.isConsumed());
 
         action2.eventHeard = null;
         component3.processKeyEvent(event33);
-        assertTrue("event3: actionPerformed called for parent", action1.eventHeard == null);
-        assertTrue("event3: actionPerformed called for brother", action2.eventHeard == null);
+        assertNull("event3: actionPerformed called for parent", action1.eventHeard);
+        assertNull("event3: actionPerformed called for brother", action2.eventHeard);
         assertTrue("event3: actionPerformed called for component", action3.eventHeard != null);
         assertTrue(event33.isConsumed());
 
         action3.eventHeard = null;
         component3.processKeyEvent(event42);
-        assertTrue("event4: actionPerformed called for parent", action1.eventHeard == null);
-        assertTrue("event4: actionPerformed called for brother", action2.eventHeard == null);
-        assertTrue("event4: actionPerformed called for component", action3.eventHeard == null);
-        assertTrue("event4: actionPerformed called for brother", action41.eventHeard == null);
+        assertNull("event4: actionPerformed called for parent", action1.eventHeard);
+        assertNull("event4: actionPerformed called for brother", action2.eventHeard);
+        assertNull("event4: actionPerformed called for component", action3.eventHeard);
+        assertNull("event4: actionPerformed called for brother", action41.eventHeard);
         assertTrue("event4: actionPerformed called for brother", action43.eventHeard != null);
         assertTrue(event42.isConsumed());
 
         component3.processKeyEvent(event51);
-        assertTrue("event5: actionPerformed called for parent", action51.eventHeard == null);
+        assertNull("event5: actionPerformed called for parent", action51.eventHeard);
         assertTrue("event5: actionPerformed called for parent", action53.eventHeard != null);
         assertTrue(event51.isConsumed());
 
@@ -598,7 +598,7 @@
         action52.eventHeard = null;
         action54.eventHeard = null;
         panel2.processKeyEvent(event6);
-        assertTrue("event6: actionPerformed called for parent", action52.eventHeard == null);
+        assertNull("event6: actionPerformed called for parent", action52.eventHeard);
         assertTrue("event6: actionPerformed called for parent", action54.eventHeard != null);
         assertTrue(event6.isConsumed());
 
@@ -607,7 +607,7 @@
         event6 = new KeyEvent(editor, KeyEvent.KEY_PRESSED, 0, 0, KeyEvent.VK_ENTER, '\n');
         panel1.processKeyEvent(event6);
         assertTrue("event6: actionPerformed called for parent", action52.eventHeard != null);
-        assertTrue("event6: actionPerformed called for parent", action54.eventHeard == null);
+        assertNull("event6: actionPerformed called for parent", action54.eventHeard);
         assertTrue(event6.isConsumed());
     }
 
@@ -768,7 +768,7 @@
         PropertyChangeController changeListener = new PropertyChangeController();
 
         panel.addPropertyChangeListener(changeListener);
-        assertTrue(panel.getBorder() == null);
+        assertNull(panel.getBorder());
 
         Border newBorder1 = new EmptyBorder(10, 10, 10, 10);
         Border newBorder2 = new EmptyBorder(20, 20, 20, 20);
@@ -809,7 +809,7 @@
     }
 
     public void testGetBorder() {
-        assertTrue(panel.getBorder() == null);
+        assertNull(panel.getBorder());
     }
 
     public void testGetAlignmentX() {
@@ -1115,7 +1115,7 @@
         Object value2 = "property2";
         String key1 = "value1";
 
-        assertTrue(panel.getClientProperty(key1) == null);
+        assertNull(panel.getClientProperty(key1));
         assertFalse("event's not fired", changeListener.isChanged());
 
         panel.putClientProperty(key1, value1);
@@ -1130,7 +1130,7 @@
 
         panel.putClientProperty(key1, null);
         changeListener.checkLastPropertyFired(panel, key1, value2, null);
-        assertTrue(panel.getClientProperty(key1) == null);
+        assertNull(panel.getClientProperty(key1));
         changeListener.reset();
     }
 
@@ -1521,7 +1521,7 @@
         TransferHandler handler1 = new TransferHandler("1");
         TransferHandler handler2 = new TransferHandler("1");
 
-        assertEquals("transferHandler is not set by default ", null, panel.getTransferHandler());
+        assertNull("transferHandler is not set by default ", panel.getTransferHandler());
 
         panel1.setTransferHandler(handler1);
         assertEquals("transferHandler's set properly ", handler1, panel1.getTransferHandler());
@@ -1560,7 +1560,7 @@
         assertTrue(panel.getActionForKeyStroke(keyStroke3) == action3);
 
         panel.registerKeyboardAction(null, command3, keyStroke3, JComponent.WHEN_FOCUSED);
-        assertTrue(panel.getActionForKeyStroke(keyStroke3) == null);
+        assertNull(panel.getActionForKeyStroke(keyStroke3));
     }
 
     public void testProcessKeyBinding() throws IllegalArgumentException, IllegalAccessException, InvocationTargetException {
@@ -1589,14 +1589,14 @@
         assertTrue(result);
 
         result = panel.processKeyBinding(keyStroke2, keyEvent2, JComponent.WHEN_FOCUSED, true);
-        assertTrue(action2.eventHeard == null);
+        assertNull(action2.eventHeard);
         assertFalse(result);
 
         result = panel.processKeyBinding(keyStroke2, keyEvent2, JComponent.WHEN_IN_FOCUSED_WINDOW, false);
-        assertTrue(action2.eventHeard == null);
+        assertNull(action2.eventHeard);
         assertFalse(result);
         result = panel.processKeyBinding(keyStroke2, keyEvent2, JComponent.WHEN_IN_FOCUSED_WINDOW, true);
-        assertTrue(action2.eventHeard == null);
+        assertNull(action2.eventHeard);
         assertFalse(result);
 
         result = panel.processKeyBinding(keyStroke2, keyEvent2, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, false);
@@ -1613,7 +1613,7 @@
 
         result = panel.processKeyBinding(keyStroke3, keyEvent3, JComponent.WHEN_IN_FOCUSED_WINDOW, true);
         assertTrue(action3.eventHeard != null && action3.eventHeard.getActionCommand() == command3);
-        assertEquals(result, true);
+        assertTrue(result);
 
         Action action = new AbstractAction() {
             public void actionPerformed(final ActionEvent e) {
@@ -1623,17 +1623,17 @@
         panel.getActionMap().put("asdasda", action);
         action.setEnabled(false);
         result = panel.processKeyBinding(keyStroke4, keyEvent4, JComponent.WHEN_IN_FOCUSED_WINDOW, true);
-        assertEquals(result, false);
+        assertFalse(result);
 
         action.setEnabled(true);
         panel.setEnabled(false);
         result = panel.processKeyBinding(keyStroke4, keyEvent4, JComponent.WHEN_IN_FOCUSED_WINDOW, true);
-        assertEquals(result, false);
+        assertFalse(result);
 
         panel.setEnabled(true);
         panel.setVisible(false);
         result = panel.processKeyBinding(keyStroke4, keyEvent4, JComponent.WHEN_IN_FOCUSED_WINDOW, true);
-        assertEquals(result, true);
+        assertTrue(result);
     }
 
     public void testGetActionForKeyStroke() {
@@ -1659,7 +1659,7 @@
         assertTrue(panel.getActionForKeyStroke(keyStroke3) == action3);
 
         panel.registerKeyboardAction(null, keyStroke3, JComponent.WHEN_FOCUSED);
-        assertTrue(panel.getActionForKeyStroke(keyStroke3) == null);
+        assertNull(panel.getActionForKeyStroke(keyStroke3));
   }
 
     /*
@@ -1685,24 +1685,24 @@
         assertTrue(panel.getActionForKeyStroke(keyStroke3) == action3);
 
         panel.unregisterKeyboardAction(keyStroke1);
-        assertTrue(panel.getActionForKeyStroke(keyStroke1) == null);
+        assertNull(panel.getActionForKeyStroke(keyStroke1));
         assertTrue(panel.getActionForKeyStroke(keyStroke2) == action2);
         assertTrue(panel.getActionForKeyStroke(keyStroke3) == action3);
 
         panel.unregisterKeyboardAction(keyStroke2);
-        assertTrue(panel.getActionForKeyStroke(keyStroke1) == null);
-        assertTrue(panel.getActionForKeyStroke(keyStroke2) == null);
+        assertNull(panel.getActionForKeyStroke(keyStroke1));
+        assertNull(panel.getActionForKeyStroke(keyStroke2));
         assertTrue(panel.getActionForKeyStroke(keyStroke3) == action3);
 
         panel.unregisterKeyboardAction(keyStroke3);
-        assertTrue(panel.getActionForKeyStroke(keyStroke1) == null);
-        assertTrue(panel.getActionForKeyStroke(keyStroke2) == null);
-        assertTrue(panel.getActionForKeyStroke(keyStroke3) == null);
+        assertNull(panel.getActionForKeyStroke(keyStroke1));
+        assertNull(panel.getActionForKeyStroke(keyStroke2));
+        assertNull(panel.getActionForKeyStroke(keyStroke3));
 
         panel.registerKeyboardAction(action1, keyStroke1, JComponent.WHEN_FOCUSED);
         panel.registerKeyboardAction(action2, keyStroke1, JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
         panel.unregisterKeyboardAction(keyStroke1);
-        assertTrue(panel.getActionForKeyStroke(keyStroke1) == null);
+        assertNull(panel.getActionForKeyStroke(keyStroke1));
         assertTrue(panel.getActionMap().size() == 0);
     }
 
@@ -1805,16 +1805,16 @@
         assertTrue(panel.getActionForKeyStroke(keyStroke3) == action3);
 
         panel.resetKeyboardActions();
-        assertTrue(panel.getActionForKeyStroke(keyStroke1) == null);
-        assertTrue(panel.getActionForKeyStroke(keyStroke2) == null);
-        assertTrue(panel.getActionForKeyStroke(keyStroke3) == null);
+        assertNull(panel.getActionForKeyStroke(keyStroke1));
+        assertNull(panel.getActionForKeyStroke(keyStroke2));
+        assertNull(panel.getActionForKeyStroke(keyStroke3));
     }
 
     public void testGetRootPane() {
         JFrame mainFrame = new JFrame();
         JRootPane rootPane = new JRootPane();
 
-        assertTrue(panel.getRootPane() == null);
+        assertNull(panel.getRootPane());
 
         mainFrame.getContentPane().add(panel);
         assertTrue(panel.getRootPane() != null);
@@ -1825,7 +1825,7 @@
         assertTrue(panel.getRootPane() == rootPane);
 
         rootPane.getContentPane().remove(panel);
-        assertTrue(panel.getRootPane() == null);
+        assertNull(panel.getRootPane());
         mainFrame.dispose();
     }
 
@@ -1869,7 +1869,7 @@
             }
         };
 
-        assertEquals("There's not inputVerifier set by default", null, panel.getInputVerifier());
+        assertNull("There's not inputVerifier set by default", panel.getInputVerifier());
 
         panel.setInputVerifier(verifier1);
         assertEquals("InputVerifier set properly: ", verifier1, panel.getInputVerifier());
@@ -1899,7 +1899,7 @@
         assertTrue(panel.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT) == map3);
 
         panel.setInputMap(JComponent.WHEN_FOCUSED, null);
-        assertTrue(panel.getInputMap(JComponent.WHEN_FOCUSED) == null);
+        assertNull(panel.getInputMap(JComponent.WHEN_FOCUSED));
 
         boolean isThrown = false;
         try {
@@ -2033,7 +2033,7 @@
         assertTrue(panel.getToolTipText().equals(toolTipText2));
 
         panel.setToolTipText(null);
-        assertTrue(panel.getToolTipText() == null);
+        assertNull(panel.getToolTipText());
     }
 
     /*
@@ -2043,7 +2043,7 @@
         String toolTipText1 = "toolTipText1";
         String toolTipText2 = "toolTipText2";
 
-        assertTrue(panel.getToolTipText() == null);
+        assertNull(panel.getToolTipText());
 
         panel.setToolTipText(toolTipText1);
         assertTrue(panel.getToolTipText().equals(toolTipText1));
@@ -2052,7 +2052,7 @@
         assertTrue(panel.getToolTipText().equals(toolTipText2));
 
         panel.setToolTipText(null);
-        assertTrue(panel.getToolTipText() == null);
+        assertNull(panel.getToolTipText());
     }
 
     /*
@@ -2063,7 +2063,7 @@
         String toolTipText1 = "toolTipText1";
         String toolTipText2 = "toolTipText2";
 
-        assertTrue(panel.getToolTipText(event) == null);
+        assertNull(panel.getToolTipText(event));
 
         panel.setToolTipText(toolTipText1);
         assertTrue(panel.getToolTipText(event).equals(toolTipText1));
@@ -2074,8 +2074,8 @@
         assertTrue(panel.getToolTipText(null).equals(toolTipText2));
 
         panel.setToolTipText(null);
-        assertTrue(panel.getToolTipText(event) == null);
-        assertTrue(panel.getToolTipText(null) == null);
+        assertNull(panel.getToolTipText(event));
+        assertNull(panel.getToolTipText(null));
     }
 
     public void testGetToolTipLocation() {
@@ -2083,8 +2083,8 @@
         int y = 200;
         MouseEvent event = new MouseEvent(panel, 0, 0, 0, x, y, 0, false);
 
-        assertTrue(panel.getToolTipLocation(event) == null);
-        assertTrue(panel.getToolTipLocation(null) == null);
+        assertNull(panel.getToolTipLocation(event));
+        assertNull(panel.getToolTipLocation(null));
     }
 
     public void testCreateToolTip() {
@@ -2093,17 +2093,17 @@
 
         toolTip = panel.createToolTip();
         assertTrue(toolTip.getComponent() == panel);
-        assertTrue(toolTip.getTipText() == null);
+        assertNull(toolTip.getTipText());
 
         panel.setToolTipText(toolTipText1);
         toolTip = panel.createToolTip();
         assertTrue(toolTip.getComponent() == panel);
-        assertTrue(toolTip.getTipText() == null);
+        assertNull(toolTip.getTipText());
 
         JPanel panel2 = new JPanel();
         toolTip = panel2.createToolTip();
         assertTrue(toolTip.getComponent() == panel2);
-        assertTrue(toolTip.getTipText() == null);
+        assertNull(toolTip.getTipText());
     }
 
     /*
@@ -2251,7 +2251,7 @@
         JFrame mainFrame = new JFrame();
         JDialog dialog = new JDialog();
 
-        assertTrue(panel.getTopLevelAncestor() == null);
+        assertNull(panel.getTopLevelAncestor());
 
         mainFrame.getContentPane().add(panel);
         assertTrue(panel.getTopLevelAncestor() == mainFrame);
@@ -2260,7 +2260,7 @@
         assertTrue(panel.getTopLevelAncestor() == dialog);
 
         dialog.getContentPane().remove(panel);
-        assertTrue(panel.getTopLevelAncestor() == null);
+        assertNull(panel.getTopLevelAncestor());
         mainFrame.dispose();
     }
 
@@ -2291,17 +2291,17 @@
         container.setFocusCycleRoot(true);
         container.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
         panel1.setNextFocusableComponent(panel2);
-        assertEquals(null, container.getFocusTraversalPolicy().getComponentBefore(container, panel1));
+        assertNull(container.getFocusTraversalPolicy().getComponentBefore(container, panel1));
         assertEquals(panel2, container.getFocusTraversalPolicy().getComponentAfter(container, panel1));
         assertEquals(panel1, container.getFocusTraversalPolicy().getComponentBefore(container, panel2));
-        assertEquals(null, container.getFocusTraversalPolicy().getComponentAfter(container, panel2));
+        assertNull(container.getFocusTraversalPolicy().getComponentAfter(container, panel2));
     }
 
     public void testGetNextFocusableComponent() {
         JComponent panel1 = new JPanel();
         JComponent panel2 = new JPanel();
 
-        assertEquals("default nextFocusableComponent isn't set ", null, panel.getNextFocusableComponent());
+        assertNull("default nextFocusableComponent isn't set ", panel.getNextFocusableComponent());
 
         panel.setNextFocusableComponent(panel1);
         assertEquals("nextFocusableComponent set correctly ", panel1, panel.getNextFocusableComponent());
@@ -2384,26 +2384,26 @@
     }
 
     public void testIsRequestFocusEnabled() {
-        assertEquals("default value for requestFocusEnabled ", true, panel.isRequestFocusEnabled());
+        assertTrue("default value for requestFocusEnabled ", panel.isRequestFocusEnabled());
     }
 
     public void testSetRequestFocusEnabled() {
         panel.setRequestFocusEnabled(false);
-        assertEquals("value for requestFocusEnabled set correctly ", false, panel.isRequestFocusEnabled());
+        assertFalse("value for requestFocusEnabled set correctly ", panel.isRequestFocusEnabled());
 
         panel.setRequestFocusEnabled(true);
-        assertEquals("value for requestFocusEnabled set correctly ", true, panel.isRequestFocusEnabled());
+        assertTrue("value for requestFocusEnabled set correctly ", panel.isRequestFocusEnabled());
     }
 
     public void testSetDoubleBuffered() {
         panel.setDoubleBuffered(true);
-        assertEquals("now panel is doubleBuffered ", true, panel.isDoubleBuffered());
+        assertTrue("now panel is doubleBuffered ", panel.isDoubleBuffered());
 
         panel.setDoubleBuffered(false);
-        assertEquals("now panel is not doubleBuffered ", false, panel.isDoubleBuffered());
+        assertFalse("now panel is not doubleBuffered ", panel.isDoubleBuffered());
 
         panel.setDoubleBuffered(true);
-        assertEquals("now panel is doubleBuffered ", true, panel.isDoubleBuffered());
+        assertTrue("now panel is doubleBuffered ", panel.isDoubleBuffered());
     }
 
     /*
@@ -2526,25 +2526,25 @@
     }
 
     public void testIsValidateRoot() {
-        assertEquals("isValidateRoot always returns false ", false, panel.isValidateRoot());
+        assertFalse("isValidateRoot always returns false ", panel.isValidateRoot());
     }
 
     public void testIsOptimizedDrawingEnabled() {
-        assertEquals("isOptimizedDrawingEnabled always returns true ", true, panel.isOptimizedDrawingEnabled());
+        assertTrue("isOptimizedDrawingEnabled always returns true ", panel.isOptimizedDrawingEnabled());
     }
 
     public void testIsManagingFocus() {
-        assertEquals("isManagingFocus always returns false ", false, panel.isManagingFocus());
+        assertFalse("isManagingFocus always returns false ", panel.isManagingFocus());
     }
 
     public void testGetVerifyInputWhenFocusTarget() {
-        assertEquals("default verifyInputWhenFocusTarget value", true, panel.getVerifyInputWhenFocusTarget());
+        assertTrue("default verifyInputWhenFocusTarget value", panel.getVerifyInputWhenFocusTarget());
 
         panel.setVerifyInputWhenFocusTarget(false);
-        assertEquals("verifyInputWhenFocusTarget value set properly ", false, panel.getVerifyInputWhenFocusTarget());
+        assertFalse("verifyInputWhenFocusTarget value set properly ", panel.getVerifyInputWhenFocusTarget());
 
         panel.setVerifyInputWhenFocusTarget(true);
-        assertEquals("verifyInputWhenFocusTarget value set properly ", true, panel.getVerifyInputWhenFocusTarget());
+        assertTrue("verifyInputWhenFocusTarget value set properly ", panel.getVerifyInputWhenFocusTarget());
     }
 
     public void testSetAutoscrolls() {
@@ -2615,7 +2615,7 @@
             listener1.checkPropertyFired(panel, "inheritsPopupMenu",
                                          Boolean.FALSE, Boolean.TRUE);
         }
-        assertEquals("InheritsPopupMenu", true, panel.getInheritsPopupMenu());
+        assertTrue("InheritsPopupMenu", panel.getInheritsPopupMenu());
         listener1.reset();
 
         panel.setInheritsPopupMenu(false);
@@ -2623,7 +2623,7 @@
             listener1.checkPropertyFired(panel, "inheritsPopupMenu",
                                          Boolean.TRUE, Boolean.FALSE);
         }
-        assertEquals("InheritsPopupMenu", false, panel.getInheritsPopupMenu());
+        assertFalse("InheritsPopupMenu", panel.getInheritsPopupMenu());
         listener1.reset();
 
         panel.setInheritsPopupMenu(false);
@@ -2631,7 +2631,7 @@
     }
 
     public void testGetInheritsPopupMenu() {
-        assertEquals("InheritsPopupMenu", false, panel.getInheritsPopupMenu());
+        assertFalse("InheritsPopupMenu", panel.getInheritsPopupMenu());
     }
 
     public void testSetComponentPopupMenu() {
@@ -2663,7 +2663,7 @@
     }
 
     public void testGetComponentPopupMenu() {
-        assertEquals("ComponentPopupMenu", null, panel.getComponentPopupMenu());
+        assertNull("ComponentPopupMenu", panel.getComponentPopupMenu());
 
         JPanel parent = new JPanel();
         parent.add(panel);
@@ -2682,13 +2682,13 @@
         assertEquals("ComponentPopupMenu", popup2, panel.getComponentPopupMenu());
 
         panel.setInheritsPopupMenu(false);
-        assertEquals("ComponentPopupMenu", null, panel.getComponentPopupMenu());
+        assertNull("ComponentPopupMenu", panel.getComponentPopupMenu());
     }
 
     public void testGetPopupLocation() {
         panel.setPreferredSize(new Dimension(100, 100));
         MouseEvent event = new MouseEvent(panel, 0, 0, 0, 10, 20, 1, true);
-        assertEquals("PopupLocation", null, panel.getPopupLocation(event));
+        assertNull("PopupLocation", panel.getPopupLocation(event));
     }
 
     private void removeListeners(final JComponent comp, final Class c) {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponent_MultithreadedTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponent_MultithreadedTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponent_MultithreadedTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JComponent_MultithreadedTest.java Fri Oct 13 03:41:21 2006
@@ -138,17 +138,17 @@
         panel1.setInputVerifier(verifier);
         panel2.setVerifyInputWhenFocusTarget(true);
         requestFocusForComponent(panel2);
-        assertEquals("verifier's invoked ", true, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertTrue("verifier's invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
         verifier.invoked = false;
 
         requestFocusForComponent(panel1);
-        assertEquals("focus's gained ", true, panel1.isFocusOwner());
+        assertTrue("focus's gained ", panel1.isFocusOwner());
 
         panel2.setVerifyInputWhenFocusTarget(false);
         requestFocusForComponent(panel2);
-        assertEquals("verifier's not invoked ", false, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertFalse("verifier's not invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
     }
 
     /*
@@ -173,23 +173,23 @@
         panel1.setInputVerifier(verifier);
         panel2.setVerifyInputWhenFocusTarget(true);
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel2));
-        assertEquals("verifier's invoked ", true, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertTrue("verifier's invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
         verifier.invoked = false;
 
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel1));
-        assertEquals("focus's gained ", true, panel1.isFocusOwner());
+        assertTrue("focus's gained ", panel1.isFocusOwner());
 
         panel2.setVerifyInputWhenFocusTarget(false);
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel2));
-        assertEquals("verifier's not invoked ", false, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertFalse("verifier's not invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
 
         panel1.setVerifyInputWhenFocusTarget(true);
         panel2.setInputVerifier(verifier2);
         assertFalse("focus can be gained ", requestFocusInWindowForComponent(panel1, true));
-        assertEquals("verifier's invoked ", true, verifier2.invoked);
-        assertEquals("focus's gained ", false, panel1.isFocusOwner());
+        assertTrue("verifier's invoked ", verifier2.invoked);
+        assertFalse("focus's gained ", panel1.isFocusOwner());
         verifier.invoked = false;
     }
 
@@ -214,34 +214,34 @@
         panel1.setInputVerifier(verifier);
         panel2.setVerifyInputWhenFocusTarget(true);
         requestFocusForComponent(panel2, false);
-        assertEquals("verifier's invoked ", true, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertTrue("verifier's invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
         verifier.invoked = false;
 
         requestFocusForComponent(panel1, false);
-        assertEquals("focus's gained ", true, panel1.isFocusOwner());
+        assertTrue("focus's gained ", panel1.isFocusOwner());
 
         panel2.setVerifyInputWhenFocusTarget(false);
         requestFocusForComponent(panel2, false);
-        assertEquals("verifier's not invoked ", false, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertFalse("verifier's not invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
 
         requestFocusForComponent(panel1, false);
-        assertEquals("focus's gained ", true, panel1.isFocusOwner());
+        assertTrue("focus's gained ", panel1.isFocusOwner());
 
         panel2.setVerifyInputWhenFocusTarget(true);
         requestFocusForComponent(panel2, true);
-        assertEquals("verifier's invoked ", true, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertTrue("verifier's invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
         verifier.invoked = false;
 
         requestFocusForComponent(panel1, true);
-        assertEquals("focus's gained ", true, panel1.isFocusOwner());
+        assertTrue("focus's gained ", panel1.isFocusOwner());
 
         panel2.setVerifyInputWhenFocusTarget(false);
         requestFocusForComponent(panel2, true);
-        assertEquals("verifier's not invoked ", false, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertFalse("verifier's not invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
     }
 
     /*
@@ -266,40 +266,40 @@
         panel1.setInputVerifier(verifier);
         panel2.setVerifyInputWhenFocusTarget(true);
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel2, false));
-        assertEquals("verifier's invoked ", true, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertTrue("verifier's invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
         verifier.invoked = false;
 
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel1, false));
-        assertEquals("focus's gained ", true, panel1.isFocusOwner());
+        assertTrue("focus's gained ", panel1.isFocusOwner());
 
         panel2.setVerifyInputWhenFocusTarget(false);
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel2, false));
-        assertEquals("verifier's not invoked ", false, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertFalse("verifier's not invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
 
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel1, false));
-        assertEquals("focus's gained ", true, panel1.isFocusOwner());
+        assertTrue("focus's gained ", panel1.isFocusOwner());
 
         panel2.setVerifyInputWhenFocusTarget(true);
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel2, true));
-        assertEquals("verifier's invoked ", true, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertTrue("verifier's invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
         verifier.invoked = false;
 
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel1, true));
-        assertEquals("focus's gained ", true, panel1.isFocusOwner());
+        assertTrue("focus's gained ", panel1.isFocusOwner());
 
         panel2.setVerifyInputWhenFocusTarget(false);
         assertTrue("focus can be gained ", requestFocusInWindowForComponent(panel2, true));
-        assertEquals("verifier's not invoked ", false, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertFalse("verifier's not invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
 
         panel1.setVerifyInputWhenFocusTarget(true);
         panel2.setInputVerifier(verifier2);
         assertFalse("focus can be gained ", requestFocusInWindowForComponent(panel1, true));
-        assertEquals("verifier's invoked ", true, verifier2.invoked);
-        assertEquals("focus's gained ", false, panel1.isFocusOwner());
+        assertTrue("verifier's invoked ", verifier2.invoked);
+        assertFalse("focus's gained ", panel1.isFocusOwner());
         verifier.invoked = false;
     }
 
@@ -321,17 +321,17 @@
         panel1.setInputVerifier(verifier);
         panel2.setVerifyInputWhenFocusTarget(true);
         grabFocusForComponent(panel2);
-        assertEquals("verifier's invoked ", true, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertTrue("verifier's invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
         verifier.invoked = false;
 
         grabFocusForComponent(panel1);
-        assertEquals("focus's gained ", true, panel1.isFocusOwner());
+        assertTrue("focus's gained ", panel1.isFocusOwner());
 
         panel2.setVerifyInputWhenFocusTarget(false);
         grabFocusForComponent(panel2);
-        assertEquals("verifier's not invoked ", false, verifier.invoked);
-        assertEquals("focus's gained ", true, panel2.isFocusOwner());
+        assertFalse("verifier's not invoked ", verifier.invoked);
+        assertTrue("focus's gained ", panel2.isFocusOwner());
     }
 
     public void testRequestDefaultFocus() throws Exception {
@@ -375,15 +375,15 @@
         panel3.setFocusCycleRoot(false);
         panel3.setFocusTraversalPolicy(policy);
         requestDefaultFocusForComponent(panel3, window);
-        assertEquals("focus's gained ", true, window.isFocusOwner());
+        assertTrue("focus's gained ", window.isFocusOwner());
 
         panel3.setFocusCycleRoot(true);
         requestDefaultFocusForComponent(panel3, panel4);
-        assertEquals("focus's gained ", true, panel4.isFocusOwner());
+        assertTrue("focus's gained ", panel4.isFocusOwner());
 
         panel3.setFocusCycleRoot(false);
         requestDefaultFocusForComponent(panel3, window);
-        assertEquals("focus's gained ", false, window.isFocusOwner());
+        assertFalse("focus's gained ", window.isFocusOwner());
     }
 
     public void testUpdateUI() throws Exception {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDesktopPaneTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDesktopPaneTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDesktopPaneTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDesktopPaneTest.java Fri Oct 13 03:41:21 2006
@@ -147,13 +147,13 @@
     public void testSetGetSelectedFrame() {
         JInternalFrame f = new JInternalFrame();
 
-        assertTrue("null by default", desktop.getSelectedFrame() == null);
+        assertNull("null by default", desktop.getSelectedFrame());
 
         desktop.setSelectedFrame(f);
         assertTrue("is set", desktop.getSelectedFrame() == f);
 
         desktop.setSelectedFrame(null);
-        assertTrue("is set to null", desktop.getSelectedFrame() == null);
+        assertNull("is set to null", desktop.getSelectedFrame());
     }
 
     /*

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDialogTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDialogTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDialogTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JDialogTest.java Fri Oct 13 03:41:21 2006
@@ -118,7 +118,7 @@
      * Auxiliary method to check JDialog correctness after constructor's call.
      */
     protected void checkDialogCorrectness(final JDialog dialog, final String title, final boolean modal) {
-        assertEquals("JDialog is invisible by default", false, dialog.isVisible());
+        assertFalse("JDialog is invisible by default", dialog.isVisible());
         assertTrue("locale is set", dialog.getLocale() == JComponent.getDefaultLocale());
         assertTrue("owner is not null", dialog.getOwner() != null);
 
@@ -216,10 +216,10 @@
      */
      public void testSetIsDefaultLookAndFeelDecorated() {
         // test for default value
-        assertEquals(false, JDialog.isDefaultLookAndFeelDecorated());
+        assertFalse(JDialog.isDefaultLookAndFeelDecorated());
 
         JDialog.setDefaultLookAndFeelDecorated(true);
-        assertEquals(true, JDialog.isDefaultLookAndFeelDecorated());
+        assertTrue(JDialog.isDefaultLookAndFeelDecorated());
 
         // restore default value
         JDialog.setDefaultLookAndFeelDecorated(false);
@@ -529,7 +529,7 @@
 
         // test setting rootPane to null
         dialog.setRootPane(null);
-        assertTrue(dialog.getRootPane() == null);
+        assertNull(dialog.getRootPane());
         assertTrue("rootPane is removed from the container", dialog.getComponentCount() == 0);
     }
 
@@ -551,14 +551,14 @@
      *     JMenuBar getJMenuBar()
      */
     public void testSetGetJMenuBarJMenuBar() {
-        assertEquals(null, dialog.getJMenuBar());
+        assertNull(dialog.getJMenuBar());
 
         JMenuBar menuBar = new JMenuBar();
         dialog.setJMenuBar(menuBar);
         assertTrue(dialog.getJMenuBar() == menuBar);
 
         dialog.setJMenuBar(null);
-        assertTrue(dialog.getJMenuBar() == null);
+        assertNull(dialog.getJMenuBar());
     }
 
     /*
@@ -582,7 +582,7 @@
         } catch (IllegalComponentStateException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // layeredPane cannot be null, even after setLayeredPane(null)
         assertTrue(dialog.getLayeredPane() != null);
@@ -600,13 +600,13 @@
         assertTrue("class is ok", c instanceof JDialog.AccessibleJDialog);
         assertTrue("AccessibleRole is ok",
                 c.getAccessibleRole() == AccessibleRole.DIALOG);
-        assertTrue("AccessibleDescription is ok",
-                c.getAccessibleDescription() == null);
+        assertNull("AccessibleDescription is ok",
+                c.getAccessibleDescription());
         assertTrue("AccessibleChildrenCount == 1",
                    c.getAccessibleChildrenCount() == 1);
 
         // test getAccessibleName()
-        assertTrue("AccessibleName is ok", c.getAccessibleName() == null);
+        assertNull("AccessibleName is ok", c.getAccessibleName());
         dialog.setTitle("aa");
         assertTrue("AccessibleName is ok", c.getAccessibleName() == "aa");
 
@@ -726,7 +726,7 @@
         } catch (IllegalComponentStateException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // contentPane cannot be null, even after setContentPane(null)
         assertTrue(dialog.getContentPane() != null);
@@ -757,7 +757,7 @@
         } catch (NullPointerException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // glassPane cannot be null, even after setGlassPane(null)
         assertTrue(dialog.getGlassPane() != null);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JFrameTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JFrameTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JFrameTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JFrameTest.java Fri Oct 13 03:41:21 2006
@@ -122,7 +122,7 @@
     public void testJFrame() {
         frame = new JFrame();
         assertEquals("title is empty", "", frame.getTitle());
-        assertEquals("JFrame is invisible by default", false, frame.isVisible());
+        assertFalse("JFrame is invisible by default", frame.isVisible());
         assertTrue(frame.getLocale() == JComponent.getDefaultLocale());
 
         // how to test throwing of HeadlessException
@@ -186,7 +186,7 @@
         } catch (IllegalArgumentException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
 
         // if JFrame.EXIT_ON_CLOSE has been specified and the SecurityManager
@@ -221,10 +221,10 @@
      */
      public void testSetIsDefaultLookAndFeelDecorated() {
          // test for default value
-         assertEquals(false, JFrame.isDefaultLookAndFeelDecorated());
+         assertFalse(JFrame.isDefaultLookAndFeelDecorated());
 
          JFrame.setDefaultLookAndFeelDecorated(true);
-         assertEquals(true, JFrame.isDefaultLookAndFeelDecorated());
+         assertTrue(JFrame.isDefaultLookAndFeelDecorated());
 
         // restore default value
         JFrame.setDefaultLookAndFeelDecorated(false);
@@ -256,13 +256,13 @@
         // would be nice to test non-default gc here
         frame = new JFrame(title, gc);
         assertEquals("Title is set properly", title, frame.getTitle());
-        assertEquals("JFrame is invisible by default", false, frame.isVisible());
+        assertFalse("JFrame is invisible by default", frame.isVisible());
         assertTrue(frame.getLocale() == JComponent.getDefaultLocale());
         assertTrue(frame.getGraphicsConfiguration() == gc);
 
         frame = new JFrame(null, null);
-        assertEquals("null instead of title can be used", null, frame.getTitle());
-        assertEquals("JFrame is invisible by default", false, frame.isVisible());
+        assertNull("null instead of title can be used", frame.getTitle());
+        assertFalse("JFrame is invisible by default", frame.isVisible());
         assertTrue(frame.getLocale() == JComponent.getDefaultLocale());
         assertTrue(frame.getGraphicsConfiguration() == gc);
 
@@ -280,12 +280,12 @@
         // test with valid title
         frame = new JFrame(title);
         assertEquals("Title is set properly", title, frame.getTitle());
-        assertEquals("JFrame is invisible by default", false, frame.isVisible());
+        assertFalse("JFrame is invisible by default", frame.isVisible());
         assertTrue(frame.getLocale() == JComponent.getDefaultLocale());
 
         frame = new JFrame((String)null);
-        assertEquals("null instead of title can be used", null, frame.getTitle());
-        assertEquals("JFrame is invisible by default", false, frame.isVisible());
+        assertNull("null instead of title can be used", frame.getTitle());
+        assertFalse("JFrame is invisible by default", frame.isVisible());
         assertTrue(frame.getLocale() == JComponent.getDefaultLocale());
 
         // how to test throwing of HeadlessException
@@ -304,13 +304,13 @@
         // would be nice to test non-default gc here
         frame = new JFrame(gc);
         assertEquals("title is empty", "", frame.getTitle());
-        assertEquals("JFrame is invisible by default", false, frame.isVisible());
+        assertFalse("JFrame is invisible by default", frame.isVisible());
         assertTrue(frame.getLocale() == JComponent.getDefaultLocale());
         assertTrue(frame.getGraphicsConfiguration() == gc);
 
         frame = new JFrame((GraphicsConfiguration)null);
         assertEquals("title is empty", "", frame.getTitle());
-        assertEquals("JFrame is invisible by default", false, frame.isVisible());
+        assertFalse("JFrame is invisible by default", frame.isVisible());
         assertTrue(frame.getLocale() == JComponent.getDefaultLocale());
         assertTrue(frame.getGraphicsConfiguration() == gc);
 
@@ -373,7 +373,7 @@
 
         // test setting rootPane to null
         frame.setRootPane(null);
-        assertTrue(frame.getRootPane() == null);
+        assertNull(frame.getRootPane());
         assertTrue("rootPane is removed from the container", frame.getComponentCount() == 0);
     }
 
@@ -395,14 +395,14 @@
      *     JMenuBar getJMenuBar()
      */
     public void testSetGetJMenuBar() {
-        assertEquals(null, frame.getJMenuBar());
+        assertNull(frame.getJMenuBar());
 
         JMenuBar menuBar = new JMenuBar();
         frame.setJMenuBar(menuBar);
         assertTrue(frame.getJMenuBar() == menuBar);
 
         frame.setJMenuBar(null);
-        assertTrue(frame.getJMenuBar() == null);
+        assertNull(frame.getJMenuBar());
     }
 
     /*
@@ -426,7 +426,7 @@
         } catch (IllegalComponentStateException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // layeredPane cannot be null, even after setLayeredPane(null)
         assertTrue(frame.getLayeredPane() != null);
@@ -444,8 +444,8 @@
         assertTrue("class is ok", c instanceof JFrame.AccessibleJFrame);
         assertTrue("AccessibleRole is ok",
                 c.getAccessibleRole() == AccessibleRole.FRAME);
-        assertTrue("AccessibleDescription is ok",
-                c.getAccessibleDescription() == null);
+        assertNull("AccessibleDescription is ok",
+                c.getAccessibleDescription());
         assertTrue("AccessibleChildrenCount == 1",
                    c.getAccessibleChildrenCount() == 1);
 
@@ -572,7 +572,7 @@
         } catch (IllegalComponentStateException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // contentPane cannot be null, even after setContentPane(null)
         assertTrue(frame.getContentPane() != null);
@@ -602,7 +602,7 @@
         } catch (NullPointerException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // glassPane cannot be null, even after setGlassPane(null)
         assertTrue(frame.getGlassPane() != null);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame$JDesktopIconTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame%24JDesktopIconTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame$JDesktopIconTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame$JDesktopIconTest.java Fri Oct 13 03:41:21 2006
@@ -131,14 +131,14 @@
 
         // test set to null
         icon.setInternalFrame(null);
-        assertTrue(icon.getInternalFrame() == null);
+        assertNull(icon.getInternalFrame());
     }
 
     /*
      * Class under test for JDesktopPane getDesktopPane()
      */
     public void testGetDesktopPane() {
-        assertTrue("null by default", icon.getDesktopPane() == null);
+        assertNull("null by default", icon.getDesktopPane());
 
         // test when not iconified
         JDesktopPane desktop = new JDesktopPane();
@@ -197,8 +197,8 @@
                    value.getMaximumAccessibleValue().intValue() == Integer.MAX_VALUE);
 
         // test other methods
-        assertTrue("AccessibleDescription is ok",
-                c.getAccessibleDescription() == null);
+        assertNull("AccessibleDescription is ok",
+                c.getAccessibleDescription());
         assertTrue("AccessibleChildrenCount == 2",
                    c.getAccessibleChildrenCount() == 2);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrameTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrameTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrameTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrameTest.java Fri Oct 13 03:41:21 2006
@@ -1103,7 +1103,7 @@
 
         // test setting rootPane to null
         frame.setRootPane(null);
-        assertTrue(frame.getRootPane() == null);
+        assertNull(frame.getRootPane());
         assertTrue("rootPane is not removed from the container", frame.getComponentCount() == 1);
     }
 
@@ -1128,7 +1128,7 @@
      * @deprecated
      */
     public void testSetGetMenuBar() {
-        assertEquals(null, frame.getMenuBar());
+        assertNull(frame.getMenuBar());
         MyPropertyChangeListener listener = new MyPropertyChangeListener();
         frame.addPropertyChangeListener(JInternalFrame.MENU_BAR_PROPERTY, listener);
 
@@ -1138,7 +1138,7 @@
         assertTrue("menuBar is a bound property", listener.ok);
 
         frame.setMenuBar(null);
-        assertTrue(frame.getMenuBar() == null);
+        assertNull(frame.getMenuBar());
     }
 
     /*
@@ -1147,7 +1147,7 @@
      *     JMenuBar getJMenuBar()
      */
     public void testSetGetJMenuBar() {
-        assertEquals(null, frame.getJMenuBar());
+        assertNull(frame.getJMenuBar());
         MyPropertyChangeListener listener = new MyPropertyChangeListener();
         frame.addPropertyChangeListener(JInternalFrame.MENU_BAR_PROPERTY, listener);
 
@@ -1157,7 +1157,7 @@
         assertTrue("menuBar is a bound property", listener.ok);
 
         frame.setJMenuBar(null);
-        assertTrue(frame.getJMenuBar() == null);
+        assertNull(frame.getJMenuBar());
     }
 
     /*
@@ -1181,7 +1181,7 @@
         } catch (IllegalComponentStateException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // layeredPane cannot be null, even after setLayeredPane(null)
         assertTrue(frame.getLayeredPane() != null);
@@ -1205,7 +1205,7 @@
         assertTrue("desktopIcon is set", frame.getDesktopIcon() == icon);
 
         frame.setDesktopIcon(null);
-        assertTrue("desktopIcon is null", frame.getDesktopIcon() == null);
+        assertNull("desktopIcon is null", frame.getDesktopIcon());
     }
 
     /*
@@ -1213,7 +1213,7 @@
      */
     public void testGetDesktopPane() {
         // no desktopPane
-        assertTrue("desktopPane is null by default", frame.getDesktopPane() == null);
+        assertNull("desktopPane is null by default", frame.getDesktopPane());
 
         //JInternalFrame.JDesktopIcon icon = new JInternalFrame.JDesktopIcon(frame);
         //frame.setDesktopIcon(icon);
@@ -1225,7 +1225,7 @@
 
         // frame is removed from desktopPane
         desktop.remove(frame);
-        assertTrue("desktopPane is null", frame.getDesktopPane() == null);
+        assertNull("desktopPane is null", frame.getDesktopPane());
 
         // icon is added to desktoPane
         desktop.add(frame.getDesktopIcon());
@@ -1235,7 +1235,7 @@
         // default implementation crashes here
         //desktop.remove(frame.getDesktopIcon());
         //frame.setDesktopIcon(null);
-        //assertTrue("desktopPane is null", frame.getDesktopPane() == null);
+        //assertNull("desktopPane is null", frame.getDesktopPane());
     }
 
     /*
@@ -1252,7 +1252,7 @@
         assertTrue("frameIcon is set", frame.getFrameIcon() == icon);
 
         frame.setFrameIcon(null);
-        assertTrue("frameIcon is set to null", frame.getFrameIcon() == null);
+        assertNull("frameIcon is set to null", frame.getFrameIcon());
     }
 
     /*
@@ -1303,8 +1303,8 @@
                    value.getMaximumAccessibleValue().intValue() == Integer.MAX_VALUE);
 
         // test other methods
-        assertTrue("AccessibleDescription is ok",
-                c.getAccessibleDescription() == null);
+        assertNull("AccessibleDescription is ok",
+                c.getAccessibleDescription());
         assertTrue("AccessibleChildrenCount == 1",
                    c.getAccessibleChildrenCount() == 1);
     }
@@ -1328,7 +1328,7 @@
 
         // test setting null title
         frame.setTitle(null);
-        assertTrue("Title is set to null", frame.getTitle() == null);
+        assertNull("Title is set to null", frame.getTitle());
     }
 
     /*
@@ -1457,7 +1457,7 @@
         } catch (IllegalComponentStateException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // contentPane cannot be null, even after setContentPane(null)
         assertTrue(frame.getContentPane() != null);
@@ -1487,7 +1487,7 @@
         } catch (NullPointerException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // glassPane cannot be null, even after setGlassPane(null)
         assertTrue(frame.getGlassPane() != null);
@@ -1576,7 +1576,7 @@
      * Class under test for String getWarningString()
      */
     public void testGetWarningString() {
-        assertTrue("getWarningString() always returns null", frame.getWarningString() == null);
+        assertNull("getWarningString() always returns null", frame.getWarningString());
     }
 
     /*
@@ -1598,7 +1598,7 @@
      * Class under test for Container getFocusCycleRootAncestor()
      */
     public void testGetFocusCycleRootAncestor() {
-        assertTrue("always returns null", frame.getFocusCycleRootAncestor() == null);
+        assertNull("always returns null", frame.getFocusCycleRootAncestor());
     }
 
     /*

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame_MultithreadedTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame_MultithreadedTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame_MultithreadedTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JInternalFrame_MultithreadedTest.java Fri Oct 13 03:41:21 2006
@@ -140,7 +140,7 @@
         frame.getContentPane().add(def, BorderLayout.SOUTH);
         frame.getContentPane().add(some, BorderLayout.CENTER);
 
-        assertTrue("null by default", frame.getMostRecentFocusOwner() == null);
+        assertNull("null by default", frame.getMostRecentFocusOwner());
 
         class MyFocusTraversalPolicy extends SortingFocusTraversalPolicy {
             Component initial;
@@ -198,7 +198,7 @@
         frame.getContentPane().add(comp2, BorderLayout.SOUTH);
         frame.getContentPane().add(comp3, BorderLayout.CENTER);
 
-        assertTrue("== null", frame.getFocusOwner() == null);
+        assertNull("== null", frame.getFocusOwner());
 
         createAndShowRootFrame();
 
@@ -209,6 +209,6 @@
 
         // frame is not selected
         setSelectedFrame(frame, false);
-        assertTrue("== null", frame.getFocusOwner() == null);
+        assertNull("== null", frame.getFocusOwner());
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLayeredPaneTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLayeredPaneTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLayeredPaneTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JLayeredPaneTest.java Fri Oct 13 03:41:21 2006
@@ -162,15 +162,15 @@
 
     public void testIsOptimizedDrawingEnabled() {
         // no components
-        assertEquals(true, layered.isOptimizedDrawingEnabled());
+        assertTrue(layered.isOptimizedDrawingEnabled());
 
         // 1 component
         layered.add(new JPanel());
-        assertEquals(true, layered.isOptimizedDrawingEnabled());
+        assertTrue(layered.isOptimizedDrawingEnabled());
 
         // many components
         addComponents();
-        assertEquals(false, layered.isOptimizedDrawingEnabled());
+        assertFalse(layered.isOptimizedDrawingEnabled());
     }
 
     public void testHighestLayer() {
@@ -212,9 +212,9 @@
                    c instanceof JLayeredPane.AccessibleJLayeredPane);
         assertTrue("AccessibleRole is ok",
                 c.getAccessibleRole() == AccessibleRole.LAYERED_PANE);
-        assertTrue("AccessibleName is ok", c.getAccessibleName() == null);
-        assertTrue("AccessibleDescription is ok",
-                   c.getAccessibleDescription() == null);
+        assertNull("AccessibleName is ok", c.getAccessibleName());
+        assertNull("AccessibleDescription is ok",
+                   c.getAccessibleDescription());
         assertTrue("AccessibleChildrenCount == 0",
                    c.getAccessibleChildrenCount() == 0);
     }
@@ -471,9 +471,9 @@
     public void testGetLayeredPaneAboveComponent() {
         // can't use c5_0 and others because they have
         // previous JLayeredPane as their parent
-        assertEquals(null, JLayeredPane.getLayeredPaneAbove(new JPanel()));
+        assertNull(JLayeredPane.getLayeredPaneAbove(new JPanel()));
 
-        assertEquals(null, JLayeredPane.getLayeredPaneAbove(null));
+        assertNull(JLayeredPane.getLayeredPaneAbove(null));
 
         addComponents();
         assertTrue(JLayeredPane.getLayeredPaneAbove(c5_0) == layered);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuItemTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuItemTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuItemTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuItemTest.java Fri Oct 13 03:41:21 2006
@@ -99,7 +99,7 @@
      */
     public void testJMenuItem() {
         assertTrue("default buttonModel ", button.getModel() instanceof DefaultButtonModel);
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
         assertEquals("text ", "", button.getText());
         assertFalse("default FocusPainted", menuItem.isFocusPainted());
         assertFalse(menuItem.isFocusable());
@@ -135,7 +135,7 @@
         String text = "texttext";
         menuItem = new JMenuItem(text);
         assertTrue("default buttonModel ", button.getModel() instanceof DefaultButtonModel);
-        assertEquals("icon ", null, menuItem.getIcon());
+        assertNull("icon ", menuItem.getIcon());
         assertEquals("text ", text, menuItem.getText());
         assertFalse(menuItem.isFocusable());
 
@@ -173,8 +173,8 @@
         assertEquals("text ", text, menuItem.getText());
         assertEquals("action", action, menuItem.getAction());
         assertEquals("command ", command, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", true, menuItem.isEnabled());
+        assertFalse("selected ", menuItem.isSelected());
+        assertTrue("enabled ", menuItem.isEnabled());
         assertEquals("accelerator ", accelerator, menuItem.getAccelerator());
         assertFalse(menuItem.isFocusable());
 
@@ -185,18 +185,18 @@
         assertEquals("text ", text, menuItem.getText());
         assertEquals("action", action, menuItem.getAction());
         assertEquals("command ", command, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", false, menuItem.isEnabled());
+        assertFalse("selected ", menuItem.isSelected());
+        assertFalse("enabled ", menuItem.isEnabled());
         assertFalse("default FocusPainted", menuItem.isFocusPainted());
 
         menuItem = new JMenuItem((Action)null);
 
-        assertEquals("icon ", null, menuItem.getIcon());
-        assertEquals("text ", null, menuItem.getText());
-        assertEquals("action", null, menuItem.getAction());
-        assertEquals("command ", null, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", true, menuItem.isEnabled());
+        assertNull("icon ", menuItem.getIcon());
+        assertNull("text ", menuItem.getText());
+        assertNull("action", menuItem.getAction());
+        assertNull("command ", menuItem.getActionCommand());
+        assertFalse("selected ", menuItem.isSelected());
+        assertTrue("enabled ", menuItem.isEnabled());
 
         assertTrue("menuItem model is of the proper type", menuItem.getModel() instanceof DefaultButtonModel);
 
@@ -233,7 +233,7 @@
         String text = "texttext";
         menuItem = new JMenuItem(text, mnemonic);
         assertTrue("menuItem model is of the proper type", menuItem.getModel() instanceof DefaultButtonModel);
-        assertEquals("icon ", null, menuItem.getIcon());
+        assertNull("icon ", menuItem.getIcon());
         assertEquals("mnemonic ", mnemonic, menuItem.getMnemonic());
         assertEquals("text ", text, menuItem.getText());
         assertFalse("default FocusPainted", menuItem.isFocusPainted());
@@ -708,19 +708,19 @@
         button.setAction(action1);
 
         assertEquals("action ", action1, button.getAction());
-        assertEquals("enabled ", true, button.isEnabled());
-        assertEquals("enabled ", true, action1.isEnabled());
+        assertTrue("enabled ", button.isEnabled());
+        assertTrue("enabled ", action1.isEnabled());
         action1.setEnabled(false);
         button.isEnabled();
-        assertEquals("enabled ", false, button.isEnabled());
-        assertEquals("enabled ", false, action1.isEnabled());
+        assertFalse("enabled ", button.isEnabled());
+        assertFalse("enabled ", action1.isEnabled());
 
         assertEquals("icon ", icon1, button.getIcon());
         action1.putValue(Action.SMALL_ICON, icon2);
         assertEquals("icon ", icon2, button.getIcon());
         button.setIcon(icon2);
         action1.putValue(Action.SMALL_ICON, null);
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
 
         if (isHarmony()) {
             assertEquals("mnemonic ", 1, button.getMnemonic());
@@ -743,7 +743,7 @@
         action2.putValue(Action.ACCELERATOR_KEY, ks2);
         button.setAction(action2);
         action1.putValue(Action.SHORT_DESCRIPTION, text4);
-        assertEquals("ToolTipText ", null, button.getToolTipText());
+        assertNull("ToolTipText ", button.getToolTipText());
         if (isHarmony()) {
             action2.putValue(Action.SHORT_DESCRIPTION, text4);
             assertEquals("ToolTipText ", text4, button.getToolTipText());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JMenuTest.java Fri Oct 13 03:41:21 2006
@@ -109,7 +109,7 @@
      */
     public void testJMenu() {
         assertTrue("default buttonModel ", button.getModel() instanceof DefaultButtonModel);
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
         assertEquals("text ", "", button.getText());
         assertFalse("default FocusPainted", menuItem.isFocusPainted());
         assertTrue(menuItem.isFocusable());
@@ -136,7 +136,7 @@
         String text = "texttext";
         button = menuItem = menu = new JMenu(text);
         assertTrue("default buttonModel ", button.getModel() instanceof DefaultButtonModel);
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
         assertEquals("text ", text, button.getText());
         assertFalse("default FocusPainted", menuItem.isFocusPainted());
         assertEquals(menu, menuItem.getComponent());
@@ -166,7 +166,7 @@
         String text = "texttext";
         button = menuItem = menu = new JMenu(text, true);
         assertTrue("default buttonModel ", button.getModel() instanceof DefaultButtonModel);
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
         assertEquals("text ", text, button.getText());
         assertFalse("default FocusPainted", menuItem.isFocusPainted());
         assertEquals(menu, menuItem.getComponent());
@@ -215,8 +215,8 @@
         assertEquals("text ", text, menuItem.getText());
         assertEquals("action", action, menuItem.getAction());
         assertEquals("command ", command, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", true, menuItem.isEnabled());
+        assertFalse("selected ", menuItem.isSelected());
+        assertTrue("enabled ", menuItem.isEnabled());
         assertNull("accelerator ", menuItem.getAccelerator());
         assertTrue(menuItem.isFocusable());
         assertEquals(200, menu.getDelay());
@@ -228,18 +228,18 @@
         assertEquals("text ", text, menuItem.getText());
         assertEquals("action", action, menuItem.getAction());
         assertEquals("command ", command, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", false, menuItem.isEnabled());
+        assertFalse("selected ", menuItem.isSelected());
+        assertFalse("enabled ", menuItem.isEnabled());
         assertFalse("default FocusPainted", menuItem.isFocusPainted());
 
         button = menuItem = menu = new JMenu((Action)null);
 
-        assertEquals("icon ", null, menuItem.getIcon());
-        assertEquals("text ", null, menuItem.getText());
-        assertEquals("action", null, menuItem.getAction());
-        assertEquals("command ", null, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", true, menuItem.isEnabled());
+        assertNull("icon ", menuItem.getIcon());
+        assertNull("text ", menuItem.getText());
+        assertNull("action", menuItem.getAction());
+        assertNull("command ", menuItem.getActionCommand());
+        assertFalse("selected ", menuItem.isSelected());
+        assertTrue("enabled ", menuItem.isEnabled());
 
         assertEquals(menu, menuItem.getComponent());
         assertEquals(0, menu.getItemCount());
@@ -775,8 +775,8 @@
         assertEquals("text ", text, menuItem1.getText());
         assertNull("action", menuItem1.getAction());
         assertEquals("command ", text, menuItem1.getActionCommand());
-        assertEquals("selected ", false, menuItem1.isSelected());
-        assertEquals("enabled ", true, menuItem1.isEnabled());
+        assertFalse("selected ", menuItem1.isSelected());
+        assertTrue("enabled ", menuItem1.isEnabled());
         assertNull("accelerator ", menuItem1.getAccelerator());
 
         JMenuItem menuItem2 = menu.createActionComponent(action);
@@ -785,8 +785,8 @@
         assertEquals("text ", text, menuItem2.getText());
         assertNull("action", menuItem1.getAction());
         assertEquals("command ", text, menuItem2.getActionCommand());
-        assertEquals("selected ", false, menuItem2.isSelected());
-        assertEquals("enabled ", true, menuItem2.isEnabled());
+        assertFalse("selected ", menuItem2.isSelected());
+        assertTrue("enabled ", menuItem2.isEnabled());
         assertNull("accelerator ", menuItem2.getAccelerator());
     }
 
@@ -890,7 +890,7 @@
     public void testGetMenuComponent() {
         JMenuItem item1 = new JMenuItem();
         JMenuItem item2 = new JMenuItem();
-        assertEquals(null, menu.getMenuComponent(0));
+        assertNull(menu.getMenuComponent(0));
         menu.add(item1);
         assertEquals(item1, menu.getMenuComponent(0));
         menu.add(item2);
@@ -914,7 +914,7 @@
     public void testGetItem() {
         JMenuItem item1 = new JMenuItem();
         JMenuItem item2 = new JMenuItem();
-        assertEquals(null, menu.getItem(0));
+        assertNull(menu.getItem(0));
         menu.add(item1);
         assertEquals(item1, menu.getItem(0));
         menu.add(item2);
@@ -1314,26 +1314,26 @@
         button.setAction(action1);
 
         assertEquals("action ", action1, button.getAction());
-        assertEquals("enabled ", true, button.isEnabled());
-        assertEquals("enabled ", true, action1.isEnabled());
+        assertTrue("enabled ", button.isEnabled());
+        assertTrue("enabled ", action1.isEnabled());
         action1.setEnabled(false);
         button.isEnabled();
-        assertEquals("enabled ", false, button.isEnabled());
-        assertEquals("enabled ", false, action1.isEnabled());
+        assertFalse("enabled ", button.isEnabled());
+        assertFalse("enabled ", action1.isEnabled());
 
         assertEquals("icon ", icon1, button.getIcon());
         action1.putValue(Action.SMALL_ICON, icon2);
         assertEquals("icon ", icon2, button.getIcon());
         button.setIcon(icon2);
         action1.putValue(Action.SMALL_ICON, null);
-        assertEquals("icon ", null, button.getIcon());
+        assertNull("icon ", button.getIcon());
 
         if (isHarmony()) {
             assertEquals("mnemonic ", 1, button.getMnemonic());
             action1.putValue(Action.MNEMONIC_KEY, new Integer(27));
             assertEquals("mnemonic ", 27, button.getMnemonic());
             action1.putValue(Action.ACCELERATOR_KEY, ks1);
-            assertEquals("accelerator ", null, menuItem.getAccelerator());
+            assertNull("accelerator ", menuItem.getAccelerator());
         }
 
         assertEquals("text ", text1, button.getText());
@@ -1349,11 +1349,11 @@
         action2.putValue(Action.ACCELERATOR_KEY, ks2);
         button.setAction(action2);
         action1.putValue(Action.SHORT_DESCRIPTION, text4);
-        assertEquals("ToolTipText ", null, button.getToolTipText());
+        assertNull("ToolTipText ", button.getToolTipText());
         if (isHarmony()) {
             action2.putValue(Action.SHORT_DESCRIPTION, text4);
             assertEquals("ToolTipText ", text4, button.getToolTipText());
-            assertEquals("accelerator ", null, menuItem.getAccelerator());
+            assertNull("accelerator ", menuItem.getAccelerator());
         }
 
     }



Mime
View raw message