diff options
Diffstat (limited to 'tests/rust-test/src')
-rw-r--r-- | tests/rust-test/src/main.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/rust-test/src/main.rs b/tests/rust-test/src/main.rs new file mode 100644 index 0000000..019c3d4 --- /dev/null +++ b/tests/rust-test/src/main.rs @@ -0,0 +1,23 @@ +include!("../../html2win32_name.rs"); +include!("../../html2win32.rs"); +include!("../../osx2win32_name.rs"); +include!("../../osx2win32.rs"); +include!("../../osx2xkb_name.rs"); +include!("../../osx2xkb.rs"); +include!("../../osx_name.rs"); +include!("../../osx.rs"); + +#[test] +fn main() { + assert_eq!(CODE_MAP_OSX_TO_WIN32[0x1d], 0x30); + assert_eq!(NAME_MAP_OSX_TO_WIN32[0x1d], "VK_0"); + + assert_eq!(CODE_MAP_OSX_TO_XKB[0x1d], "AE10"); + assert_eq!(NAME_MAP_OSX_TO_XKB[0x1d], "AE10"); + + assert_eq!(CODE_MAP_HTML_TO_WIN32["ControlLeft"], 0x11); + assert_eq!(NAME_MAP_HTML_TO_WIN32["ControlLeft"], "VK_CONTROL"); + + assert_eq!(CODE_TABLE_OSX[0x1d], 0x3b); + assert_eq!(NAME_TABLE_OSX[0x1d], "Control"); +} |