public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* Patch: New BorderLayout test
@ 2006-02-14 14:49 Lillian Angel
  0 siblings, 0 replies; only message in thread
From: Lillian Angel @ 2006-02-14 14:49 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 140 bytes --]

2006-02-14  Lillian Angel <langel@redhat.com>

        * gnu/testlet/java/awt/BorderLayout/layoutContainer.java
        (test0): New test.


[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 1882 bytes --]

Index: gnu/testlet/java/awt/BorderLayout/layoutContainer.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/BorderLayout/layoutContainer.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- gnu/testlet/java/awt/BorderLayout/layoutContainer.java	28 Jun 2005 15:31:35 -0000	1.1
+++ gnu/testlet/java/awt/BorderLayout/layoutContainer.java	14 Feb 2006 14:47:09 -0000	1.2
@@ -44,6 +44,7 @@
    */
   public void test(TestHarness harness)   
   {
+    test0(harness);
     test1(harness);
     test2(harness);
     test3(harness);
@@ -58,6 +59,37 @@
   }
 
   /**
+   * All 5 components.
+   */
+  private void test0(TestHarness harness) 
+  { 
+    harness.checkPoint("test0");
+    JPanel p = new JPanel(new BorderLayout());
+    p.setSize(200, 200);
+    JPanel p1 = new JPanel();
+    p1.setPreferredSize(new Dimension(12, 34));
+    p.add(p1, BorderLayout.CENTER);
+    JPanel p2 = new JPanel();
+    p2.setPreferredSize(new Dimension(10, 54));
+    p.add(p2, BorderLayout.NORTH);
+    JPanel p3 = new JPanel();
+    p3.setPreferredSize(new Dimension(100, 74));
+    p.add(p3, BorderLayout.WEST);
+    JPanel p4 = new JPanel();
+    p4.setPreferredSize(new Dimension(92, 33));
+    p.add(p4, BorderLayout.EAST);
+    JPanel p5 = new JPanel();
+    p5.setPreferredSize(new Dimension(18, 64));
+    p.add(p5, BorderLayout.SOUTH);
+    p.doLayout();
+    harness.check(p1.getBounds(), new Rectangle(100, 54, 8, 82));
+    harness.check(p2.getBounds(), new Rectangle(0, 0, 200, 54));
+    harness.check(p3.getBounds(), new Rectangle(0, 54, 100, 82));
+    harness.check(p4.getBounds(), new Rectangle(108, 54, 92, 82));
+    harness.check(p5.getBounds(), new Rectangle(0, 136, 200, 64));
+  }
+  
+  /**
    * Single component in the center.
    */
   private void test1(TestHarness harness) 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-02-14 14:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-14 14:49 Patch: New BorderLayout test Lillian Angel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).