This is the mail archive of the mauve-patches@sources.redhat.com 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]

java.awt.Event/AWTEvent constants


I've checked in some tests I wrote a while back for the constants in
java.awt.Event and java.awt.AWTEvent:

2004-10-28  David Gilbert  <david.gilbert@object-refinery.com>

	* gnu/testlet/java/awt/AWTEvent/constants.java: New test.
	* gnu/testlet/java/awt/Event/constants.java: Likewise.

All checks pass. The diff is attached.

Regards,

Dave Gilbert
Index: ChangeLog
===================================================================
RCS file: /cvs/mauve/mauve/ChangeLog,v
retrieving revision 1.711
diff -u -r1.711 ChangeLog
--- ChangeLog	28 Oct 2004 10:54:35 -0000	1.711
+++ ChangeLog	28 Oct 2004 11:18:33 -0000
@@ -1,5 +1,10 @@
 2004-10-28  David Gilbert  <david.gilbert@object-refinery.com>
 
+	* gnu/testlet/java/awt/AWTEvent/constants.java: New test.
+	* gnu/testlet/java/awt/Event/constants.java: Likewise.
+	
+2004-10-28  David Gilbert  <david.gilbert@object-refinery.com>
+
 	* gnu/testlet/java/net/MessageFormat/format14.java: New test.
 	
 2004-10-26  Michael Koch  <konqueror@gmx.de>
Index: gnu/testlet/java/awt/AWTEvent/constants.java
===================================================================
RCS file: gnu/testlet/java/awt/AWTEvent/constants.java
diff -N gnu/testlet/java/awt/AWTEvent/constants.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/java/awt/AWTEvent/constants.java	28 Oct 2004 11:18:34 -0000
@@ -0,0 +1,61 @@
+// Tags: JDK1.4
+
+// Copyright (C) 2004 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
+// 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, 59 Temple Place - Suite 330,
+// Boston, MA 02111-1307, USA.  */
+
+package gnu.testlet.java.awt.AWTEvent;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.AWTEvent;
+
+/**
+ * Verifies constant values for the {@link AWTEvent} class.
+ */
+public class constants implements Testlet {
+
+  /**
+   * Runs the test using the specified harness.
+   * 
+   * @param harness  the test harness (<code>null</code> not permitted).
+   */
+  public void test(TestHarness harness)      
+  {
+    harness.check(AWTEvent.ACTION_EVENT_MASK,	128l);
+    harness.check(AWTEvent.ADJUSTMENT_EVENT_MASK,	256l);
+    harness.check(AWTEvent.COMPONENT_EVENT_MASK, 1l);
+    harness.check(AWTEvent.CONTAINER_EVENT_MASK, 2l);
+    harness.check(AWTEvent.FOCUS_EVENT_MASK, 4l);
+    harness.check(AWTEvent.HIERARCHY_BOUNDS_EVENT_MASK, 65536l);
+    harness.check(AWTEvent.HIERARCHY_EVENT_MASK, 32768l);
+    harness.check(AWTEvent.INPUT_METHOD_EVENT_MASK, 2048l);
+    harness.check(AWTEvent.INVOCATION_EVENT_MASK, 16384l);
+    harness.check(AWTEvent.ITEM_EVENT_MASK, 512l);
+    harness.check(AWTEvent.KEY_EVENT_MASK, 8l);
+    harness.check(AWTEvent.MOUSE_EVENT_MASK, 16l);
+    harness.check(AWTEvent.MOUSE_MOTION_EVENT_MASK, 32l);
+    harness.check(AWTEvent.MOUSE_WHEEL_EVENT_MASK, 131072l);
+    harness.check(AWTEvent.PAINT_EVENT_MASK, 8192l);
+    harness.check(AWTEvent.RESERVED_ID_MAX, 1999);
+    harness.check(AWTEvent.TEXT_EVENT_MASK, 1024l);
+    harness.check(AWTEvent.WINDOW_EVENT_MASK,	64l);
+    harness.check(AWTEvent.WINDOW_FOCUS_EVENT_MASK, 524288l);
+    harness.check(AWTEvent.WINDOW_STATE_EVENT_MASK, 262144l);
+  }
+
+}
Index: gnu/testlet/java/awt/Event/constants.java
===================================================================
RCS file: gnu/testlet/java/awt/Event/constants.java
diff -N gnu/testlet/java/awt/Event/constants.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ gnu/testlet/java/awt/Event/constants.java	28 Oct 2004 11:18:34 -0000
@@ -0,0 +1,104 @@
+// Tags: JDK1.4
+
+// Copyright (C) 2004 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
+// 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, 59 Temple Place - Suite 330,
+// Boston, MA 02111-1307, USA.  */
+
+package gnu.testlet.java.awt.Event;
+
+import gnu.testlet.TestHarness;
+import gnu.testlet.Testlet;
+
+import java.awt.Event;
+
+/**
+ * Verifies constant values for the {@link Event} class.
+ */
+public class constants implements Testlet {
+
+  /**
+   * Runs the test using the specified harness.
+   * 
+   * @param harness  the test harness (<code>null</code> not permitted).
+   */
+  public void test(TestHarness harness)     
+  {
+    harness.check(Event.ACTION_EVENT,	1001);
+    harness.check(Event.ALT_MASK,	8);
+    harness.check(Event.BACK_SPACE, 8);
+    harness.check(Event.CAPS_LOCK, 1022);
+    harness.check(Event.CTRL_MASK, 2);
+    harness.check(Event.DELETE, 127);
+    harness.check(Event.DOWN, 1005);
+    harness.check(Event.END, 1001);
+    harness.check(Event.ENTER, 10);
+    harness.check(Event.ESCAPE, 27);
+    harness.check(Event.F1, 1008);
+    harness.check(Event.F10, 1017);
+    harness.check(Event.F11, 1018);
+    harness.check(Event.F12, 1019);
+    harness.check(Event.F2, 1009);
+    harness.check(Event.F3, 1010);
+    harness.check(Event.F4, 1011);
+    harness.check(Event.F5, 1012);
+    harness.check(Event.F6, 1013);
+    harness.check(Event.F7, 1014);
+    harness.check(Event.F8, 1015);
+    harness.check(Event.F9, 1016);
+    harness.check(Event.GOT_FOCUS, 1004);
+    harness.check(Event.HOME, 1000);
+    harness.check(Event.INSERT, 1025);
+    harness.check(Event.KEY_ACTION, 403);
+    harness.check(Event.KEY_ACTION_RELEASE, 404);
+    harness.check(Event.KEY_PRESS, 401);
+    harness.check(Event.KEY_RELEASE, 402);
+    harness.check(Event.LEFT,	1006);
+    harness.check(Event.LIST_DESELECT, 702);
+    harness.check(Event.LIST_SELECT, 701);
+    harness.check(Event.LOAD_FILE, 1002);
+    harness.check(Event.LOST_FOCUS, 1005);
+    harness.check(Event.META_MASK, 4);
+    harness.check(Event.MOUSE_DOWN, 501);
+    harness.check(Event.MOUSE_DRAG, 506);
+    harness.check(Event.MOUSE_ENTER, 504);
+    harness.check(Event.MOUSE_EXIT, 505);
+    harness.check(Event.MOUSE_MOVE, 503);
+    harness.check(Event.MOUSE_UP, 502);
+    harness.check(Event.NUM_LOCK, 1023);
+    harness.check(Event.PAUSE, 1024);
+    harness.check(Event.PGDN, 1003);
+    harness.check(Event.PGUP, 1002);
+    harness.check(Event.PRINT_SCREEN, 1020);
+    harness.check(Event.RIGHT, 1007);
+    harness.check(Event.SAVE_FILE, 1003);
+    harness.check(Event.SCROLL_ABSOLUTE, 605);
+    harness.check(Event.SCROLL_BEGIN,	606);
+    harness.check(Event.SCROLL_END, 607);
+    harness.check(Event.SCROLL_LINE_DOWN, 602);
+    harness.check(Event.SCROLL_LINE_UP, 601);
+    harness.check(Event.SCROLL_LOCK, 1021);
+    harness.check(Event.SCROLL_PAGE_DOWN,	604);
+    harness.check(Event.SCROLL_PAGE_UP, 603);
+    harness.check(Event.SHIFT_MASK, 1);
+    harness.check(Event.TAB, 9);
+    harness.check(Event.UP, 1004);
+    harness.check(Event.WINDOW_DEICONIFY, 204);
+    harness.check(Event.WINDOW_DESTROY, 201);
+    harness.check(Event.WINDOW_EXPOSE, 202);
+    harness.check(Event.WINDOW_ICONIFY, 203);
+    harness.check(Event.WINDOW_MOVED, 205);
+  }
+}
\ No newline at end of file

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