This is the mail archive of the mauve-patches@sourceware.org mailing list for the Mauve project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: New JLayeredPane test


I comitted this new test for JLayeredPane.addImpl which Classpath
currently fails. It checks the handling of the position argument within
a layer for position == 0 (top position in a layer).

2006-02-01  Roman Kennke  <kennke@aicas.com>

        * gnu/testlet/javax/swing/JLayeredPane/addImpl.java
        (testAddZeroPosition): New test.

/Roman
Index: gnu/testlet/javax/swing/JLayeredPane/addImpl.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/JLayeredPane/addImpl.java,v
retrieving revision 1.2
diff -u -r1.2 addImpl.java
--- gnu/testlet/javax/swing/JLayeredPane/addImpl.java	30 Jan 2006 13:03:26 -0000	1.2
+++ gnu/testlet/javax/swing/JLayeredPane/addImpl.java	1 Feb 2006 10:19:01 -0000
@@ -46,6 +46,7 @@
   {
     testAddSameLayer(harness);
     testAddDifferentLayers(harness);
+    testAddZeroPosition(harness);
   }
 
   /**
@@ -87,4 +88,25 @@
     h.check(l.getComponent(1), p2);
     h.check(l.getComponent(2), p1);
   }
+
+  /**
+   * Tests the addition of 3 components into the same layer and with a position
+   * argument of 0. This should add each component as the top component in
+   * that layer.
+   *
+   * @param h the test harness to use
+   */
+  private void testAddZeroPosition(TestHarness h)
+  {
+    JLayeredPane l = new JLayeredPane();
+    JPanel p1 = new JPanel();
+    JPanel p2 = new JPanel();
+    JPanel p3 = new JPanel();
+    l.add(p1, JLayeredPane.FRAME_CONTENT_LAYER, 0);
+    l.add(p2, JLayeredPane.FRAME_CONTENT_LAYER, 0);
+    l.add(p3, JLayeredPane.FRAME_CONTENT_LAYER, 0);
+    h.check(l.getComponent(0), p3);
+    h.check(l.getComponent(1), p2);
+    h.check(l.getComponent(2), p1);
+  }
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]