public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: Point.setLocation() additional checks
@ 2006-06-27 16:28 David Gilbert
  0 siblings, 0 replies; only message in thread
From: David Gilbert @ 2006-06-27 16:28 UTC (permalink / raw)
  To: mauve-patches

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

This patch (committed) adds a few extra checks:

2006-06-27  David Gilbert  <david.gilbert@object-refinery.com>

    * gnu/testlet/java/awt/Point/setLocation.java
    (test): Added new checks.

Regards,

Dave

[-- Attachment #2: diff.txt --]
[-- Type: text/plain, Size: 2067 bytes --]

Index: gnu/testlet/java/awt/Point/setLocation.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Point/setLocation.java,v
retrieving revision 1.1
diff -u -r1.1 setLocation.java
--- gnu/testlet/java/awt/Point/setLocation.java	20 Oct 2004 09:11:29 -0000	1.1
+++ gnu/testlet/java/awt/Point/setLocation.java	27 Jun 2006 16:24:04 -0000
@@ -1,6 +1,6 @@
 // Tags: JDK1.1
 
-// Copyright (C) 2004 David Gilbert <david.gilbert@object-refinery.com>
+// Copyright (C) 2004, 2006, David Gilbert <david.gilbert@object-refinery.com>
 
 // Mauve is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -13,9 +13,9 @@
 // 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, 59 Temple Place - Suite 330,
-// Boston, MA 02111-1307, USA.  */
+// 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.
 
 package gnu.testlet.java.awt.Point;
 
@@ -62,9 +62,30 @@
     p.setLocation(1.2, 2.3);
     harness.check(p.x, 1);
     harness.check(p.y, 2);
+    
+    p.setLocation(1.51, 2.7);
+    harness.check(p.x, 2);
+    harness.check(p.y, 3);
+    
+    p.setLocation(1.5, 2.5);
+    harness.check(p.x, 2);
+    harness.check(p.y, 3);    
+
+    p.setLocation(-1.5, -2.5);
+    harness.check(p.x, -1);
+    harness.check(p.y, -2);    
+
+    p.setLocation(1.499, 2.499);
+    harness.check(p.x, 1);
+    harness.check(p.y, 2);  
+    
+    p.setLocation(Double.NaN, Double.NaN);
+    harness.check(p.x, 0);
+    harness.check(p.y, 0);      
 
     double bigPos = Integer.MAX_VALUE + 10000.0;
     double bigNeg = Integer.MIN_VALUE - 10000.0;
+    
     p.setLocation(bigPos, bigPos);
     harness.check(p.x, Integer.MAX_VALUE);
     harness.check(p.y, Integer.MAX_VALUE);  

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

only message in thread, other threads:[~2006-06-27 16:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-27 16:28 FYI: Point.setLocation() additional checks David Gilbert

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).