bfrymire / crispy

Unit testing framework built in GML for GameMaker LTS 2022+

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

.setName() throws error when no name is supplied to TestCase

bfrymire opened this issue · comments

According to the old README.md file, the name argument is optional:

TestCase([name], [struct_unpack])

When not supplying a name, undefined will attempt to be passed through .setName(). The function only accepts strings and will throw an error otherwise.

TestCase and TestSuite both have the same function.


Error message:

ERROR!!! :: ############################################################################################
ERROR in
action number 1
of Create Event
for object obj_test:


Unable to find a handler for exception TestCase.setName() expected a string, received undefined.
NO CALLSTACK

 at gml_Script_TestCase (line 407) - 		setName(undefined);
############################################################################################
gml_Script_TestCase (line 407)
gml_Object_obj_test_Create_0 (line 5)

Possible fix: allow .setName() to pass undefined