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

Fixes #51 Fixes #55 - Added BasicTilemapTestSuite #56

Conversation

Indibulous
Copy link
Contributor

Description

Created BasicTilemapTestSuite, a TestSuite containing 24 facts/testAsyncs that test all the required functionality listed in #51:

  • tilemap_create_exists_destroy
  • layer_tilemap_get_id
  • tilemap_set_get_mask
  • tilemap_set_get_global_mask
  • tilemap_set_get_tileset
  • tilemap_get_frame
  • tilemap_get_tile_width
  • tilemap_get_tile_height
  • tilemap_set_get_width
  • tilemap_set_get_height
  • tilemap_set_get_x
  • tilemap_set_get_y
  • tilemap_set_get
  • tilemap_set_get_at_pixel
  • tilemap_get_cell_x_at_pixel
  • tilemap_get_cell_y_at_pixel
  • tilemap_clear
  • draw_tilemap
  • tile_set_get_empty
  • tile_set_get_index
  • tile_set_get_flip
  • tile_set_get_mirror
  • tile_set_get_rotate
  • draw_tile

Some other resources required for the tests have also been added:

  • tilesAutoAnimated
  • tilesAutoReplacement
  • drawTilemapTestExpected.png
  • drawTilemapTestExpectedBuffer
  • drawTileTestExpected.png
  • drawTileTestExpectedBuffer

And a new object to be used with testAsync for testing draw functions was added, implementing the functionality described in #55:

  • objTestAsyncDraw

Created BasicTilemapTestSuite, a TestSuite containing 24 facts/testAsyncs that test all the required functionality:
tilemap_create_exists_destroy
layer_tilemap_get_id
tilemap_set_get_mask
tilemap_set_get_global_mask
tilemap_set_get_tileset
tilemap_get_frame
tilemap_get_tile_width
tilemap_get_tile_height
tilemap_set_get_width
tilemap_set_get_height
tilemap_set_get_x
tilemap_set_get_y
tilemap_set_get
tilemap_set_get_at_pixel
tilemap_get_cell_x_at_pixel
tilemap_get_cell_y_at_pixel
tilemap_clear
draw_tilemap
tile_set_get_empty
tile_set_get_index
tile_set_get_flip
tile_set_get_mirror
tile_set_get_rotate
draw_tile

Some other resources required for the tests have also been added:
tilesAutoAnimated
tilesAutoReplacement
drawTilemapTestExpected.png
drawTilemapTestExpectedBuffer
drawTileTestExpected.png
drawTileTestExpectedBuffer

And a new object to be used with testAsync for testing draw functions was added:
objTestAsyncDraw
@Indibulous Indibulous changed the title Fixes #51, Fixes #55 - Added BasicTilemapTestSuite Fixes #51 Fixes #55 - Added BasicTilemapTestSuite Jun 12, 2024
@Indibulous Indibulous linked an issue Jun 12, 2024 that may be closed by this pull request
5 tasks
@Indibulous Indibulous self-assigned this Jun 12, 2024
Improved and added comments throughout BasicTilemapTestSuite and objTestAsyncDraw, as well as fixed issues in the tile_set_get_mirror andtilemap_get_frame facts, and removed some redundant code in the tilemap_set_get_global_mask Fact
The functions start_draw_comparison() and end_draw_comparison() (formerly StartDrawComparison() and EndDrawComparison()) have been moved into a script called draw_test_utils and been modified to use no instance variables, as well as matching the formatting of the other util scripts.
@DiasFranciscoA DiasFranciscoA merged commit 5bfa841 into develop Jun 19, 2024
1 check passed
@DiasFranciscoA DiasFranciscoA deleted the 51-basictilemaptestsuite-create-new-testsuite-for-testing-tilemap-functionality branch November 13, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants