diff options
author | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
---|---|---|
committer | Angelos Mouzakitis <a.mouzakitis@virtualopensystems.com> | 2023-10-10 14:33:42 +0000 |
commit | af1a266670d040d2f4083ff309d732d648afba2a (patch) | |
tree | 2fc46203448ddcc6f81546d379abfaeb323575e9 /ui/keycodemapdb/tests/stdc++.cc | |
parent | e02cda008591317b1625707ff8e115a4841aa889 (diff) |
Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec
Diffstat (limited to 'ui/keycodemapdb/tests/stdc++.cc')
-rw-r--r-- | ui/keycodemapdb/tests/stdc++.cc | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ui/keycodemapdb/tests/stdc++.cc b/ui/keycodemapdb/tests/stdc++.cc new file mode 100644 index 000000000..5e3e8f551 --- /dev/null +++ b/ui/keycodemapdb/tests/stdc++.cc @@ -0,0 +1,40 @@ +/* + * Keycode Map Generator C++ Tests + * + * Copyright 2017 Pierre Ossman for Cendio AB + * + * This file is dual license under the terms of the GPLv2 or later + * and 3-clause BSD licenses. + */ + +#include <assert.h> +#include <string.h> + +#include "osx2win32.hh" +#include "osx2win32_name.hh" + +#include "osx2xkb.hh" +#include "osx2xkb_name.hh" + +#include "html2win32.hh" +#include "html2win32_name.hh" + +#include "osx.hh" +#include "osx_name.hh" + +int main(int argc, char** argv) +{ + assert(code_map_osx_to_win32[0x1d] == 0x30); + assert(strcmp(name_map_osx_to_win32[0x1d], "VK_0") == 0); + + assert(strcmp(code_map_osx_to_xkb[0x1d], "AE10") == 0); + assert(strcmp(name_map_osx_to_xkb[0x1d], "AE10") == 0); + + assert(code_map_html_to_win32.at("ControlLeft") == 0x11); + assert(strcmp(name_map_html_to_win32.at("ControlLeft"), "VK_CONTROL") == 0); + + assert(code_table_osx[0x1d] == 0x3b); + assert(strcmp(name_table_osx[0x1d], "Control") == 0); + + return 0; +} |