Files
Bubberstation/code/modules/unit_tests/teleporters.dm
SkyratBot 71efaf0d7a [MIRROR] Put unit tests in a box, fixes sporradic gun test failure (#3896)
* Put unit tests in a box, fixes sporradic gun test failure (#57408)

* Initial commit

* Fix removing old objects

* Remove define

* TGM

* Put unit tests in a box, fixes sporradic gun test failure

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2021-03-05 14:06:09 +00:00

11 lines
909 B
Plaintext

/datum/unit_test/auto_teleporter_linking/Run()
// Put down the teleporter machinery
var/obj/machinery/teleport/hub/hub = allocate(/obj/machinery/teleport/hub)
var/obj/machinery/teleport/station/station = allocate(/obj/machinery/teleport/station, locate(run_loc_floor_bottom_left.x + 1, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z))
var/obj/machinery/computer/teleporter/computer = allocate(/obj/machinery/computer/teleporter, locate(run_loc_floor_bottom_left.x + 2, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z))
TEST_ASSERT_EQUAL(hub.power_station, station, "Hub didn't link to the station")
TEST_ASSERT_EQUAL(station.teleporter_console, computer, "Station didn't link to the teleporter console")
TEST_ASSERT_EQUAL(station.teleporter_hub, hub, "Station didn't link to the hub")
TEST_ASSERT_EQUAL(computer.power_station, station, "Teleporter console didn't link to the hub")