diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.in | 2 | ||||
-rw-r--r-- | src/map/magic-expr.py | 4 | ||||
-rw-r--r-- | src/map/magic-stmt.py | 4 | ||||
-rw-r--r-- | src/map/map.py | 2 | ||||
-rw-r--r-- | src/map/script.py | 4 | ||||
-rw-r--r-- | src/strings/astring.py | 5 | ||||
-rw-r--r-- | src/strings/rstring.py | 5 | ||||
-rw-r--r-- | src/strings/vstring.py | 4 | ||||
-rw-r--r-- | src/strings/xstring.py | 4 | ||||
-rw-r--r-- | src/strings/zstring.py | 4 | ||||
-rw-r--r-- | tools/debug-debug.gdb | 2 |
12 files changed, 40 insertions, 1 deletions
@@ -11,3 +11,4 @@ # generated by configure /Makefile /config.status +/lib diff --git a/Makefile.in b/Makefile.in index ee7a15d..1214c97 100644 --- a/Makefile.in +++ b/Makefile.in @@ -441,7 +441,7 @@ obj/gtest-all.pdc.o: ${GTEST_DIR}/src/gtest-all.cc $c ${CXX} ${CPPFLAGS} ${CXXFLAGS} -c -o $@ $< obj/debug-debug/test.o: override CXXFLAGS += -g -O0 -obj/run-test-debug-debug.stamp: TESTER=gdb -return-child-result -nx -batch -iex 'set auto-load safe-path /' -x ${SRC_DIR}/tools/debug-debug.gdb +obj/run-test-debug-debug.stamp: TESTER=gdb -return-child-result -nx -batch -x ${SRC_DIR}/tools/debug-debug.gdb --args false obj/run-test-debug-debug.stamp: tools/debug-debug.gdb test: $(patsubst bin/%,obj/run-%.stamp,${TEST_BINARIES}) diff --git a/src/map/magic-expr.py b/src/map/magic-expr.py index cdb2bcf..865a175 100644 --- a/src/map/magic-expr.py +++ b/src/map/magic-expr.py @@ -26,6 +26,10 @@ class fun_t(object): yield '->ret_ty', value['ret_ty'] yield '->fun', value['fun'] + test_extra = ''' + using tmwa::operator "" _s; + ''' + tests = [ ('static_cast<tmwa::magic::fun_t *>(nullptr)', '(fun_t *) nullptr'), ('new tmwa::magic::fun_t{"name"_s, "sig"_s, \'\\0\', nullptr}', '(fun_t *) = {->name = "name", ->signature = "sig", ->ret_ty = 0 \'\\000\', ->fun = 0x0}'), diff --git a/src/map/magic-stmt.py b/src/map/magic-stmt.py index 6e34bb0..70ce3ca 100644 --- a/src/map/magic-stmt.py +++ b/src/map/magic-stmt.py @@ -25,6 +25,10 @@ class op_t(object): yield '->signature', value['signature'] yield '->op', value['op'] + test_extra = ''' + using tmwa::operator "" _s; + ''' + tests = [ ('static_cast<tmwa::magic::op_t *>(nullptr)', '(op_t *) nullptr'), ('new tmwa::magic::op_t{"name"_s, "sig"_s, nullptr}', '(op_t *) = {->name = "name", ->signature = "sig", ->op = 0x0}'), diff --git a/src/map/map.py b/src/map/map.py index dc70782..56522c3 100644 --- a/src/map/map.py +++ b/src/map/map.py @@ -96,6 +96,8 @@ class map_abstract(object): ] test_extra = ''' + using tmwa::operator ""_s; + inline tmwa::map_local *fake_map_local(tmwa::ZString name, int xs, int ys) { diff --git a/src/map/script.py b/src/map/script.py index e3029d5..a5010cd 100644 --- a/src/map/script.py +++ b/src/map/script.py @@ -1,6 +1,10 @@ class script_data(object): enabled = True + test_extra = ''' + using tmwa::operator "" _s; + ''' + tests = [ ('tmwa::script_data(tmwa::ScriptDataPos{42})', '{<tmwa::sexpr::Variant<tmwa::ScriptDataPos, tmwa::ScriptDataInt, tmwa::ScriptDataParam, tmwa::ScriptDataStr, tmwa::ScriptDataArg, tmwa::ScriptDataVariable, tmwa::ScriptDataRetInfo, tmwa::ScriptDataFuncRef>> = {(tmwa::ScriptDataPos) = {numi = 42}}, <No data fields>}'), diff --git a/src/strings/astring.py b/src/strings/astring.py index 47e4e55..f4cbf66 100644 --- a/src/strings/astring.py +++ b/src/strings/astring.py @@ -23,6 +23,11 @@ class AString(object): str256 = '0123456789abcdef' * 16 + test_extra = ''' + using tmwa::operator "" _s; + #include "../src/strings/zstring.hpp" + ''' + tests = [ ('tmwa::AString(""_s)', '{allocated = ""}'), ('tmwa::AString(tmwa::ZString(""_s))', '{allocated = ""}'), diff --git a/src/strings/rstring.py b/src/strings/rstring.py index fd26801..61603d8 100644 --- a/src/strings/rstring.py +++ b/src/strings/rstring.py @@ -29,6 +29,11 @@ class RString(object): str256 = '0123456789abcdef' * 16 + test_extra = ''' + using tmwa::operator "" _s; + #include "../src/strings/zstring.hpp" + ''' + tests = [ ('tmwa::RString(""_s)', '""'), ('tmwa::RString(tmwa::ZString(""_s))', '""'), diff --git a/src/strings/vstring.py b/src/strings/vstring.py index 945e3ee..8e6952d 100644 --- a/src/strings/vstring.py +++ b/src/strings/vstring.py @@ -16,6 +16,10 @@ class VString(object): str256 = '0123456789abcdef' * 16 + test_extra = ''' + using tmwa::operator "" _s; + ''' + tests = [ ('tmwa::VString<255>(""_s)', '""'), ('tmwa::VString<255>("Hello"_s)', '"Hello"'), diff --git a/src/strings/xstring.py b/src/strings/xstring.py index d289485..b2e33bb 100644 --- a/src/strings/xstring.py +++ b/src/strings/xstring.py @@ -17,6 +17,10 @@ class XString(object): str256 = '0123456789abcdef' * 16 + test_extra = ''' + using tmwa::operator "" _s; + ''' + tests = [ ('tmwa::XString(""_s)', '"" = {base = 0x0}'), ('tmwa::XString("Hello"_s)', '"Hello" = {base = 0x0}'), diff --git a/src/strings/zstring.py b/src/strings/zstring.py index 7f9ea2a..f57252f 100644 --- a/src/strings/zstring.py +++ b/src/strings/zstring.py @@ -17,6 +17,10 @@ class ZString(object): str256 = '0123456789abcdef' * 16 + test_extra = ''' + using tmwa::operator "" _s; + ''' + tests = [ ('tmwa::ZString(""_s)', '"" = {base = 0x0}'), ('tmwa::ZString("Hello"_s)', '"Hello" = {base = 0x0}'), diff --git a/tools/debug-debug.gdb b/tools/debug-debug.gdb index 0389341..23a934c 100644 --- a/tools/debug-debug.gdb +++ b/tools/debug-debug.gdb @@ -1,4 +1,6 @@ # vim: ft=python +set auto-load safe-path / +file bin/test-debug-debug set logging file /dev/null set logging redirect on set logging off |