check for old-style modifiers in getAWTKeyStroke

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

check for old-style modifiers in getAWTKeyStroke

Thomas Fitzsimmons
Hi,

I added checks for old-style modifiers in
gnu.testlet.java.awt.AWTKeyStroke.getAWTKeyStroke.

Tom

2005-08-20  Thomas Fitzsimmons  <[hidden email]>

        * gnu/testlet/java/awt/AWTKeyStroke/getAWTKeyStroke.java: Also
        check for old-style modifiers.


Index: gnu/testlet/java/awt/AWTKeyStroke/getAWTKeyStroke.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/AWTKeyStroke/getAWTKeyStroke.java,v
retrieving revision 1.2
diff -u -r1.2 getAWTKeyStroke.java
--- gnu/testlet/java/awt/AWTKeyStroke/getAWTKeyStroke.java 13 Feb 2005 14:07:27 -0000 1.2
+++ gnu/testlet/java/awt/AWTKeyStroke/getAWTKeyStroke.java 21 Aug 2005 02:12:05 -0000
@@ -106,14 +106,20 @@
     harness.check(ks, expected);
     
     ks = AWTKeyStroke.getAWTKeyStroke("control DELETE");
+    expected = AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK);
+    harness.check(ks, expected);
     expected = AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_MASK);
     harness.check(ks, expected);
 
     ks = AWTKeyStroke.getAWTKeyStroke("alt shift X");
+    expected = AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK);
+    harness.check(ks, expected);
     expected = AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK);
     harness.check(ks, expected);
   
     ks = AWTKeyStroke.getAWTKeyStroke("alt shift released X");
+    expected = AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK, true);
+    harness.check(ks, expected);
     expected = AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_X, InputEvent.ALT_MASK | InputEvent.SHIFT_MASK, true);
     harness.check(ks, expected);