summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2014-08-27 15:24:44 -0700
committerBen Longbons <b.r.longbons@gmail.com>2014-08-27 15:27:15 -0700
commitddb8f22ada5b22fcaa4ed850d58374becfb0a556 (patch)
tree819ee713950e6424a6471c6a89031fac66eea0f2 /src/map
parenta88ffd2d9b2adec5de19a1bb88e6b8656985a044 (diff)
downloadtmwa-ddb8f22ada5b22fcaa4ed850d58374becfb0a556.tar.gz
tmwa-ddb8f22ada5b22fcaa4ed850d58374becfb0a556.tar.bz2
tmwa-ddb8f22ada5b22fcaa4ed850d58374becfb0a556.tar.xz
tmwa-ddb8f22ada5b22fcaa4ed850d58374becfb0a556.zip
fix tests
Diffstat (limited to 'src/map')
-rw-r--r--src/map/magic-expr.py4
-rw-r--r--src/map/magic-stmt.py4
-rw-r--r--src/map/map.py2
-rw-r--r--src/map/script.py4
4 files changed, 14 insertions, 0 deletions
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>}'),