From 71c60a593b571ef49ca083ef4cbc6b02eb42da59 Mon Sep 17 00:00:00 2001 From: Pierre Ossman Date: Fri, 14 Jul 2017 14:10:38 +0200 Subject: Add tests for code-table Signed-off-by: Pierre Ossman --- tests/.gitignore | 1 + tests/Makefile | 13 ++++++++++--- tests/stdc++.cc | 2 ++ tests/stdc.c | 2 ++ tests/test.py | 2 ++ 5 files changed, 17 insertions(+), 3 deletions(-) diff --git a/tests/.gitignore b/tests/.gitignore index bda4ab4..d7e92ec 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -1,3 +1,4 @@ osx2win32.* +osx.* stdc stdc++ diff --git a/tests/Makefile b/tests/Makefile index b396b4d..af02ee2 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -13,20 +13,27 @@ SOURCES := $(GEN) $(DATA) .DELETE_ON_ERROR: -stdc: stdc.c osx2win32.h +stdc: stdc.c osx2win32.h osx.h $(CC) -o $@ $^ osx2win32.h: $(SOURCES) $(GEN) --lang stdc code-map $(DATA) osx win32 > $@ +osx.h: $(SOURCES) + $(GEN) --lang stdc code-table $(DATA) osx > $@ -stdc++: stdc++.cc osx2win32.hh +stdc++: stdc++.cc osx2win32.hh osx.hh $(CC) -o $@ $^ osx2win32.hh: $(SOURCES) $(GEN) --lang stdc++ code-map $(DATA) osx win32 > $@ +osx.hh: $(SOURCES) + $(GEN) --lang stdc++ code-table $(DATA) osx > $@ -python2: osx2win32.py +python2: osx2win32.py osx.py osx2win32.py: $(SOURCES) $(GEN) --lang python2 code-map $(DATA) osx win32 > $@ +osx.py: $(SOURCES) + $(GEN) --lang python2 code-table $(DATA) osx > $@ clean: rm -f osx2win32.* + rm -f osx.* rm -f stdc stdc++ diff --git a/tests/stdc++.cc b/tests/stdc++.cc index 51727cf..251bb84 100644 --- a/tests/stdc++.cc +++ b/tests/stdc++.cc @@ -9,10 +9,12 @@ #include #include "osx2win32.hh" +#include "osx.hh" int main(int argc, char** argv) { assert(code_map_osx_to_win32[0x1d] == 0x30); + assert(code_table_osx[0x1d] == 0x3b); return 0; } diff --git a/tests/stdc.c b/tests/stdc.c index 152357d..2e880da 100644 --- a/tests/stdc.c +++ b/tests/stdc.c @@ -9,10 +9,12 @@ #include #include "osx2win32.h" +#include "osx.h" int main(int argc, char** argv) { assert(code_map_osx_to_win32[0x1d] == 0x30); + assert(code_table_osx[0x1d] == 0x3b); return 0; } diff --git a/tests/test.py b/tests/test.py index 0efdafa..6577115 100644 --- a/tests/test.py +++ b/tests/test.py @@ -6,5 +6,7 @@ # and 3-clause BSD licenses. import osx2win32 +import osx assert osx2win32.code_map_osx_to_win32[0x1d] == 0x30 +assert osx.code_table_osx[0x1d] == 0x3b; -- cgit v1.1