diff options
-rw-r--r-- | tests/.gitignore | 1 | ||||
-rw-r--r-- | tests/Makefile | 13 | ||||
-rw-r--r-- | tests/stdc++.cc | 5 | ||||
-rw-r--r-- | tests/stdc.c | 5 | ||||
-rw-r--r-- | tests/test.py | 3 |
5 files changed, 24 insertions, 3 deletions
diff --git a/tests/.gitignore b/tests/.gitignore index d7e92ec..ab726e7 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,4 +1,5 @@ osx2win32.* +osx2win32_name.* osx.* stdc stdc++ diff --git a/tests/Makefile b/tests/Makefile index af02ee2..3f3d901 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -13,27 +13,34 @@ SOURCES := $(GEN) $(DATA) .DELETE_ON_ERROR: -stdc: stdc.c osx2win32.h osx.h +stdc: stdc.c osx2win32.h osx2win32_name.h osx.h $(CC) -o $@ $^ osx2win32.h: $(SOURCES) $(GEN) --lang stdc code-map $(DATA) osx win32 > $@ +osx2win32_name.h: $(SOURCES) + $(GEN) --lang stdc name-map $(DATA) osx win32 > $@ osx.h: $(SOURCES) $(GEN) --lang stdc code-table $(DATA) osx > $@ -stdc++: stdc++.cc osx2win32.hh osx.hh +stdc++: stdc++.cc osx2win32.hh osx2win32_name.hh osx.hh $(CC) -o $@ $^ osx2win32.hh: $(SOURCES) $(GEN) --lang stdc++ code-map $(DATA) osx win32 > $@ +osx2win32_name.hh: $(SOURCES) + $(GEN) --lang stdc++ name-map $(DATA) osx win32 > $@ osx.hh: $(SOURCES) $(GEN) --lang stdc++ code-table $(DATA) osx > $@ -python2: osx2win32.py osx.py +python2: osx2win32.py osx2win32_name.py osx.py osx2win32.py: $(SOURCES) $(GEN) --lang python2 code-map $(DATA) osx win32 > $@ +osx2win32_name.py: $(SOURCES) + $(GEN) --lang python2 name-map $(DATA) osx win32 > $@ osx.py: $(SOURCES) $(GEN) --lang python2 code-table $(DATA) osx > $@ clean: rm -f osx2win32.* + rm -f osx2win32_name.* rm -f osx.* rm -f stdc stdc++ diff --git a/tests/stdc++.cc b/tests/stdc++.cc index 251bb84..6ec846a 100644 --- a/tests/stdc++.cc +++ b/tests/stdc++.cc @@ -8,12 +8,17 @@ */ #include <assert.h> +#include <string.h> + #include "osx2win32.hh" +#include "osx2win32_name.hh" #include "osx.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(code_table_osx[0x1d] == 0x3b); return 0; diff --git a/tests/stdc.c b/tests/stdc.c index 2e880da..d41b67e 100644 --- a/tests/stdc.c +++ b/tests/stdc.c @@ -8,12 +8,17 @@ */ #include <assert.h> +#include <string.h> + #include "osx2win32.h" +#include "osx2win32_name.h" #include "osx.h" 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(code_table_osx[0x1d] == 0x3b); return 0; diff --git a/tests/test.py b/tests/test.py index 6577115..652ddf7 100644 --- a/tests/test.py +++ b/tests/test.py @@ -6,7 +6,10 @@ # and 3-clause BSD licenses. import osx2win32 +import osx2win32_name import osx assert osx2win32.code_map_osx_to_win32[0x1d] == 0x30 +assert osx2win32_name.name_map_osx_to_win32[0x1d] == "VK_0" + assert osx.code_table_osx[0x1d] == 0x3b; |