* FYI: JTable
@ 2006-09-13 18:19 Tania Bento
[not found] ` <1158858523.2703.43.camel@toothpaste.toronto.redhat.com>
0 siblings, 1 reply; 2+ messages in thread
From: Tania Bento @ 2006-09-13 18:19 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
Hey,
This new test file (committed) tests the width of the cellRect, when the
getCellRect method from javax.swing.JTable is called.
2006-09-13 Tania Bento <tbento@redhat.com>
* gnu/testlet/javax/swing/JTable/getCellRect.java: New test.
Cheers,
Tania
[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 3415 bytes --]
Index: gnu/testlet/javax/swing/JTable/getCellRect.java
===================================================================
RCS file: gnu/testlet/javax/swing/JTable/getCellRect.java
diff -N gnu/testlet/javax/swing/JTable/getCellRect.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/javax/swing/JTable/getCellRect.java 13 Sep 2006 18:18:44 -0000
@@ -0,0 +1,95 @@
+/* test.java -- FIXME: describe
+ Copyright (C) 2006 FIXME: your info here
+This file is part of Mauve.
+
+Mauve is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+Mauve is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Mauve; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+*/
+
+// Tags: FIXME
+
+package gnu.testlet.javax.swing.JTable;
+
+import java.awt.Rectangle;
+
+import javax.swing.JTable;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+public class getCellRect implements Testlet
+{
+
+ public void test(TestHarness harness)
+ {
+ JTable table = new JTable(0, 1);
+ Rectangle rectangle = table.getCellRect(0, 0, false);
+ harness.check(rectangle.x, 0);
+ harness.check(rectangle.y, 0);
+ harness.check(rectangle.width, 75);
+ harness.check(rectangle.height, 0);
+
+ table = new JTable(2, 3);
+ rectangle = table.getCellRect(1, 2, false);
+ harness.check(rectangle.x, 150);
+ harness.check(rectangle.y, 16);
+ harness.check(rectangle.width, 74);
+ harness.check(rectangle.height, 15);
+
+ table = new JTable(2, 3);
+ rectangle = table.getCellRect(0, 2, false);
+ harness.check(rectangle.x, 150);
+ harness.check(rectangle.y, 0);
+ harness.check(rectangle.width, 74);
+ harness.check(rectangle.height, 15);
+
+ table = new JTable(2, 3);
+ rectangle = table.getCellRect(1, 0, false);
+ harness.check(rectangle.x, 0);
+ harness.check(rectangle.y, 16);
+ harness.check(rectangle.width, 74);
+ harness.check(rectangle.height, 15);
+
+ table = new JTable(0, 1);
+ rectangle = table.getCellRect(0, 0, true);
+ harness.check(rectangle.x, 0);
+ harness.check(rectangle.y, 0);
+ harness.check(rectangle.width, 75);
+ harness.check(rectangle.height, 0);
+
+ table = new JTable(2, 3);
+ rectangle = table.getCellRect(1, 2, true);
+ harness.check(rectangle.x, 150);
+ harness.check(rectangle.y, 16);
+ harness.check(rectangle.width, 75);
+ harness.check(rectangle.height, 16);
+
+ table = new JTable(2, 3);
+ rectangle = table.getCellRect(0, 2, true);
+ harness.check(rectangle.x, 150);
+ harness.check(rectangle.y, 0);
+ harness.check(rectangle.width, 75);
+ harness.check(rectangle.height, 16);
+
+ table = new JTable(2, 3);
+ rectangle = table.getCellRect(1, 0, true);
+ harness.check(rectangle.x, 0);
+ harness.check(rectangle.y, 16);
+ harness.check(rectangle.width, 75);
+ harness.check(rectangle.height, 16);
+ }
+
+}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: FYI: JTable
[not found] ` <1158858523.2703.43.camel@toothpaste.toronto.redhat.com>
@ 2006-09-21 17:12 ` Tania Bento
0 siblings, 0 replies; 2+ messages in thread
From: Tania Bento @ 2006-09-21 17:12 UTC (permalink / raw)
To: mauve-patches
[-- Attachment #1: Type: text/plain, Size: 648 bytes --]
I just noticed that the expected value of a test case was incorrect. I
changed it to the correct value and and committed it.
2006-09-21 Tania Bento <tbento@redhat.com>
* gnu/testlet/javax/swing/JTable/getCellRect.java: Changed
expected value of one test case.
On Wed, 2006-09-13 at 14:19 -0400, Tania Bento wrote:
> > Hey,
> >
> > This new test file (committed) tests the width of the cellRect, when the
> > getCellRect method from javax.swing.JTable is called.
> >
> > 2006-09-13 Tania Bento <tbento@redhat.com>
> >
> > * gnu/testlet/javax/swing/JTable/getCellRect.java: New test.
> >
> > Cheers,
> > Tania
[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 725 bytes --]
Index: gnu/testlet/javax/swing/JTable/getCellRect.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/JTable/getCellRect.java,v
retrieving revision 1.2
diff -u -r1.2 getCellRect.java
--- gnu/testlet/javax/swing/JTable/getCellRect.java 13 Sep 2006 20:26:09 -0000 1.2
+++ gnu/testlet/javax/swing/JTable/getCellRect.java 21 Sep 2006 17:08:22 -0000
@@ -39,7 +39,7 @@
Rectangle rectangle = table.getCellRect(0, 0, false);
harness.check(rectangle.x, 0);
harness.check(rectangle.y, 0);
- harness.check(rectangle.width, 75);
+ harness.check(rectangle.width, 0);
harness.check(rectangle.height, 0);
table = new JTable(2, 3);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-21 17:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-13 18:19 FYI: JTable Tania Bento
[not found] ` <1158858523.2703.43.camel@toothpaste.toronto.redhat.com>
2006-09-21 17:12 ` Tania Bento
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).