public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* Patch: DnDTest addition
@ 2006-08-14 17:57 Lillian Angel
  0 siblings, 0 replies; only message in thread
From: Lillian Angel @ 2006-08-14 17:57 UTC (permalink / raw)
  To: mauve-patches

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

I added a couple more checks to the DnDTest.

2006-08-13  Lillian Angel  <langel@redhat.com>

        * gnu/testlet/java/awt/dnd/DnDTest.java:
        Added more fields
        (test): Added more checks.
        (actionPerformed): Set appropriate field to true;
        (dragExit): Likewise.
        (dropActionChanged): Likewise.
        (dragExit): Likewise.
        (dropActionChanged): Likewise.


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

Index: gnu/testlet/java/awt/dnd/DnDTest.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/dnd/DnDTest.java,v
retrieving revision 1.2
diff -u -r1.2 DnDTest.java
--- gnu/testlet/java/awt/dnd/DnDTest.java	8 Aug 2006 15:49:55 -0000	1.2
+++ gnu/testlet/java/awt/dnd/DnDTest.java	14 Aug 2006 17:54:07 -0000
@@ -70,6 +70,11 @@
   boolean dragOverTar;
   boolean drop;
   boolean finished;
+  boolean actionPerformed;
+  boolean dragExit;
+  boolean dropActionChanged;
+  boolean dragExitTar;
+  boolean dropActionChangedTar;
   
   public synchronized void test(TestHarness h)
   {
@@ -118,6 +123,11 @@
       harness.check(dragOver);
       harness.check(dragOverTar);
       harness.check(drop);
+      harness.check(!actionPerformed);
+      harness.check(!dragExit);
+      harness.check(!dropActionChanged);
+      harness.check(!dragExitTar);
+      harness.check(!dropActionChangedTar);
     }
     
     void doDnD()
@@ -182,7 +192,6 @@
             {
                 System.out.println(e);
             }
-
         }
     }
     
@@ -191,6 +200,7 @@
       Button b = (Button) e.getSource();
       b.setLabel("");
       source.setText("Drag and drop me to the following Button");
+      actionPerformed = true;
     }
 
     public void dragEnter(DropTargetDragEvent e)
@@ -200,6 +210,7 @@
 
     public void dragExit(DropTargetEvent e)
     {
+      dragExit = true;
     }
 
     public void dragOver(DropTargetDragEvent e)
@@ -243,6 +254,7 @@
 
     public void dropActionChanged(DropTargetDragEvent e)
     {
+      dropActionChanged = true;
     }
   }
 
@@ -301,6 +313,7 @@
 
     public void dragExit(DragSourceEvent e)
     {
+      dragExitTar = true;
     }
 
     public void dragOver(DragSourceDragEvent e)
@@ -310,6 +323,7 @@
 
     public void dropActionChanged(DragSourceDragEvent e)
     {
+      dropActionChangedTar = true;
     }
   }
 }

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

only message in thread, other threads:[~2006-08-14 17:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-14 17:57 Patch: DnDTest addition 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).