harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r463636 [2/2] - /incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/
Date Fri, 13 Oct 2006 10:41:23 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JOptionPaneTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JOptionPaneTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JOptionPaneTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JOptionPaneTest.java
Fri Oct 13 03:41:21 2006
@@ -81,7 +81,7 @@
         assertEquals("message", "JOptionPane message", pane.getMessage());
         assertEquals("message type", JOptionPane.PLAIN_MESSAGE, pane.getMessageType());
         assertEquals("option type", JOptionPane.DEFAULT_OPTION, pane.getOptionType());
-        assertEquals("icon", null, pane.getIcon());
+        assertNull("icon", pane.getIcon());
         assertTrue("options", pane.getOptions() == null || pane.getOptions().length == 0);
         assertNull("initial value", pane.getInitialValue());
         assertEquals("input value", JOptionPane.UNINITIALIZED_VALUE, pane.getInputValue());
@@ -98,9 +98,9 @@
         assertEquals("message", message, pane.getMessage());
         assertEquals("message type", JOptionPane.PLAIN_MESSAGE, pane.getMessageType());
         assertEquals("option type", JOptionPane.DEFAULT_OPTION, pane.getOptionType());
-        assertEquals("icon", null, pane.getIcon());
+        assertNull("icon", pane.getIcon());
         assertTrue("options", pane.getOptions() == null || pane.getOptions().length == 0);
-        assertEquals("initial value", null, pane.getInitialValue());
+        assertNull("initial value", pane.getInitialValue());
         assertEquals("input value", JOptionPane.UNINITIALIZED_VALUE, pane.getInputValue());
     }
 
@@ -116,9 +116,9 @@
         assertEquals("message", message, pane.getMessage());
         assertEquals("message type", messageType1, pane.getMessageType());
         assertEquals("option type", JOptionPane.DEFAULT_OPTION, pane.getOptionType());
-        assertEquals("icon", null, pane.getIcon());
+        assertNull("icon", pane.getIcon());
         assertTrue("options", pane.getOptions() == null || pane.getOptions().length == 0);
-        assertEquals("initial value", null, pane.getInitialValue());
+        assertNull("initial value", pane.getInitialValue());
         assertEquals("input value", JOptionPane.UNINITIALIZED_VALUE, pane.getInputValue());
 
         boolean thrown = false;
@@ -144,9 +144,9 @@
         assertEquals("message", message, pane.getMessage());
         assertEquals("message type", messageType1, pane.getMessageType());
         assertEquals("option type", optionType1, pane.getOptionType());
-        assertEquals("icon", null, pane.getIcon());
+        assertNull("icon", pane.getIcon());
         assertTrue("options", pane.getOptions() == null || pane.getOptions().length == 0);
-        assertEquals("initial value", null, pane.getInitialValue());
+        assertNull("initial value", pane.getInitialValue());
         assertEquals("input value", JOptionPane.UNINITIALIZED_VALUE, pane.getInputValue());
 
         boolean thrown = false;
@@ -184,7 +184,7 @@
         assertEquals("option type", optionType1, pane.getOptionType());
         assertEquals("icon", icon1, pane.getIcon());
         assertTrue("options", pane.getOptions() == null || pane.getOptions().length == 0);
-        assertEquals("initial value", null, pane.getInitialValue());
+        assertNull("initial value", pane.getInitialValue());
         assertEquals("input value", JOptionPane.UNINITIALIZED_VALUE, pane.getInputValue());
 
         boolean thrown = false;
@@ -234,7 +234,7 @@
         assertEquals("options", options1.length, pane.getOptions().length);
         assertEquals("options", options1[0], pane.getOptions()[0]);
         assertEquals("options", options1[1], pane.getOptions()[1]);
-        assertEquals("initial value", null, pane.getInitialValue());
+        assertNull("initial value", pane.getInitialValue());
         assertEquals("input value", JOptionPane.UNINITIALIZED_VALUE, pane.getInputValue());
 
         boolean thrown = false;
@@ -328,7 +328,7 @@
         assertEquals("options", options1.length, pane.getOptions().length);
         assertEquals("options", options2[0], pane.getOptions()[0]);
         assertEquals("options", options2[1], pane.getOptions()[1]);
