| 1 | #![allow(non_snake_case)] |
| 2 | |
| 3 | use input_event_codes::{ |
| 4 | SW_CAMERA_LENS_COVER, SW_CNT, SW_DOCK, SW_FRONT_PROXIMITY, SW_HEADPHONE_INSERT, |
| 5 | SW_JACK_PHYSICAL_INSERT, SW_KEYPAD_SLIDE, SW_LID, SW_LINEIN_INSERT, SW_LINEOUT_INSERT, |
| 6 | SW_MACHINE_COVER, SW_MAX, SW_MICROPHONE_INSERT, SW_MUTE_DEVICE, SW_PEN_INSERTED, SW_RFKILL_ALL, |
| 7 | SW_ROTATE_LOCK, SW_TABLET_MODE, SW_VIDEOOUT_INSERT, |
| 8 | }; |
| 9 | |
| 10 | #[test] |
| 11 | fn test_SW_LID() { |
| 12 | assert_eq!(SW_LID!(), 0x00); |
| 13 | } |
| 14 | |
| 15 | #[test] |
| 16 | fn test_SW_TABLET_MODE() { |
| 17 | assert_eq!(SW_TABLET_MODE!(), 0x01); |
| 18 | } |
| 19 | |
| 20 | #[test] |
| 21 | fn test_SW_HEADPHONE_INSERT() { |
| 22 | assert_eq!(SW_HEADPHONE_INSERT!(), 0x02); |
| 23 | } |
| 24 | |
| 25 | #[test] |
| 26 | fn test_SW_RFKILL_ALL() { |
| 27 | assert_eq!(SW_RFKILL_ALL!(), 0x03); |
| 28 | } |
| 29 | |
| 30 | #[test] |
| 31 | fn test_SW_MICROPHONE_INSERT() { |
| 32 | assert_eq!(SW_MICROPHONE_INSERT!(), 0x04); |
| 33 | } |
| 34 | |
| 35 | #[test] |
| 36 | fn test_SW_DOCK() { |
| 37 | assert_eq!(SW_DOCK!(), 0x05); |
| 38 | } |
| 39 | |
| 40 | #[test] |
| 41 | fn test_SW_LINEOUT_INSERT() { |
| 42 | assert_eq!(SW_LINEOUT_INSERT!(), 0x06); |
| 43 | } |
| 44 | |
| 45 | #[test] |
| 46 | fn test_SW_JACK_PHYSICAL_INSERT() { |
| 47 | assert_eq!(SW_JACK_PHYSICAL_INSERT!(), 0x07); |
| 48 | } |
| 49 | |
| 50 | #[test] |
| 51 | fn test_SW_VIDEOOUT_INSERT() { |
| 52 | assert_eq!(SW_VIDEOOUT_INSERT!(), 0x08); |
| 53 | } |
| 54 | |
| 55 | #[test] |
| 56 | fn test_SW_CAMERA_LENS_COVER() { |
| 57 | assert_eq!(SW_CAMERA_LENS_COVER!(), 0x09); |
| 58 | } |
| 59 | |
| 60 | #[test] |
| 61 | fn test_SW_KEYPAD_SLIDE() { |
| 62 | assert_eq!(SW_KEYPAD_SLIDE!(), 0x0a); |
| 63 | } |
| 64 | |
| 65 | #[test] |
| 66 | fn test_SW_FRONT_PROXIMITY() { |
| 67 | assert_eq!(SW_FRONT_PROXIMITY!(), 0x0b); |
| 68 | } |
| 69 | |
| 70 | #[test] |
| 71 | fn test_SW_ROTATE_LOCK() { |
| 72 | assert_eq!(SW_ROTATE_LOCK!(), 0x0c); |
| 73 | } |
| 74 | |
| 75 | #[test] |
| 76 | fn test_SW_LINEIN_INSERT() { |
| 77 | assert_eq!(SW_LINEIN_INSERT!(), 0x0d); |
| 78 | } |
| 79 | |
| 80 | #[test] |
| 81 | fn test_SW_MUTE_DEVICE() { |
| 82 | assert_eq!(SW_MUTE_DEVICE!(), 0x0e); |
| 83 | } |
| 84 | |
| 85 | #[test] |
| 86 | fn test_SW_PEN_INSERTED() { |
| 87 | assert_eq!(SW_PEN_INSERTED!(), 0x0f); |
| 88 | } |
| 89 | |
| 90 | #[test] |
| 91 | fn test_SW_MACHINE_COVER() { |
| 92 | assert_eq!(SW_MACHINE_COVER!(), 0x10); |
| 93 | } |
| 94 | |
| 95 | #[test] |
| 96 | fn test_SW_MAX() { |
| 97 | assert_eq!(SW_MAX!(), 0x10); |
| 98 | } |
| 99 | |
| 100 | #[test] |
| 101 | fn test_SW_CNT() { |
| 102 | assert_eq!(SW_CNT!(), (SW_MAX!() + 1)); |
| 103 | } |