Added convenience overloads to Rect and also, Collection conformance in the Playdate bindings target.

This commit is contained in:
2026-07-26 00:31:58 +02:00
parent 41558399e3
commit 0d0b397ce1
5 changed files with 92 additions and 0 deletions
+10
View File
@@ -89,6 +89,16 @@ struct WrapperTests {
#expect(Mock.eventCount("freeBitmapTable") == 1)
}
@Test func bitmapTableIsACollection() {
let table = Graphics.BitmapTable(count: 4, width: 8, height: 8)
#expect(table.count == 1) // the mock reports a single bitmap
#expect(table.first != nil)
var visited = 0
for _ in table { visited += 1 }
#expect(visited == 1)
}
// MARK: Sprite
@Test func spriteUserdataRecoversWrapperInCallbacks() {