-        assertEquals("initial value", null, pane.getInitialValue());
+        assertNull("initial value", pane.getInitialValue());
 
         pane = new JOptionPane(message, messageType1, optionType1, icon1, null, initialSelection);
         assertEquals("message", message, pane.getMessage());
@@ -586,8 +586,8 @@
         JPanel panel = new JPanel();
         JDesktopPane frame = new JDesktopPane();
         String title = "title-title";
-        assertEquals("frame", null, JOptionPane.getDesktopPaneForComponent(null));
-        assertEquals("frame", null, JOptionPane.getDesktopPaneForComponent(panel));
+        assertNull("frame", JOptionPane.getDesktopPaneForComponent(null));
+        assertNull("frame", JOptionPane.getDesktopPaneForComponent(panel));
         frame.add(panel);
         assertEquals("frame", frame, JOptionPane.getDesktopPaneForComponent(panel));
     }
@@ -676,12 +676,12 @@
 
         pane.setIcon(null);
         listener1.checkPropertyFired(pane, "icon", icon2, null);
-        assertEquals("icon", null, pane.getIcon());
+        assertNull("icon", pane.getIcon());
         listener1.reset();
     }
 
     public void testGetIcon() {
-        assertEquals("icon", null, pane.getIcon());
+        assertNull("icon", pane.getIcon());
     }
 
     public void testSetValue() {
@@ -862,7 +862,7 @@
                 Boolean.TRUE);
         assertEquals("SelectionValues", buttons2, pane.getSelectionValues());
         assertTrue("SelectionValues", buttons2 == pane.getSelectionValues());
-        assertEquals("wantsInput", true, pane.getWantsInput());
+        assertTrue("wantsInput", pane.getWantsInput());
 
         pane.setWantsInput(false);
         listener1.reset();
@@ -873,7 +873,7 @@
                 Boolean.TRUE);
         assertEquals("SelectionValues", buttons3, pane.getSelectionValues());
         assertTrue("SelectionValues", buttons3 == pane.getSelectionValues());
-        assertEquals("wantsInput", true, pane.getWantsInput());
+        assertTrue("wantsInput", pane.getWantsInput());
 
         pane.setWantsInput(false);
         listener1.reset();
@@ -883,7 +883,7 @@
                                      Boolean.TRUE);
         assertEquals("SelectionValues", buttons3, pane.getSelectionValues());
         assertTrue("SelectionValues", buttons3 == pane.getSelectionValues());
-        assertEquals("wantsInput", true, pane.getWantsInput());
+        assertTrue("wantsInput", pane.getWantsInput());
 
         pane = new JOptionPane();
         pane.setWantsInput(false);
@@ -985,13 +985,13 @@
         pane.setWantsInput(true);
         listener1.checkPropertyFired(pane, "wantsInput",
                            Boolean.FALSE, Boolean.TRUE);
-        assertEquals("wants input", true, pane.getWantsInput());
+        assertTrue("wants input", pane.getWantsInput());
         listener1.reset();
 
         pane.setWantsInput(false);
         listener1.checkPropertyFired(pane, "wantsInput",
                            Boolean.TRUE, Boolean.FALSE);
-        assertEquals("wants input", false, pane.getWantsInput());
+        assertFalse("wants input", pane.getWantsInput());
         listener1.reset();
 
         pane.setWantsInput(false);
