OLD | NEW |
1 #library('KeyNameLocationTest'); | 1 #library('KeyNameLocationTest'); |
2 #import('../../pkg/unittest/unittest.dart'); | 2 #import('../../pkg/unittest/lib/unittest.dart'); |
3 #import('../../pkg/unittest/html_config.dart'); | 3 #import('../../pkg/unittest/lib/html_config.dart'); |
4 #import('dart:html'); | 4 #import('dart:html'); |
5 | 5 |
6 // Test for existence of some KeyName and KeyLocation constants. | 6 // Test for existence of some KeyName and KeyLocation constants. |
7 | 7 |
8 main() { | 8 main() { |
9 | 9 |
10 useHtmlConfiguration(); | 10 useHtmlConfiguration(); |
11 | 11 |
12 test('keyNames', () { | 12 test('keyNames', () { |
13 Expect.equals("DownLeft", KeyName.DOWN_LEFT); | 13 Expect.equals("DownLeft", KeyName.DOWN_LEFT); |
14 Expect.equals("Fn", KeyName.FN); | 14 Expect.equals("Fn", KeyName.FN); |
15 Expect.equals("F1", KeyName.F1); | 15 Expect.equals("F1", KeyName.F1); |
16 Expect.equals("Meta", KeyName.META); | 16 Expect.equals("Meta", KeyName.META); |
17 Expect.equals("MediaNextTrack", KeyName.MEDIA_NEXT_TRACK); | 17 Expect.equals("MediaNextTrack", KeyName.MEDIA_NEXT_TRACK); |
18 Expect.equals("NumLock", KeyName.NUM_LOCK); | 18 Expect.equals("NumLock", KeyName.NUM_LOCK); |
19 Expect.equals("PageDown", KeyName.PAGE_DOWN); | 19 Expect.equals("PageDown", KeyName.PAGE_DOWN); |
20 Expect.equals("DeadIota", KeyName.DEAD_IOTA); | 20 Expect.equals("DeadIota", KeyName.DEAD_IOTA); |
21 }); | 21 }); |
22 | 22 |
23 test('keyLocations', () { | 23 test('keyLocations', () { |
24 Expect.equals(0, KeyLocation.STANDARD); | 24 Expect.equals(0, KeyLocation.STANDARD); |
25 Expect.equals(1, KeyLocation.LEFT); | 25 Expect.equals(1, KeyLocation.LEFT); |
26 Expect.equals(2, KeyLocation.RIGHT); | 26 Expect.equals(2, KeyLocation.RIGHT); |
27 Expect.equals(3, KeyLocation.NUMPAD); | 27 Expect.equals(3, KeyLocation.NUMPAD); |
28 Expect.equals(4, KeyLocation.MOBILE); | 28 Expect.equals(4, KeyLocation.MOBILE); |
29 Expect.equals(5, KeyLocation.JOYSTICK); | 29 Expect.equals(5, KeyLocation.JOYSTICK); |
30 }); | 30 }); |
31 } | 31 } |
OLD | NEW |