| 1 | #![allow(non_snake_case)] |
| 2 | |
| 3 | use input_event_codes::{ |
| 4 | ABS_BRAKE, ABS_CNT, ABS_DISTANCE, ABS_GAS, ABS_HAT0X, ABS_HAT0Y, ABS_HAT1X, ABS_HAT1Y, |
| 5 | ABS_HAT2X, ABS_HAT2Y, ABS_HAT3X, ABS_HAT3Y, ABS_MAX, ABS_MISC, ABS_MT_BLOB_ID, ABS_MT_DISTANCE, |
| 6 | ABS_MT_ORIENTATION, ABS_MT_POSITION_X, ABS_MT_POSITION_Y, ABS_MT_PRESSURE, ABS_MT_SLOT, |
| 7 | ABS_MT_TOOL_TYPE, ABS_MT_TOOL_X, ABS_MT_TOOL_Y, ABS_MT_TOUCH_MAJOR, ABS_MT_TOUCH_MINOR, |
| 8 | ABS_MT_TRACKING_ID, ABS_MT_WIDTH_MAJOR, ABS_MT_WIDTH_MINOR, ABS_PRESSURE, ABS_PROFILE, |
| 9 | ABS_RESERVED, ABS_RUDDER, ABS_RX, ABS_RY, ABS_RZ, ABS_THROTTLE, ABS_TILT_X, ABS_TILT_Y, |
| 10 | ABS_TOOL_WIDTH, ABS_VOLUME, ABS_WHEEL, ABS_X, ABS_Y, ABS_Z, |
| 11 | }; |
| 12 | |
| 13 | #[test] |
| 14 | fn test_ABS_X() { |
| 15 | assert_eq!(ABS_X!(), 0x00); |
| 16 | } |
| 17 | |
| 18 | #[test] |
| 19 | fn test_ABS_Y() { |
| 20 | assert_eq!(ABS_Y!(), 0x01); |
| 21 | } |
| 22 | |
| 23 | #[test] |
| 24 | fn test_ABS_Z() { |
| 25 | assert_eq!(ABS_Z!(), 0x02); |
| 26 | } |
| 27 | |
| 28 | #[test] |
| 29 | fn test_ABS_RX() { |
| 30 | assert_eq!(ABS_RX!(), 0x03); |
| 31 | } |
| 32 | |
| 33 | #[test] |
| 34 | fn test_ABS_RY() { |
| 35 | assert_eq!(ABS_RY!(), 0x04); |
| 36 | } |
| 37 | |
| 38 | #[test] |
| 39 | fn test_ABS_RZ() { |
| 40 | assert_eq!(ABS_RZ!(), 0x05); |
| 41 | } |
| 42 | |
| 43 | #[test] |
| 44 | fn test_ABS_THROTTLE() { |
| 45 | assert_eq!(ABS_THROTTLE!(), 0x06); |
| 46 | } |
| 47 | |
| 48 | #[test] |
| 49 | fn test_ABS_RUDDER() { |
| 50 | assert_eq!(ABS_RUDDER!(), 0x07); |
| 51 | } |
| 52 | |
| 53 | #[test] |
| 54 | fn test_ABS_WHEEL() { |
| 55 | assert_eq!(ABS_WHEEL!(), 0x08); |
| 56 | } |
| 57 | |
| 58 | #[test] |
| 59 | fn test_ABS_GAS() { |
| 60 | assert_eq!(ABS_GAS!(), 0x09); |
| 61 | } |
| 62 | |
| 63 | #[test] |
| 64 | fn test_ABS_BRAKE() { |
| 65 | assert_eq!(ABS_BRAKE!(), 0x0a); |
| 66 | } |
| 67 | |
| 68 | #[test] |
| 69 | fn test_ABS_HAT0X() { |
| 70 | assert_eq!(ABS_HAT0X!(), 0x10); |
| 71 | } |
| 72 | |
| 73 | #[test] |
| 74 | fn test_ABS_HAT0Y() { |
| 75 | assert_eq!(ABS_HAT0Y!(), 0x11); |
| 76 | } |
| 77 | |
| 78 | #[test] |
| 79 | fn test_ABS_HAT1X() { |
| 80 | assert_eq!(ABS_HAT1X!(), 0x12); |
| 81 | } |
| 82 | |
| 83 | #[test] |
| 84 | fn test_ABS_HAT1Y() { |
| 85 | assert_eq!(ABS_HAT1Y!(), 0x13); |
| 86 | } |
| 87 | |
| 88 | #[test] |
| 89 | fn test_ABS_HAT2X() { |
| 90 | assert_eq!(ABS_HAT2X!(), 0x14); |
| 91 | } |
| 92 | |
| 93 | #[test] |
| 94 | fn test_ABS_HAT2Y() { |
| 95 | assert_eq!(ABS_HAT2Y!(), 0x15); |
| 96 | } |
| 97 | |
| 98 | #[test] |
| 99 | fn test_ABS_HAT3X() { |
| 100 | assert_eq!(ABS_HAT3X!(), 0x16); |
| 101 | } |
| 102 | |
| 103 | #[test] |
| 104 | fn test_ABS_HAT3Y() { |
| 105 | assert_eq!(ABS_HAT3Y!(), 0x17); |
| 106 | } |
| 107 | |
| 108 | #[test] |
| 109 | fn test_ABS_PRESSURE() { |
| 110 | assert_eq!(ABS_PRESSURE!(), 0x18); |
| 111 | } |
| 112 | |
| 113 | #[test] |
| 114 | fn test_ABS_DISTANCE() { |
| 115 | assert_eq!(ABS_DISTANCE!(), 0x19); |
| 116 | } |
| 117 | |
| 118 | #[test] |
| 119 | fn test_ABS_TILT_X() { |
| 120 | assert_eq!(ABS_TILT_X!(), 0x1a); |
| 121 | } |
| 122 | |
| 123 | #[test] |
| 124 | fn test_ABS_TILT_Y() { |
| 125 | assert_eq!(ABS_TILT_Y!(), 0x1b); |
| 126 | } |
| 127 | |
| 128 | #[test] |
| 129 | fn test_ABS_TOOL_WIDTH() { |
| 130 | assert_eq!(ABS_TOOL_WIDTH!(), 0x1c); |
| 131 | } |
| 132 | |
| 133 | #[test] |
| 134 | fn test_ABS_VOLUME() { |
| 135 | assert_eq!(ABS_VOLUME!(), 0x20); |
| 136 | } |
| 137 | |
| 138 | #[test] |
| 139 | fn test_ABS_PROFILE() { |
| 140 | assert_eq!(ABS_PROFILE!(), 0x21); |
| 141 | } |
| 142 | |
| 143 | #[test] |
| 144 | fn test_ABS_MISC() { |
| 145 | assert_eq!(ABS_MISC!(), 0x28); |
| 146 | } |
| 147 | |
| 148 | #[test] |
| 149 | fn test_ABS_RESERVED() { |
| 150 | assert_eq!(ABS_RESERVED!(), 0x2e); |
| 151 | } |
| 152 | |
| 153 | #[test] |
| 154 | fn test_ABS_MT_SLOT() { |
| 155 | assert_eq!(ABS_MT_SLOT!(), 0x2f); |
| 156 | } |
| 157 | |
| 158 | #[test] |
| 159 | fn test_ABS_MT_TOUCH_MAJOR() { |
| 160 | assert_eq!(ABS_MT_TOUCH_MAJOR!(), 0x30); |
| 161 | } |
| 162 | |
| 163 | #[test] |
| 164 | fn test_ABS_MT_TOUCH_MINOR() { |
| 165 | assert_eq!(ABS_MT_TOUCH_MINOR!(), 0x31); |
| 166 | } |
| 167 | |
| 168 | #[test] |
| 169 | fn test_ABS_MT_WIDTH_MAJOR() { |
| 170 | assert_eq!(ABS_MT_WIDTH_MAJOR!(), 0x32); |
| 171 | } |
| 172 | |
| 173 | #[test] |
| 174 | fn test_ABS_MT_WIDTH_MINOR() { |
| 175 | assert_eq!(ABS_MT_WIDTH_MINOR!(), 0x33); |
| 176 | } |
| 177 | |
| 178 | #[test] |
| 179 | fn test_ABS_MT_ORIENTATION() { |
| 180 | assert_eq!(ABS_MT_ORIENTATION!(), 0x34); |
| 181 | } |
| 182 | |
| 183 | #[test] |
| 184 | fn test_ABS_MT_POSITION_X() { |
| 185 | assert_eq!(ABS_MT_POSITION_X!(), 0x35); |
| 186 | } |
| 187 | |
| 188 | #[test] |
| 189 | fn test_ABS_MT_POSITION_Y() { |
| 190 | assert_eq!(ABS_MT_POSITION_Y!(), 0x36); |
| 191 | } |
| 192 | |
| 193 | #[test] |
| 194 | fn test_ABS_MT_TOOL_TYPE() { |
| 195 | assert_eq!(ABS_MT_TOOL_TYPE!(), 0x37); |
| 196 | } |
| 197 | |
| 198 | #[test] |
| 199 | fn test_ABS_MT_BLOB_ID() { |
| 200 | assert_eq!(ABS_MT_BLOB_ID!(), 0x38); |
| 201 | } |
| 202 | |
| 203 | #[test] |
| 204 | fn test_ABS_MT_TRACKING_ID() { |
| 205 | assert_eq!(ABS_MT_TRACKING_ID!(), 0x39); |
| 206 | } |
| 207 | |
| 208 | #[test] |
| 209 | fn test_ABS_MT_PRESSURE() { |
| 210 | assert_eq!(ABS_MT_PRESSURE!(), 0x3a); |
| 211 | } |
| 212 | |
| 213 | #[test] |
| 214 | fn test_ABS_MT_DISTANCE() { |
| 215 | assert_eq!(ABS_MT_DISTANCE!(), 0x3b); |
| 216 | } |
| 217 | |
| 218 | #[test] |
| 219 | fn test_ABS_MT_TOOL_X() { |
| 220 | assert_eq!(ABS_MT_TOOL_X!(), 0x3c); |
| 221 | } |
| 222 | |
| 223 | #[test] |
| 224 | fn test_ABS_MT_TOOL_Y() { |
| 225 | assert_eq!(ABS_MT_TOOL_Y!(), 0x3d); |
| 226 | } |
| 227 | |
| 228 | #[test] |
| 229 | fn test_ABS_MAX() { |
| 230 | assert_eq!(ABS_MAX!(), 0x3f); |
| 231 | } |
| 232 | |
| 233 | #[test] |
| 234 | fn test_ABS_CNT() { |
| 235 | assert_eq!(ABS_CNT!(), (ABS_MAX!() + 1)); |
| 236 | } |