Files
Paradise/code/modules/unit_tests/component_tests.dm
AffectedArc07 0c8d95dd65 Travis Update Finale: Unit Tests + SQL Validation (#13331)
* SQL Validation, the first of many

* Initial test of the world loading

* This was prefixed when it shouldnt have been :v

* This also isnt a valid table

* Escape time

* Chmod

* This **should** work

* Oops

* RUST gone bust

* Please work

* Why did I do this twice

* I think I got it

* Fixes AFK SS

* AAAAAAAAAAAAAAAAAAAAAA

* Fixes AI cam runtime

* Cleanup

* *screams*

* Fare fixes

* Removes un-needed stuff

* I hope this works

* chmoooood

* SQL Version Unit Test

* Failure test

* Kinda ironic how I forgot this

* Task failed successfully

* Moves a global var around

* Bump SQL version in travis

* New test: SQL example DBconfig update

* Lets test an invalid version

* TASK FAILED SUCCESSFULLY

* Programmatic maplist generation

* Removes a duplicate check

* Lets try this

* What about this

* hnnng

* Lets just update BYOND
2020-06-27 01:26:58 -06:00

13 lines
486 B
Plaintext

/datum/unit_test/component_duping/Run()
var/list/bad_dms = list()
var/list/bad_dts = list()
for(var/t in typesof(/datum/component))
var/datum/component/comp = t
if(!isnum(initial(comp.dupe_mode)))
bad_dms += t
var/dupe_type = initial(comp.dupe_type)
if(dupe_type && !ispath(dupe_type))
bad_dts += t
if(length(bad_dms) || length(bad_dts))
Fail("Components with invalid dupe modes: ([bad_dms.Join(",")]) ||| Components with invalid dupe types: ([bad_dts.Join(",")])")