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: CardLayout test


Hey,

This patch adds a new test to CardLayout's maximumLayoutSize(Component)
method.

Cheers,
Tania

2007-01-03  Tania Bento  <tbento@redhat.com>

        * gnu/testlet/java/awt/CardLayout/testMaximumLayoutSize.java:
Added
        a new test.

Index: gnu/testlet/java/awt/CardLayout/testMaximumLayoutSize.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/CardLayout/testMaximumLayoutSize.java,v
retrieving revision 1.1
diff -u -r1.1 testMaximumLayoutSize.java
--- gnu/testlet/java/awt/CardLayout/testMaximumLayoutSize.java	18 Oct 2006 21:41:06 -0000	1.1
+++ gnu/testlet/java/awt/CardLayout/testMaximumLayoutSize.java	3 Jan 2007 19:01:10 -0000
@@ -1,5 +1,5 @@
 /* testMaximumLayout.java 
-   Copyright (C) 2006 Red Hat
+   Copyright (C) 2006 Red Hat, 2007 Red Hat
 This file is part of Mauve.
 
 Mauve is free software; you can redistribute it and/or modify
@@ -25,6 +25,7 @@
 
 import java.awt.CardLayout;
 import java.awt.Dimension;
+import java.awt.Frame;
 
 import gnu.testlet.TestHarness;
 import gnu.testlet.Testlet;
@@ -37,6 +38,11 @@
     CardLayout layout = new CardLayout();
     harness.check(layout.maximumLayoutSize(null), 
                   new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE)); 
+    
+    Frame frame = new Frame();
+    harness.check(frame.getComponentCount(), 0);
+    harness.check(layout.maximumLayoutSize(frame),
+                  new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE));
   }
 
 }

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