Skip to content

Commit cef5232

Browse files
authored
Increase test coverage for DreamMapManager (#2379)
1 parent 4f7c056 commit cef5232

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/area/subtype
2+
color = rgb(255,0,0)
3+
4+
/datum/unit_test/test_change_area_appearance/RunTest()
5+
var/area/subtype/S = new()
6+
var/list/block_turfs = block(locate(1,1,1), locate(2,2,2))
7+
for(var/turf/T in block_turfs)
8+
S.contents += T
9+
10+
ASSERT(istype(locate(1,1,1):loc, /area/subtype))
11+
locate(1,1,1):loc:color = rgb(0,0,0)
12+
ASSERT(locate(2,2,2):loc:color == rgb(0,0,0))
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/datum/unit_test/test_change_world_size/RunTest()
2+
var/oldz = world.maxz
3+
var/oldx = world.maxx
4+
var/oldy = world.maxy
5+
world.maxz = oldz+1
6+
ASSERT(world.maxz == oldz+1)
7+
world.maxx = oldx+1
8+
ASSERT(world.maxx == oldx+1)
9+
world.maxy = oldy+1
10+
ASSERT(world.maxy == oldy+1)
11+
ASSERT(istype(locate(oldx+1, oldy+1, oldz+1), /turf))
12+
13+
world.maxz = oldz
14+
world.maxx = oldx
15+
world.maxy = oldy
16+
ASSERT(isnull(locate(oldx+1, oldy+1, oldz+1)))
17+

0 commit comments

Comments
 (0)