YoYoGames / GM-TestFramework

Repository for GameMaker's Test Framework
Other
21 stars 11 forks source link

ResourceLayersTestSuite: fix `layer_tile_get_sprite()` test in fact "layer_tile_test_legacy" #161

Closed Indibulous closed 2 months ago

Indibulous commented 3 months ago

Description

The fact "layer_tile_test_legacy" in ResourceLayersTestSuite currently fails due to a programming error in the layer_tile_get_sprite() test:

[INFO]: FAILED: { name : layer_tile_test_legacy, duration : 245, errors : [ { title : Assert values to be equal, expected : 0.0, description : #3.1 layer_tile_get_sprite(), failed to get the correct value, actual : 1.0, stack : gml_Script_anon@11611@ResourceLayersTestSuite@ResourceLayersTestSuite:333 } ], result : Failed, exceptions : undefined }

This is due to it comparing the returned asset ID to a constant value of 0, which may have worked when the test was created, but now that more assets have been added to the framework, this is no longer the correct asset ID:

image

In order to make sure his test will always compare against the correct asset, the asset itself should be specified (in this case, specifying the tilesAuto tileset produces the correct result.)

image

Script Name

ResourceLayersTestSuite

Steps To The Task