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]

Patch: DnDTest addition


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.

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;
     }
   }
 }

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