Skip to content

Add bitmap collision detection unit tests#158

Open
222448082Ashen wants to merge 2 commits intothoth-tech:mainfrom
222448082Ashen:unit-test/physics
Open

Add bitmap collision detection unit tests#158
222448082Ashen wants to merge 2 commits intothoth-tech:mainfrom
222448082Ashen:unit-test/physics

Conversation

@222448082Ashen
Copy link
Copy Markdown

@222448082Ashen 222448082Ashen commented Mar 28, 2026

Extend unit_test_bitmap.cpp with comprehensive collision tests. Adds test cases for point, rectangle, and circle collisions as well as bitmap-to-bitmap collisions, creating small bitmaps with specific opaque/transparent pixels, calling setup_collision_mask, and verifying collision functions (bitmap_point_collision, bitmap_rectangle_collision, bitmap_circle_collision, bitmap_collision) across offsets and edge cases.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant
motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • Documentation (update or new)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can
reproduce. Please also list any relevant details for your test configuration

Testing Checklist

  • Tested with sktest
  • Tested with skunit_tests

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from ... on the Pull Request

222448082Ashen and others added 2 commits March 28, 2026 14:01
Extend unit_test_bitmap.cpp with comprehensive collision tests. Adds test cases for point, rectangle, and circle collisions as well as bitmap-to-bitmap collisions, creating small bitmaps with specific opaque/transparent pixels, calling setup_collision_mask, and verifying collision functions (bitmap_point_collision, bitmap_rectangle_collision, bitmap_circle_collision, bitmap_collision) across offsets and edge cases.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant