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