]> git.proxmox.com Git - pve-qemu.git/blob - keycodemapdb/tests/stdc++.cc
bump version to 2.11.1-1
[pve-qemu.git] / keycodemapdb / tests / stdc++.cc
1 /*
2 * Keycode Map Generator C++ Tests
3 *
4 * Copyright 2017 Pierre Ossman for Cendio AB
5 *
6 * This file is dual license under the terms of the GPLv2 or later
7 * and 3-clause BSD licenses.
8 */
9
10 #include <assert.h>
11 #include <string.h>
12
13 #include "osx2win32.hh"
14 #include "osx2win32_name.hh"
15
16 #include "osx2xkb.hh"
17 #include "osx2xkb_name.hh"
18
19 #include "html2win32.hh"
20 #include "html2win32_name.hh"
21
22 #include "osx.hh"
23 #include "osx_name.hh"
24
25 int main(int argc, char** argv)
26 {
27 assert(code_map_osx_to_win32[0x1d] == 0x30);
28 assert(strcmp(name_map_osx_to_win32[0x1d], "VK_0") == 0);
29
30 assert(strcmp(code_map_osx_to_xkb[0x1d], "AE10") == 0);
31 assert(strcmp(name_map_osx_to_xkb[0x1d], "AE10") == 0);
32
33 assert(code_map_html_to_win32.at("ControlLeft") == 0x11);
34 assert(strcmp(name_map_html_to_win32.at("ControlLeft"), "VK_CONTROL") == 0);
35
36 assert(code_table_osx[0x1d] == 0x3b);
37 assert(strcmp(name_table_osx[0x1d], "Control") == 0);
38
39 return 0;
40 }