Skip to content

Commit

Permalink
ADD getDebugBitmap test
Browse files Browse the repository at this point in the history
  • Loading branch information
ninovanhooff committed Oct 12, 2024
1 parent ac68f7a commit 319d966
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/t_graphics.nim
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ proc execGraphicsTests*(runnable: bool) =
let img = playdate.graphics.newBitmap(10, 10, kColorWhite)
discard playdate.graphics.createPattern(img, 0, 0)

test "DebugBitmap should not be freed after use":
if runnable:
discard playdate.graphics.getDebugBitmap()
# if the bitmap was freed, this would crash
discard playdate.graphics.getDebugBitmap()

test "Bitmaps should be loadable from files":
if runnable:
let img = playdate.graphics.newBitmap("boxes.png")
Expand Down

0 comments on commit 319d966

Please sign in to comment.