unit test

this is the easy part, believe it or not
This commit is contained in:
BongaTheProto
2023-08-08 14:01:13 +03:00
committed by Tsurupeta
parent db6511e64a
commit dfdbd259da
27 changed files with 449 additions and 81 deletions
+5 -5
View File
@@ -12,17 +12,17 @@
P.save_character()
P.load_character()
if(P.features["flavor_text"] != UNIT_TEST_SAVING_FLAVOR_TEXT)
Fail("Flavor text is failing to save.")
TEST_FAIL("Flavor text is failing to save.")
if(P.features["silicon_flavor_text"] != UNIT_TEST_SAVING_SILICON_FLAVOR_TEXT)
Fail("Silicon flavor text is failing to save.")
TEST_FAIL("Silicon flavor text is failing to save.")
if(P.features["ooc_notes"] != UNIT_TEST_SAVING_OOC_NOTES)
Fail("OOC text is failing to save.")
TEST_FAIL("OOC text is failing to save.")
P.save_character()
P.load_character()
if((P.features["flavor_text"] != UNIT_TEST_SAVING_FLAVOR_TEXT) || (P.features["silicon_flavor_text"] != UNIT_TEST_SAVING_SILICON_FLAVOR_TEXT) || (P.features["ooc_notes"] != UNIT_TEST_SAVING_OOC_NOTES))
Fail("Repeated saving and loading possibly causing save deletion.")
TEST_FAIL("Repeated saving and loading possibly causing save deletion.")
catch(var/exception/e)
Fail("Failed to save and load character due to exception [e.file]:[e.line], [e.name]")
TEST_FAIL("Failed to save and load character due to exception [e.file]:[e.line], [e.name]")
#undef UNIT_TEST_SAVING_FLAVOR_TEXT
#undef UNIT_TEST_SAVING_SILICON_FLAVOR_TEXT