aboutsummaryrefslogtreecommitdiff
path: root/subprojects/d2tk/test/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/d2tk/test/base.c')
-rw-r--r--subprojects/d2tk/test/base.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/subprojects/d2tk/test/base.c b/subprojects/d2tk/test/base.c
index 4826216..5cd145e 100644
--- a/subprojects/d2tk/test/base.c
+++ b/subprojects/d2tk/test/base.c
@@ -1836,10 +1836,14 @@ _test_bitmap()
static const uint32_t custom_data;
static void
-_custom(void *ctx, uint32_t size, const void *data)
+_custom(void *ctx, const d2tk_rect_t *rect, const void *data)
{
assert(ctx == NULL);
- assert(size == sizeof(custom_data));
+ assert(rect != NULL);
+ assert(rect->x == 0);
+ assert(rect->y == 0);
+ assert(rect->w == DIM_W);
+ assert(rect->h == DIM_H);
assert(data == &custom_data);
}
@@ -1854,7 +1858,9 @@ _test_custom()
const d2tk_rect_t rect = D2TK_RECT(0, 0, DIM_W, DIM_H);
assert(base);
- d2tk_base_custom(base, sizeof(custom_data), &custom_data, &rect, _custom);
+ const uint64_t dhash = d2tk_hash(&custom_data, sizeof(custom_data));
+
+ d2tk_base_custom(base, dhash, &custom_data, &rect, _custom);
d2tk_base_free(base);
}