bfrymire / crispy

Unit testing framework built in GML for GameMaker LTS 2022+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Passing a value other than a string as assertion custom message will cause addition error

bfrymire opened this issue · comments

Given the following code as a TestCase test:

assertTrue(false, -100);

An error will be thrown after TestRunner is compiling the logs:

ERROR in
action number 1
of  Step Event0
for object obj_test:

DoAdd :: Execution Error
 at gml_Script_anon_CrispyLog_gml_GlobalScript_CrispyLog_1271_CrispyLog_gml_GlobalScript_CrispyLog (line 70) -                                           _msg += "- " + msg;
############################################################################################
gml_Script_anon_CrispyLog_gml_GlobalScript_CrispyLog_1271_CrispyLog_gml_GlobalScript_CrispyLog (line 70)
gml_Script_anon_TestRunner_gml_GlobalScript_TestRunner_4027_TestRunner_gml_GlobalScript_TestRunner (line 193) -                             var _msg = logs[i].get_msg();
gml_Script_anon_TestRunner_gml_GlobalScript_TestRunner_3046_TestRunner_gml_GlobalScript_TestRunner (line 116) -               tear_down();
gml_Object_obj_test_Step_0 (line 5) -               runner.run();

Throw an error when anything other than a string is passed as an assertion custom message.