@@ -1000,7 +1000,7 @@
     }
 
     public void testGetWantsInput() {
-        assertEquals("wants input", false, pane.getWantsInput());
+        assertFalse("wants input", pane.getWantsInput());
     }
 
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPanelTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPanelTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPanelTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPanelTest.java
Fri Oct 13 03:41:21 2006
@@ -108,23 +108,23 @@
      */
     public void testJPanelboolean() {
         panel = new JPanel(true);
-        assertTrue(panel.isOpaque() == true);
+        assertTrue(panel.isOpaque());
         assertTrue(panel.getLayout().getClass() == FlowLayout.class);
-        assertTrue(panel.isDoubleBuffered() == true);
+        assertTrue(panel.isDoubleBuffered());
 
         panel = new JPanel(false);
-        assertTrue(panel.isOpaque() == true);
+        assertTrue(panel.isOpaque());
         assertTrue(panel.getLayout().getClass() == FlowLayout.class);
-        assertTrue(panel.isDoubleBuffered() == false);
+        assertFalse(panel.isDoubleBuffered());
     }
 
     /*
      * Class under test for void JPanel()
      */
     public void testJPanel() {
-        assertTrue(panel.isOpaque() == true);
+        assertTrue(panel.isOpaque());
         assertTrue(panel.getLayout().getClass() == FlowLayout.class);
-        assertTrue(panel.isDoubleBuffered() == true);
+        assertTrue(panel.isDoubleBuffered());
     }
 
     /*

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPopupMenuTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPopupMenuTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPopupMenuTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JPopupMenuTest.java
Fri Oct 13 03:41:21 2006
@@ -475,8 +475,8 @@
         assertEquals("text ", text, menuItem.getText());
         assertNull("action", menuItem.getAction());
         assertEquals("command ", text, menuItem.getActionCommand());
-        assertEquals("selected ", false, menuItem.isSelected());
-        assertEquals("enabled ", true, menuItem.isEnabled());
+        assertFalse("selected ", menuItem.isSelected());
+        assertTrue("enabled ", menuItem.isEnabled());
     }
 
     /*

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRadioButtonMenuItemTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRadioButtonMenuItemTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRadioButtonMenuItemTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRadioButtonMenuItemTest.java
Fri Oct 13 03:41:21 2006
@@ -43,7 +43,7 @@
     public void testJRadioButtonMenuItem() {
         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 JRadioButtonMenuItem(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 JRadioButtonMenuItem((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/JRadioButtonTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRadioButtonTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRadioButtonTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRadioButtonTest.java
Fri Oct 13 03:41:21 2006
@@ -117,16 +117,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());
 
         if (isHarmony()) {
             assertEquals("mnemonic ", 1, button.getMnemonic());
@@ -144,7 +144,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());
     }
@@ -180,21 +180,21 @@
         action.setEnabled(false);
         button = new JRadioButton(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 JRadioButton((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());
     }
 
     /*

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRootPaneTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRootPaneTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRootPaneTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JRootPaneTest.java
Fri Oct 13 03:41:21 2006
@@ -112,21 +112,21 @@
     }
 
     public void testSetGetMenuBar() {
-        assertEquals(null, rootPane.getMenuBar());
+        assertNull(rootPane.getMenuBar());
 
         JMenuBar menuBar = new JMenuBar();
         rootPane.setMenuBar(menuBar);
         assertTrue(rootPane.getMenuBar() == menuBar);
 
         rootPane.setMenuBar(null);
-        assertTrue(rootPane.getMenuBar() == null);
+        assertNull(rootPane.getMenuBar());
     }
 
     public void testJRootPaneConstructor() {
         assertTrue(rootPane.getContentPane() != null);
         assertTrue(rootPane.getLayeredPane() != null);
         assertTrue(rootPane.getGlassPane() != null);
-        assertTrue(rootPane.getDefaultButton() == null);
+        assertNull(rootPane.getDefaultButton());
     }
 
     public void testSetGetContentPane() {
@@ -148,7 +148,7 @@
         } catch (IllegalComponentStateException e) {
             thrown = true;
         } finally {
-            assertEquals(true, thrown);
+            assertTrue(thrown);
         }
 
         assertTrue(rootPane.getLayeredPane() != null);
@@ -167,21 +167,21 @@
         } catch (NullPointerException e) {
             thrown = true;
         } finally {
-            assertEquals(true, thrown);
+            assertTrue(thrown);
         }
 
         assertTrue(rootPane.getGlassPane() != null);
     }
 
     public void testSetGetJMenuBar() {
-        assertEquals(null, rootPane.getJMenuBar());
+        assertNull(rootPane.getJMenuBar());
 
         JMenuBar menuBar = new JMenuBar();
         rootPane.setJMenuBar(menuBar);
         assertTrue(rootPane.getJMenuBar() == menuBar);
 
         rootPane.setJMenuBar(null);
-        assertTrue(rootPane.getJMenuBar() == null);
+        assertNull(rootPane.getJMenuBar());
     }
 
     public void testSetGetUI() {
@@ -217,15 +217,15 @@
         } catch (IllegalArgumentException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
 
         // test that this is a bound property
         MyPropertyChangeListener listener = new MyPropertyChangeListener();
         rootPane.addPropertyChangeListener("windowDecorationStyle", listener);
-        assertEquals(false, listener.ok);
+        assertFalse(listener.ok);
         rootPane.setWindowDecorationStyle(JRootPane.ERROR_DIALOG);
-        assertEquals(true, listener.ok);
+        assertTrue(listener.ok);
         frame.dispose();
     }
 
@@ -269,21 +269,21 @@
     }
 
     public void testSetGetDefaultButton() {
-        assertTrue(rootPane.getDefaultButton() == null);
+        assertNull(rootPane.getDefaultButton());
 
         JButton button = new JButton();
         rootPane.setDefaultButton(button);
         assertTrue(rootPane.getDefaultButton() == button);
 
         rootPane.setDefaultButton(null);
-        assertTrue(rootPane.getDefaultButton() == null);
+        assertNull(rootPane.getDefaultButton());
 
         // test that this is a bound property
         MyPropertyChangeListener listener = new MyPropertyChangeListener();
         rootPane.addPropertyChangeListener("defaultButton", listener);
-        assertEquals(false, listener.ok);
+        assertFalse(listener.ok);
         rootPane.setDefaultButton(button);
-        assertEquals(true, listener.ok);
+        assertTrue(listener.ok);
 
         rootPane.setDefaultButton(null);
         button.setDefaultCapable(false);
@@ -368,7 +368,7 @@
         TestRootPane root = new TestRootPane();
         JComponent content = (JComponent)root.createContentPane();
         assertTrue(content != null);
-        assertEquals(true, content.isOpaque());
+        assertTrue(content.isOpaque());
         assertTrue(content.getLayout() instanceof BorderLayout);
     }
 
@@ -379,11 +379,11 @@
         TestRootPane root = new TestRootPane();
         JComponent glass = (JComponent)root.createGlassPane();
         assertTrue(glass != null);
-        assertEquals(false, glass.isVisible());
+        assertFalse(glass.isVisible());
 
         // there is nothing about default opacity in the docs,
         // but it really must be false
-        assertEquals(false, glass.isOpaque());
+        assertFalse(glass.isOpaque());
     }
 
     /*
@@ -405,9 +405,9 @@
                    c instanceof JRootPane.AccessibleJRootPane);
         assertTrue("AccessibleRole is ok",
                    c.getAccessibleRole() == AccessibleRole.ROOT_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());
 
         rootPane.add(new JPanel());
         rootPane.getLayeredPane().add(new JPanel());

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTabbedPaneTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTabbedPaneTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTabbedPaneTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTabbedPaneTest.java
Fri Oct 13 03:41:21 2006
@@ -305,7 +305,7 @@
         assertEquals("result", comp, result);
         assertEquals("index", 3, tabbed.indexOfComponent(comp));
         assertEquals("title", "label", tabbed.getTitleAt(3));
-        assertEquals("tip", null, tabbed.getToolTipTextAt(3));
+        assertNull("tip", tabbed.getToolTipTextAt(3));
 
         class UIResourceButton extends JButton implements UIResource {
         }
@@ -327,7 +327,7 @@
         assertEquals("result", comp, result);
         assertEquals("index", 2, tabbed.indexOfComponent(comp));
         assertEquals("title", "label", tabbed.getTitleAt(2));
-        assertEquals("tip", null, tabbed.getToolTipTextAt(2));
+        assertNull("tip", tabbed.getToolTipTextAt(2));
     }
 
     /*
@@ -358,8 +358,7 @@
         tabbed.add(comp, constraints);
         assertEquals("title", "labelName",
                      tabbed.getTitleAt(tabbed.indexOfComponent(comp)));
-        assertEquals("icon", null,
-                     tabbed.getIconAt(tabbed.indexOfComponent(comp)));
+        assertNull("icon", tabbed.getIconAt(tabbed.indexOfComponent(comp)));
         tabbed.remove(comp);
     }
 
@@ -393,8 +392,7 @@
             assertEquals("title", "labelName",
                          tabbed.getTitleAt(tabbed.indexOfComponent(comp)));
         }
-        assertEquals("icon", null,
-                     tabbed.getIconAt(tabbed.indexOfComponent(comp)));
+        assertNull("icon", tabbed.getIconAt(tabbed.indexOfComponent(comp)));
         tabbed.remove(comp);
     }
 
@@ -408,7 +406,7 @@
         assertEquals("result", comp, result);
         assertEquals("index", 3, tabbed.indexOfComponent(comp));
         assertEquals("title", "label", tabbed.getTitleAt(3));
-        assertEquals("tip", null, tabbed.getToolTipTextAt(3));
+        assertNull("tip", tabbed.getToolTipTextAt(3));
     }
 
     /*
@@ -440,7 +438,7 @@
 
         assertEquals("index", 3, tabbed.indexOfComponent(comp));
         assertEquals("title", "label", tabbed.getTitleAt(3));
-        assertEquals("tip", null, tabbed.getToolTipTextAt(3));
+        assertNull("tip", tabbed.getToolTipTextAt(3));
     }
 
     /*
@@ -453,7 +451,7 @@
         assertEquals("index", 3, tabbed.indexOfComponent(comp));
         assertEquals("title", "label", tabbed.getTitleAt(3));
         assertEquals("icon", someIcon, tabbed.getIconAt(3));
-        assertEquals("tip", null, tabbed.getToolTipTextAt(3));
+        assertNull("tip", tabbed.getToolTipTextAt(3));
     }
 
     /*
@@ -493,7 +491,7 @@
         assertEquals(tabbed.getBoundsAt(1), tabbed.getUI().getTabBounds(tabbed, 1));
 
         tabbed.setUI(null);
-        assertEquals(null, tabbed.getBoundsAt(1));
+        assertNull(tabbed.getBoundsAt(1));
     }
 
     /*
@@ -852,13 +850,13 @@
         tabbed.add(comp);
         int index = tabbed.indexOfComponent(comp);
 
-        assertEquals("by default", null, tabbed.getToolTipTextAt(index));
+        assertNull("by default", tabbed.getToolTipTextAt(index));
 
         tabbed.setToolTipTextAt(index, "newTip");
         assertEquals("newTip", tabbed.getToolTipTextAt(index));
 
         tabbed.setToolTipTextAt(index, null);
-        assertEquals(null, tabbed.getToolTipTextAt(index));
+        assertNull(tabbed.getToolTipTextAt(index));
     }
 
     public void testSetGetUI() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToggleButtonTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToggleButtonTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToggleButtonTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToggleButtonTest.java
Fri Oct 13 03:41:21 2006
@@ -200,8 +200,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 JToggleButton(action);
@@ -210,17 +210,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 JToggleButton((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 JToggleButton.ToggleButtonModel);
     }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBarTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBarTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBarTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBarTest.java
Fri Oct 13 03:41:21 2006
@@ -91,7 +91,7 @@
         toolBar = new JToolBar();
         toolBar.setName(null);
         assertEquals(JToolBar.HORIZONTAL, toolBar.getOrientation());
-        assertEquals(null, toolBar.getName());
+        assertNull(toolBar.getName());
         assertNotNull(toolBar.getUI());
         assertNotNull(toolBar.getLayout());
     }
@@ -99,7 +99,7 @@
     public void testJToolBarint() {
         toolBar = new JToolBar(JToolBar.VERTICAL);
         assertEquals(JToolBar.VERTICAL, toolBar.getOrientation());
-        assertEquals(null, toolBar.getName());
+        assertNull(toolBar.getName());
         assertNotNull(toolBar.getUI());
         assertNotNull(toolBar.getLayout());
 
@@ -163,7 +163,7 @@
         assertSame(c1, toolBar.getComponentAtIndex(0));
         assertSame(c2, toolBar.getComponentAtIndex(1));
         assertTrue(toolBar.getComponentAtIndex(2) instanceof JToolBar.Separator);
-        assertEquals(null, toolBar.getComponentAtIndex(toolBar.getComponentCount()));
+        assertNull(toolBar.getComponentAtIndex(toolBar.getComponentCount()));
     }
 
     public void testSetGetMargin() {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolTipTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolTipTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolTipTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolTipTest.java
Fri Oct 13 03:41:21 2006
@@ -60,7 +60,7 @@
     }
 
     public void testSetGetComponent() throws Exception {
-        assertEquals(null, tooltip.getComponent());
+        assertNull(tooltip.getComponent());
         propertyChangeController = new PropertyChangeController();
         tooltip.addPropertyChangeListener(propertyChangeController);
         JButton button = new JButton("b");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTreeTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTreeTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTreeTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JTreeTest.java
Fri Oct 13 03:41:21 2006
@@ -170,7 +170,7 @@
 
         assertNotNull(tree.selectionModel);
         assertNull(tree.selectionRedirector);
-        assertEquals(null, tree.treeModel);
+        assertNull(tree.treeModel);
         if (isHarmony()) {
             assertNotNull(tree.treeModelListener);
         } else {

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JWindowTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JWindowTest.java?view=diff&rev=463636&r1=463635&r2=463636
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JWindowTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JWindowTest.java
Fri Oct 13 03:41:21 2006
@@ -127,7 +127,7 @@
         window = new JWindow();
 
         assertTrue("owner is not null", window.getOwner() != null);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
         assertTrue(window.getContentPane().getLayout() instanceof BorderLayout);
@@ -187,7 +187,7 @@
         window = new JWindow(owner, gc);
         assertTrue("owner is set", window.getOwner() == owner);
         assertTrue(window.getGraphicsConfiguration() == gc);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
 
@@ -195,7 +195,7 @@
         window = new JWindow(owner, (GraphicsConfiguration)null);
         assertTrue("owner is set", window.getOwner() == owner);
         assertTrue(window.getGraphicsConfiguration() == gc);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
 
@@ -203,7 +203,7 @@
         window = new JWindow(null, gc);
         assertTrue("owner is not null", window.getOwner() != null);
         assertTrue(window.getGraphicsConfiguration() == gc);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
 
@@ -211,7 +211,7 @@
         window = new JWindow(null, null);
         assertTrue("owner is not null", window.getOwner() != null);
         assertTrue(window.getGraphicsConfiguration() == window.getOwner().getGraphicsConfiguration());
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
     }
@@ -225,14 +225,14 @@
 
         // test with the correct owner
         assertTrue("owner is set", window.getOwner() == owner);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
 
         // test with owner = null
         window = new JWindow((Window)null);
         assertTrue("owner is not null", window.getOwner() != null);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
     }
@@ -248,7 +248,7 @@
         // would be nice to test non-default gc here
         window = new JWindow(gc);
         assertTrue("owner is not null", window.getOwner() != null);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
         assertTrue(window.getGraphicsConfiguration() == gc);
@@ -256,7 +256,7 @@
         // test with gc == null
         window = new JWindow((GraphicsConfiguration)null);
         assertTrue("owner is not null", window.getOwner() != null);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
         assertTrue(window.getGraphicsConfiguration() == gc);
@@ -271,14 +271,14 @@
 
         // test with the correct owner
         assertTrue("owner is set", window.getOwner() == owner);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
 
         // test with owner = null
         window = new JWindow((Frame)null);
         assertTrue("owner is not null", window.getOwner() != null);
-        assertEquals("JWindow is invisible by default", false, window.isVisible());
+        assertFalse("JWindow is invisible by default", window.isVisible());
         assertTrue(window.getLocale() == JComponent.getDefaultLocale());
         assertFalse("window is not focusable", window.isFocusableWindow());
     }
@@ -338,7 +338,7 @@
 
         // test setting rootPane to null
         window.setRootPane(null);
-        assertTrue(window.getRootPane() == null);
+        assertNull(window.getRootPane());
         assertTrue("rootPane is removed from the container", window.getComponentCount() ==
0);
     }
 
@@ -375,7 +375,7 @@
         } catch (IllegalComponentStateException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // layeredPane cannot be null, even after setLayeredPane(null)
         assertTrue(window.getLayeredPane() != null);
@@ -394,9 +394,9 @@
                    c instanceof JWindow.AccessibleJWindow);
         assertTrue("AccessibleRole is ok",
                 c.getAccessibleRole() == AccessibleRole.WINDOW);
-        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 == 1",
                    c.getAccessibleChildrenCount() == 1);
     }
@@ -477,7 +477,7 @@
         } catch (IllegalComponentStateException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // contentPane cannot be null, even after setContentPane(null)
         assertTrue(window.getContentPane() != null);
@@ -507,7 +507,7 @@
         } catch (NullPointerException e) {
             ok = true;
         } finally {
-            assertEquals(true, ok);
+            assertTrue(ok);
         }
         // glassPane cannot be null, even after setGlassPane(null)
         assertTrue(window.getGlassPane() != null);



Mime
View raw message