]>
git.proxmox.com Git - pve-qemu.git/blob - keycodemapdb/tests/stdc++.cc
2 * Keycode Map Generator C++ Tests
4 * Copyright 2017 Pierre Ossman for Cendio AB
6 * This file is dual license under the terms of the GPLv2 or later
7 * and 3-clause BSD licenses.
13 #include "osx2win32.hh"
14 #include "osx2win32_name.hh"
17 #include "osx2xkb_name.hh"
19 #include "html2win32.hh"
20 #include "html2win32_name.hh"
23 #include "osx_name.hh"
25 int main(int argc
, char** argv
)
27 assert(code_map_osx_to_win32
[0x1d] == 0x30);
28 assert(strcmp(name_map_osx_to_win32
[0x1d], "VK_0") == 0);
30 assert(strcmp(code_map_osx_to_xkb
[0x1d], "AE10") == 0);
31 assert(strcmp(name_map_osx_to_xkb
[0x1d], "AE10") == 0);
33 assert(code_map_html_to_win32
.at("ControlLeft") == 0x11);
34 assert(strcmp(name_map_html_to_win32
.at("ControlLeft"), "VK_CONTROL") == 0);
36 assert(code_table_osx
[0x1d] == 0x3b);
37 assert(strcmp(name_table_osx
[0x1d], "Control") == 0);