diff --git a/code/unit_tests/map_tests.dm b/code/unit_tests/map_tests.dm index 190fde52a98..f749e262624 100644 --- a/code/unit_tests/map_tests.dm +++ b/code/unit_tests/map_tests.dm @@ -349,12 +349,21 @@ /datum/unit_test/map_test/no_dirty_vars/start_test() var/test_status +#if defined(TESTING) + if(length(GLOB.dirty_vars)) test_status = TEST_FAIL("There are dirty vars in the map! Read the logs above!") TEST_DEBUG(json_encode(GLOB.dirty_vars)) else test_status = TEST_PASS("No dirty vars in the map.") +#else + + test_status = TEST_FAIL("This test was run without the TESTING define set, which isn't supported") + +#endif + + return test_status #undef SUCCESS