summaryrefslogtreecommitdiff
path: root/src/map/map.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/map.py')
-rw-r--r--src/map/map.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/src/map/map.py b/src/map/map.py
index cb29d53..c7adf56 100644
--- a/src/map/map.py
+++ b/src/map/map.py
@@ -1,7 +1,7 @@
class map_local(object):
__slots__ = ('_value')
- name = 'tmwa::map_local'
+ name = 'tmwa::map::map_local'
depth = 1
enabled = True
@@ -26,14 +26,14 @@ class map_local(object):
yield '->ys', value['ys']
tests = [
- ('static_cast<tmwa::map_local *>(nullptr)', '(map_local *) nullptr'),
+ ('static_cast<tmwa::map::map_local *>(nullptr)', '(map_local *) nullptr'),
('fake_map_local("map"_s, 42, 404)', '(map_local *) = {->name = "map", ->xs = 42, ->ys = 404}'),
]
class map_remote(object):
__slots__ = ('_value')
- name = 'tmwa::map_remote'
+ name = 'tmwa::map::map_remote'
depth = 1
enabled = True
@@ -58,14 +58,14 @@ class map_remote(object):
yield '->port', value['port']
tests = [
- ('static_cast<tmwa::map_remote *>(nullptr)', '(map_remote *) nullptr'),
+ ('static_cast<tmwa::map::map_remote *>(nullptr)', '(map_remote *) nullptr'),
('fake_map_remote("map"_s, tmwa::IP4Address({8, 8, 8, 8}), 6667)', '(map_remote *) = {->name = "map", ->ip = 8.8.8.8, ->port = 6667}'),
]
class map_abstract(object):
__slots__ = ('_value')
- name = 'tmwa::map_abstract'
+ name = 'tmwa::map::map_abstract'
depth = 1
enabled = True
@@ -79,19 +79,19 @@ class map_abstract(object):
if value is None:
return '(map_abstract *) nullptr'
gat = value.dereference()['gat']
- gat = gat.address.cast(gdb.lookup_type('tmwa::map_abstract').pointer().pointer()).dereference()
+ gat = gat.address.cast(gdb.lookup_type('tmwa::map::map_abstract').pointer().pointer()).dereference()
if gat:
- return value.cast(gdb.lookup_type('tmwa::map_local').pointer())
+ return value.cast(gdb.lookup_type('tmwa::map::map_local').pointer())
else:
- return value.cast(gdb.lookup_type('tmwa::map_remote').pointer())
+ return value.cast(gdb.lookup_type('tmwa::map::map_remote').pointer())
tests = [
- ('static_cast<tmwa::map_abstract *>(nullptr)', '(map_abstract *) nullptr'),
+ ('static_cast<tmwa::map::map_abstract *>(nullptr)', '(map_abstract *) nullptr'),
] + [
- ('static_cast<tmwa::map_abstract *>(%s); value->gat.reset(new tmwa::MapCell[1])' % expr, expected)
+ ('static_cast<tmwa::map::map_abstract *>(%s); value->gat.reset(new tmwa::map::MapCell[1])' % expr, expected)
for (expr, expected) in map_local.tests[1:]
] + [
- ('static_cast<tmwa::map_abstract *>(%s)' % expr, expected)
+ ('static_cast<tmwa::map::map_abstract *>(%s)' % expr, expected)
for (expr, expected) in map_remote.tests[1:]
]
@@ -99,9 +99,9 @@ class map_abstract(object):
using tmwa::operator "" _s;
inline
- tmwa::map_local *fake_map_local(tmwa::ZString name, int xs, int ys)
+ tmwa::map::map_local *fake_map_local(tmwa::ZString name, int xs, int ys)
{
- auto *p = new tmwa::map_local{};
+ auto *p = new tmwa::map::map_local{};
p->name_ = tmwa::stringish<tmwa::MapName>(name);
p->xs = xs;
p->ys = ys;
@@ -109,17 +109,17 @@ class map_abstract(object):
}
inline
- tmwa::map_remote *fake_map_remote(tmwa::ZString name, tmwa::IP4Address ip, uint16_t port)
+ tmwa::map::map_remote *fake_map_remote(tmwa::ZString name, tmwa::IP4Address ip, uint16_t port)
{
- auto *p = new tmwa::map_remote{};
+ auto *p = new tmwa::map::map_remote{};
p->name_ = tmwa::stringish<tmwa::MapName>(name);
p->ip = ip;
p->port = port;
return p;
}
- void fake_delete(tmwa::map_abstract *);
- void fake_delete(tmwa::map_abstract *map)
+ void fake_delete(tmwa::map::map_abstract *);
+ void fake_delete(tmwa::map::map_abstract *map)
{
delete map;
}