From 4763e230ab02bcf3e7db20dee23d42a02815bdb3 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 7 Oct 2014 01:56:05 -0700 Subject: Split script.cpp --- src/map/script-persist.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/map/script-persist.py (limited to 'src/map/script-persist.py') diff --git a/src/map/script-persist.py b/src/map/script-persist.py new file mode 100644 index 0000000..a5010cd --- /dev/null +++ b/src/map/script-persist.py @@ -0,0 +1,25 @@ +class script_data(object): + enabled = True + + test_extra = ''' + using tmwa::operator "" _s; + ''' + + tests = [ + ('tmwa::script_data(tmwa::ScriptDataPos{42})', + '{> = {(tmwa::ScriptDataPos) = {numi = 42}}, }'), + ('tmwa::script_data(tmwa::ScriptDataInt{123})', + '{> = {(tmwa::ScriptDataInt) = {numi = 123}}, }'), + ('tmwa::script_data(tmwa::ScriptDataParam{tmwa::SIR()})', + '{> = {(tmwa::ScriptDataParam) = {reg = {impl = 0}}}, }'), + ('tmwa::script_data(tmwa::ScriptDataStr{"Hello"_s})', + '{> = {(tmwa::ScriptDataStr) = {str = "Hello"}}, }'), + ('tmwa::script_data(tmwa::ScriptDataArg{0})', + '{> = {(tmwa::ScriptDataArg) = {numi = 0}}, }'), + ('tmwa::script_data(tmwa::ScriptDataVariable{tmwa::SIR()})', + '{> = {(tmwa::ScriptDataVariable) = {reg = {impl = 0}}}, }'), + ('tmwa::script_data(tmwa::ScriptDataRetInfo{static_cast(nullptr)})', + '{> = {(tmwa::ScriptDataRetInfo) = {script = 0x0}}, }'), + ('tmwa::script_data(tmwa::ScriptDataFuncRef{404})', + '{> = {(tmwa::ScriptDataFuncRef) = {numi = 404}}, }'), + ] -- cgit v1.2.3-60-g2f50