Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
bfrymire opened this issue Dec 24, 2021 · 0 comments · Fixed by #24
Closed
Assignees
Labels
bug Something isn't working

Comments

@bfrymire
Copy link
Owner

bfrymire commented Dec 24, 2021

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.

@bfrymire bfrymire added the bug Something isn't working label Dec 24, 2021
bfrymire added a commit that referenced this issue Feb 6, 2022
Fix #22 - Passing a value other than a string as a custom message will cause addition error
@bfrymire bfrymire self-assigned this Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
1 participant