summaryrefslogtreecommitdiff
path: root/server/src/luaquerymapper.cc
diff options
context:
space:
mode:
authordeva <deva>2008-07-22 12:05:11 +0000
committerdeva <deva>2008-07-22 12:05:11 +0000
commit42512d40ef93f0f85d107a7dc6d58973f93a1d95 (patch)
treeb7379e64a75ef1a821aaa80a47f382e6ec2137c3 /server/src/luaquerymapper.cc
parent28d39474e6c0c14bd12716a9e20ad0469cd17cc6 (diff)
Updated testcode
Diffstat (limited to 'server/src/luaquerymapper.cc')
-rw-r--r--server/src/luaquerymapper.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/server/src/luaquerymapper.cc b/server/src/luaquerymapper.cc
index 5b66a35..acd6b26 100644
--- a/server/src/luaquerymapper.cc
+++ b/server/src/luaquerymapper.cc
@@ -170,11 +170,13 @@ int main()
LUAQueryMapper mapper(e.result);
- std::string luamap = "return right.sphere";
- printf("%s : %s\n", luamap.c_str(), mapper.map(luamap).c_str());
+ std::string luamap = "return right.sphere, 0";
+ Value value = mapper.map(luamap);
+ printf("%s : %s, %lu\n", luamap.c_str(), value.value.c_str(), value.timestamp);
- luamap = "return math.sin(right.cyl) * 2";
- printf("%s : %s\n", luamap.c_str(), mapper.map(luamap).c_str());
+ luamap = "return math.sin(right.cyl) * 2, 0";
+ value = mapper.map(luamap);
+ printf("%s : %s, %lu\n", luamap.c_str(), value.value.c_str(), value.timestamp);
return 0;
}