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(KeyName.DOWN_LEFT, "DownLeft"); | 13 expect(KeyName.DOWN_LEFT, "DownLeft"); |
14 expect(KeyName.FN, "Fn"); | 14 expect(KeyName.FN, "Fn"); |
15 expect(KeyName.F1, "F1"); | 15 expect(KeyName.F1, "F1"); |
16 expect(KeyName.META, "Meta"); | 16 expect(KeyName.META, "Meta"); |
17 expect(KeyName.MEDIA_NEXT_TRACK, "MediaNextTrack"); | 17 expect(KeyName.MEDIA_NEXT_TRACK, "MediaNextTrack"); |
18 expect(KeyName.NUM_LOCK, "NumLock"); | 18 expect(KeyName.NUM_LOCK, "NumLock"); |
19 expect(KeyName.PAGE_DOWN, "PageDown"); | 19 expect(KeyName.PAGE_DOWN, "PageDown"); |
20 expect(KeyName.DEAD_IOTA, "DeadIota"); | 20 expect(KeyName.DEAD_IOTA, "DeadIota"); |
21 }); | 21 }); |
22 | 22 |
23 test('keyLocations', () { | 23 test('keyLocations', () { |
24 expect(KeyLocation.STANDARD, 0); | 24 expect(KeyLocation.STANDARD, 0); |
25 expect(KeyLocation.LEFT, 1); | 25 expect(KeyLocation.LEFT, 1); |
26 expect(KeyLocation.RIGHT, 2); | 26 expect(KeyLocation.RIGHT, 2); |
27 expect(KeyLocation.NUMPAD, 3); | 27 expect(KeyLocation.NUMPAD, 3); |
28 expect(KeyLocation.MOBILE, 4); | 28 expect(KeyLocation.MOBILE, 4); |
29 expect(KeyLocation.JOYSTICK, 5); | 29 expect(KeyLocation.JOYSTICK, 5); |
30 }); | 30 }); |
31 } | 31 } |
OLD | NEW |