You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by nd...@apache.org on 2006/11/26 01:04:16 UTC

svn commit: r479240 [21/28] - /harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToggleButtonTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToggleButtonTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToggleButtonTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToggleButtonTest.java Sat Nov 25 16:04:10 2006
@@ -24,12 +24,10 @@
 
 import java.awt.event.ActionEvent;
 import java.awt.image.BufferedImage;
-
 import javax.accessibility.AccessibleRole;
 import javax.swing.plaf.ButtonUI;
 
 public class JToggleButtonTest extends SwingTestCase {
-
     protected JToggleButton button;
 
     public static void main(final String[] args) {
@@ -39,25 +37,27 @@
     /*
      * @see AbstractButtonTest#setUp()
      */
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         button = new JToggleButton();
     }
 
     /*
      * @see AbstractButtonTest#tearDown()
      */
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
 
     public void testGetAccessibleContext() {
-        boolean assertedValue = (button.getAccessibleContext() != null &&
-                button.getAccessibleContext().getClass().getName().equals("javax.swing.JToggleButton$AccessibleJToggleButton"));
-
-        assertTrue("AccessibleContext created properly ",  assertedValue);
-        assertEquals("AccessibleRole", AccessibleRole.TOGGLE_BUTTON, button.getAccessibleContext().getAccessibleRole());
+        boolean assertedValue = (button.getAccessibleContext() != null && button
+                .getAccessibleContext().getClass().getName().equals(
+                        "javax.swing.JToggleButton$AccessibleJToggleButton"));
+        assertTrue("AccessibleContext created properly ", assertedValue);
+        assertEquals("AccessibleRole", AccessibleRole.TOGGLE_BUTTON, button
+                .getAccessibleContext().getAccessibleRole());
     }
 
     public void testParamString() {
@@ -71,10 +71,8 @@
     public void testUpdateUI() {
         ButtonUI ui = new ButtonUI() {
         };
-
         button.setUI(ui);
         assertEquals(ui, button.getUI());
-
         button.updateUI();
         assertNotSame(ui, button.getUI());
     }
@@ -89,18 +87,16 @@
         String text2 = "texttext2";
         boolean state1 = true;
         boolean state2 = false;
-
         button = new JToggleButton(text1, icon1, state1);
         assertEquals("icon ", icon1, button.getIcon());
         assertEquals("text ", text1, button.getText());
         assertEquals("selected ", state1, button.isSelected());
-
         button = new JToggleButton(text2, icon2, state2);
         assertEquals("icon ", icon2, button.getIcon());
         assertEquals("text ", text2, button.getText());
         assertEquals("selected ", state2, button.isSelected());
-
-        assertTrue("button model is of the proper type", button.getModel() instanceof JToggleButton.ToggleButtonModel);
+        assertTrue("button model is of the proper type",
+                button.getModel() instanceof JToggleButton.ToggleButtonModel);
     }
 
     /*
@@ -112,18 +108,16 @@
         String text1 = "texttext1";
         String text2 = "texttext2";
         boolean state2 = false;
-
         button = new JToggleButton(text1, icon1);
         assertEquals("icon ", icon1, button.getIcon());
         assertEquals("text ", text1, button.getText());
         assertEquals("selected ", state2, button.isSelected());
-
         button = new JToggleButton(text2, icon2);
         assertEquals("icon ", icon2, button.getIcon());
         assertEquals("text ", text2, button.getText());
         assertEquals("selected ", state2, button.isSelected());
-
-        assertTrue("button model is of the proper type", button.getModel() instanceof JToggleButton.ToggleButtonModel);
+        assertTrue("button model is of the proper type",
+                button.getModel() instanceof JToggleButton.ToggleButtonModel);
     }
 
     /*
@@ -136,18 +130,16 @@
         String text2 = "";
         boolean state1 = true;
         boolean state2 = false;
-
         button = new JToggleButton(icon1, state1);
         assertEquals("icon ", icon1, button.getIcon());
         assertEquals("text ", text1, button.getText());
         assertEquals("selected ", state1, button.isSelected());
-
         button = new JToggleButton(icon2, state2);
         assertEquals("icon ", icon2, button.getIcon());
         assertEquals("text ", text2, button.getText());
         assertEquals("selected ", state2, button.isSelected());
-
-        assertTrue("button model is of the proper type", button.getModel() instanceof JToggleButton.ToggleButtonModel);
+        assertTrue("button model is of the proper type",
+                button.getModel() instanceof JToggleButton.ToggleButtonModel);
     }
 
     /*
@@ -160,18 +152,16 @@
         String text2 = "";
         boolean state1 = false;
         boolean state2 = false;
-
         button = new JToggleButton(icon1);
         assertEquals("icon ", icon1, button.getIcon());
         assertEquals("text ", text1, button.getText());
         assertEquals("selected ", state1, button.isSelected());
-
         button = new JToggleButton(icon2);
         assertEquals("icon ", icon2, button.getIcon());
         assertEquals("text ", text2, button.getText());
         assertEquals("selected ", state2, button.isSelected());
-
-        assertTrue("button model is of the proper type", button.getModel() instanceof JToggleButton.ToggleButtonModel);
+        assertTrue("button model is of the proper type",
+                button.getModel() instanceof JToggleButton.ToggleButtonModel);
     }
 
     /*
@@ -180,7 +170,7 @@
     public void testJToggleButtonAction() {
         final String command = "dnammoc";
         class MyAction extends AbstractAction {
-            public boolean performed = false;
+            private static final long serialVersionUID = 1L;
 
             public MyAction(final String text, final Icon icon) {
                 super(text, icon);
@@ -188,41 +178,36 @@
             }
 
             public void actionPerformed(final ActionEvent e) {
-                performed = true;
             }
-        };
+        }
+        ;
         Icon icon = new ImageIcon(new BufferedImage(20, 20, BufferedImage.TYPE_BYTE_GRAY));
         String text = "texttext";
         MyAction action = new MyAction(text, icon);
         button = new JToggleButton(action);
-
         assertEquals("icon ", icon, button.getIcon());
         assertEquals("text ", text, button.getText());
         assertEquals("action", action, button.getAction());
         assertEquals("command ", command, button.getActionCommand());
         assertFalse("selected ", button.isSelected());
         assertTrue("enabled ", button.isEnabled());
-
         action.setEnabled(false);
         button = new JToggleButton(action);
-
         assertEquals("icon ", icon, button.getIcon());
         assertEquals("text ", text, button.getText());
         assertEquals("action", action, button.getAction());
         assertEquals("command ", command, button.getActionCommand());
         assertFalse("selected ", button.isSelected());
         assertFalse("enabled ", button.isEnabled());
-
-        button = new JToggleButton((Action)null);
-
+        button = new JToggleButton((Action) null);
         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);
+        assertTrue("button model is of the proper type",
+                button.getModel() instanceof JToggleButton.ToggleButtonModel);
     }
 
     /*
@@ -235,18 +220,16 @@
         String text2 = "texttext2";
         boolean state1 = true;
         boolean state2 = false;
-
         button = new JToggleButton(text1, state1);
         assertEquals("icon ", icon1, button.getIcon());
         assertEquals("text ", text1, button.getText());
         assertEquals("selected ", state1, button.isSelected());
-
         button = new JToggleButton(text2, state2);
         assertEquals("icon ", icon2, button.getIcon());
         assertEquals("text ", text2, button.getText());
         assertEquals("selected ", state2, button.isSelected());
-
-        assertTrue("button model is of the proper type", button.getModel() instanceof JToggleButton.ToggleButtonModel);
+        assertTrue("button model is of the proper type",
+                button.getModel() instanceof JToggleButton.ToggleButtonModel);
     }
 
     /*
@@ -259,18 +242,16 @@
         String text2 = "texttext2";
         boolean state1 = false;
         boolean state2 = false;
-
         button = new JToggleButton(text1);
         assertEquals("icon ", icon1, button.getIcon());
         assertEquals("text ", text1, button.getText());
         assertEquals("selected ", state1, button.isSelected());
-
         button = new JToggleButton(text2);
         assertEquals("icon ", icon2, button.getIcon());
         assertEquals("text ", text2, button.getText());
         assertEquals("selected ", state2, button.isSelected());
-
-        assertTrue("button model is of the proper type", button.getModel() instanceof JToggleButton.ToggleButtonModel);
+        assertTrue("button model is of the proper type",
+                button.getModel() instanceof JToggleButton.ToggleButtonModel);
     }
 
     /*
@@ -280,13 +261,12 @@
         Icon icon1 = null;
         String text1 = "";
         boolean state1 = false;
-
         button = new JToggleButton();
         assertEquals("icon ", icon1, button.getIcon());
         assertEquals("text ", text1, button.getText());
         assertEquals("selected ", state1, button.isSelected());
-
-        assertTrue("button model is of the proper type", button.getModel() instanceof JToggleButton.ToggleButtonModel);
+        assertTrue("button model is of the proper type",
+                button.getModel() instanceof JToggleButton.ToggleButtonModel);
     }
 
     /*

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBarTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBarTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBarTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBarTest.java Sat Nov 25 16:04:10 2006
@@ -24,20 +24,21 @@
 import java.awt.FlowLayout;
 import java.awt.Insets;
 import java.awt.event.ActionEvent;
-
 import javax.swing.plaf.ComponentUI;
 import javax.swing.plaf.basic.BasicToolBarUI;
 
 public class JToolBarTest extends SwingTestCase {
     private static final int INVALID_ORIENTATION = 4;
+
     private JToolBar toolBar;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         toolBar = new JToolBar();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -47,8 +48,7 @@
     }
 
     public void testGetAccessibleContext() {
-        assertTrue(toolBar.getAccessibleContext()
-                   instanceof JToolBar.AccessibleJToolBar);
+        assertTrue(toolBar.getAccessibleContext() instanceof JToolBar.AccessibleJToolBar);
     }
 
     public void testAddImpl() {
@@ -61,11 +61,9 @@
 
     public void testSetLayout() {
         assertNotNull(toolBar.getLayout());
-
         FlowLayout layout = new FlowLayout();
         toolBar.setLayout(layout);
         assertSame(layout, toolBar.getLayout());
-
         toolBar.setLayout(null);
         assertNull(toolBar.getLayout());
     }
@@ -80,7 +78,6 @@
 
     public void testUpdateUI() {
         toolBar.updateUI();
-
         ComponentUI ui1 = toolBar.getUI();
         ComponentUI ui2 = UIManager.getUI(toolBar);
         // at least names of classes must be the same
@@ -90,23 +87,22 @@
     public void testJToolBar() {
         toolBar = new JToolBar();
         toolBar.setName(null);
-        assertEquals(JToolBar.HORIZONTAL, toolBar.getOrientation());
+        assertEquals(SwingConstants.HORIZONTAL, toolBar.getOrientation());
         assertNull(toolBar.getName());
         assertNotNull(toolBar.getUI());
         assertNotNull(toolBar.getLayout());
     }
 
     public void testJToolBarint() {
-        toolBar = new JToolBar(JToolBar.VERTICAL);
-        assertEquals(JToolBar.VERTICAL, toolBar.getOrientation());
+        toolBar = new JToolBar(SwingConstants.VERTICAL);
+        assertEquals(SwingConstants.VERTICAL, toolBar.getOrientation());
         assertNull(toolBar.getName());
         assertNotNull(toolBar.getUI());
         assertNotNull(toolBar.getLayout());
-
-        toolBar = new JToolBar(JToolBar.HORIZONTAL);
-        assertEquals(JToolBar.HORIZONTAL, toolBar.getOrientation());
-
+        toolBar = new JToolBar(SwingConstants.HORIZONTAL);
+        assertEquals(SwingConstants.HORIZONTAL, toolBar.getOrientation());
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 toolBar = new JToolBar(INVALID_ORIENTATION);
             }
@@ -116,18 +112,18 @@
     public void testJToolBarString() {
         toolBar = new JToolBar("tb1");
         assertEquals("tb1", toolBar.getName());
-        assertEquals(JToolBar.HORIZONTAL, toolBar.getOrientation());
+        assertEquals(SwingConstants.HORIZONTAL, toolBar.getOrientation());
         assertNotNull(toolBar.getUI());
         assertNotNull(toolBar.getLayout());
     }
 
     public void testJToolBarStringint() {
-        toolBar = new JToolBar("tb1", JToolBar.HORIZONTAL);
+        toolBar = new JToolBar("tb1", SwingConstants.HORIZONTAL);
         assertEquals("tb1", toolBar.getName());
         assertNotNull(toolBar.getUI());
         assertNotNull(toolBar.getLayout());
-
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 toolBar = new JToolBar("tb2", INVALID_ORIENTATION);
             }
@@ -146,7 +142,6 @@
         JComponent c2 = new JLabel("2");
         toolBar.add(c2);
         toolBar.addSeparator();
-
         assertEquals(0, toolBar.getComponentIndex(c1));
         assertEquals(1, toolBar.getComponentIndex(c2));
         assertEquals(2, toolBar.getComponentIndex(toolBar.getComponentAtIndex(2)));
@@ -159,7 +154,6 @@
         JComponent c2 = new JLabel("2");
         toolBar.add(c2);
         toolBar.addSeparator();
-
         assertSame(c1, toolBar.getComponentAtIndex(0));
         assertSame(c2, toolBar.getComponentAtIndex(1));
         assertTrue(toolBar.getComponentAtIndex(2) instanceof JToolBar.Separator);
@@ -169,7 +163,6 @@
     public void testSetGetMargin() {
         final Insets defaultMagin = new Insets(0, 0, 0, 0);
         assertEquals(defaultMagin, toolBar.getMargin());
-
         Insets insets = new Insets(1, 2, 3, 4);
         PropertyChangeController controller = new PropertyChangeController();
         toolBar.addPropertyChangeListener("margin", controller);
@@ -177,14 +170,12 @@
         assertTrue(controller.isChanged());
         assertEquals(insets, toolBar.getMargin());
         assertSame(insets, toolBar.getMargin());
-
         toolBar.setMargin(null);
         assertEquals(defaultMagin, toolBar.getMargin());
     }
 
     public void testSetIsBorderPainted() {
         assertTrue(toolBar.isBorderPainted());
-
         PropertyChangeController controller = new PropertyChangeController();
         toolBar.addPropertyChangeListener("borderPainted", controller);
         toolBar.setBorderPainted(false);
@@ -194,7 +185,6 @@
 
     public void testSetIsFloatable() {
         assertTrue(toolBar.isFloatable());
-
         PropertyChangeController controller = new PropertyChangeController();
         toolBar.addPropertyChangeListener("floatable", controller);
         toolBar.setFloatable(false);
@@ -206,15 +196,12 @@
         toolBar.addSeparator();
         PropertyChangeController controller = new PropertyChangeController();
         toolBar.addPropertyChangeListener("orientation", controller);
-        assertEquals(SwingConstants.VERTICAL,
-                     getToolBarSeparatorAtIndex(0).getOrientation());
-
-        toolBar.setOrientation(JToolBar.VERTICAL);
+        assertEquals(SwingConstants.VERTICAL, getToolBarSeparatorAtIndex(0).getOrientation());
+        toolBar.setOrientation(SwingConstants.VERTICAL);
         assertTrue(controller.isChanged());
-        assertEquals(SwingConstants.HORIZONTAL,
-                     getToolBarSeparatorAtIndex(0).getOrientation());
-
+        assertEquals(SwingConstants.HORIZONTAL, getToolBarSeparatorAtIndex(0).getOrientation());
         testExceptionalCase(new IllegalArgumentCase() {
+            @Override
             public void exceptionalAction() throws Exception {
                 toolBar.setOrientation(INVALID_ORIENTATION);
             }
@@ -223,7 +210,6 @@
 
     public void testSetIsRollover() {
         assertFalse(toolBar.isRollover());
-
         PropertyChangeController controller = new PropertyChangeController();
         toolBar.addPropertyChangeListener("JToolBar.isRollover", controller);
         toolBar.setRollover(true);
@@ -234,16 +220,13 @@
     public void testAddSeparator() {
         toolBar.addSeparator();
         assertEquals(1, toolBar.getComponentCount());
-        assertEquals(UIManager.get("ToolBar.separatorSize"),
-                     getToolBarSeparatorAtIndex(0).getSeparatorSize());
-        assertEquals(SwingConstants.VERTICAL,
-                     getToolBarSeparatorAtIndex(0).getOrientation());
-
-        toolBar.setOrientation(JToolBar.VERTICAL);
+        assertEquals(UIManager.get("ToolBar.separatorSize"), getToolBarSeparatorAtIndex(0)
+                .getSeparatorSize());
+        assertEquals(SwingConstants.VERTICAL, getToolBarSeparatorAtIndex(0).getOrientation());
+        toolBar.setOrientation(SwingConstants.VERTICAL);
         toolBar.addSeparator();
         assertEquals(2, toolBar.getComponentCount());
-        assertEquals(SwingConstants.HORIZONTAL,
-                     getToolBarSeparatorAtIndex(1).getOrientation());
+        assertEquals(SwingConstants.HORIZONTAL, getToolBarSeparatorAtIndex(1).getOrientation());
     }
 
     public void testAddSeparatorDimension() {
@@ -251,16 +234,18 @@
         toolBar.addSeparator(size);
         assertEquals(1, toolBar.getComponentCount());
         assertEquals(size, getToolBarSeparatorAtIndex(0).getSeparatorSize());
-
         toolBar.addSeparator(null);
-        assertEquals(UIManager.get("ToolBar.separatorSize"),
-                     getToolBarSeparatorAtIndex(1).getSeparatorSize());
+        assertEquals(UIManager.get("ToolBar.separatorSize"), getToolBarSeparatorAtIndex(1)
+                .getSeparatorSize());
     }
 
     public void testAddAction() {
-        AbstractAction action = new AbstractAction() { {
+        AbstractAction action = new AbstractAction() {
+            private static final long serialVersionUID = 1L;
+            {
                 putValue(Action.NAME, "action");
             }
+
             public void actionPerformed(final ActionEvent e) {
             }
         };
@@ -268,22 +253,23 @@
         assertTrue(toolBar.isAncestorOf(b));
         assertEquals(action.getValue(Action.NAME), b.getText());
         assertSame(action, b.getAction());
-
         action.setEnabled(false);
         assertFalse(b.isEnabled());
     }
 
     public void testCreateActionComponent() {
-        AbstractAction action = new AbstractAction() { {
+        AbstractAction action = new AbstractAction() {
+            private static final long serialVersionUID = 1L;
+            {
                 putValue(Action.NAME, "action");
             }
+
             public void actionPerformed(final ActionEvent e) {
             }
         };
         JButton b = toolBar.createActionComponent(action);
         assertEquals(action.getValue(Action.NAME), b.getText());
         assertNull(b.getAction());
-
         b = toolBar.createActionComponent(null);
         assertEquals("", b.getText());
     }
@@ -294,6 +280,6 @@
     }
 
     private JToolBar.Separator getToolBarSeparatorAtIndex(final int i) {
-        return (JToolBar.Separator)toolBar.getComponentAtIndex(i);
+        return (JToolBar.Separator) toolBar.getComponentAtIndex(i);
     }
 }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBar_SeparatorRTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBar_SeparatorRTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBar_SeparatorRTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBar_SeparatorRTest.java Sat Nov 25 16:04:10 2006
@@ -27,10 +27,12 @@
         super(name);
     }
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBar_SeparatorTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBar_SeparatorTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBar_SeparatorTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolBar_SeparatorTest.java Sat Nov 25 16:04:10 2006
@@ -22,16 +22,16 @@
 
 import java.awt.Dimension;
 
-
 public class JToolBar_SeparatorTest extends SwingTestCase {
     private JToolBar.Separator separator;
 
+    @Override
     protected void setUp() throws Exception {
         super.setUp();
-
         separator = new JToolBar.Separator(new Dimension(5, 10));
     }
 
+    @Override
     protected void tearDown() throws Exception {
         super.tearDown();
     }
@@ -42,21 +42,18 @@
 
     public void testGetMaximumSize() {
         assertEquals(separator.getSeparatorSize(), separator.getMaximumSize());
-
         separator.setOrientation(SwingConstants.VERTICAL);
         assertEquals(separator.getSeparatorSize(), separator.getMaximumSize());
     }
 
     public void testGetMinimumSize() {
         assertEquals(separator.getSeparatorSize(), separator.getMinimumSize());
-
         separator.setOrientation(SwingConstants.VERTICAL);
         assertEquals(separator.getSeparatorSize(), separator.getMinimumSize());
     }
 
     public void testGetPreferredSize() {
         assertEquals(separator.getSeparatorSize(), separator.getPreferredSize());
-
         separator.setOrientation(SwingConstants.VERTICAL);
         assertEquals(separator.getSeparatorSize(), separator.getPreferredSize());
     }
@@ -68,8 +65,7 @@
     public void testSeparator() {
         separator = new JToolBar.Separator();
         assertNotNull(separator.getUI());
-        assertEquals(UIManager.get("ToolBar.separatorSize"),
-                     separator.getSeparatorSize());
+        assertEquals(UIManager.get("ToolBar.separatorSize"), separator.getSeparatorSize());
         assertEquals(SwingConstants.HORIZONTAL, separator.getOrientation());
     }
 
@@ -77,14 +73,11 @@
         Dimension dimension = new Dimension(1, 2);
         separator = new JToolBar.Separator(dimension);
         assertNotNull(separator.getUI());
-        assertEquals(dimension,
-                     separator.getSeparatorSize());
+        assertEquals(dimension, separator.getSeparatorSize());
         assertEquals(SwingConstants.HORIZONTAL, separator.getOrientation());
-
         separator = new JToolBar.Separator(null);
         assertNotNull(separator.getUI());
-        assertEquals(UIManager.get("ToolBar.separatorSize"),
-                     separator.getSeparatorSize());
+        assertEquals(UIManager.get("ToolBar.separatorSize"), separator.getSeparatorSize());
     }
 
     public void testSetGetSeparatorSize() {
@@ -94,7 +87,6 @@
         separator.setSeparatorSize(dimension);
         assertFalse(controller.isChanged());
         assertSame(dimension, separator.getSeparatorSize());
-
         separator.setSeparatorSize(null);
         assertSame(dimension, separator.getSeparatorSize());
     }

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolTipTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolTipTest.java?view=diff&rev=479240&r1=479239&r2=479240
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolTipTest.java (original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/JToolTipTest.java Sat Nov 25 16:04:10 2006
@@ -20,15 +20,16 @@
  */
 package javax.swing;
 
-import javax.swing.plaf.ToolTipUI;
 
 public class JToolTipTest extends SwingTestCase {
     private JToolTip tooltip;
 
+    @Override
     protected void setUp() throws Exception {
         tooltip = new JToolTip();
     }
 
+    @Override
     protected void tearDown() throws Exception {
         tooltip = null;
     }
@@ -39,7 +40,6 @@
 
     public void testGetUI() throws Exception {
         assertNotNull(tooltip.getUI());
-        assertTrue(tooltip.getUI() instanceof ToolTipUI);
         assertTrue(tooltip.getUI() == tooltip.getUI());
     }