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

Test: Add tests for functions in helpers.cairo #208

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

Jagadeeshftw
Copy link
Contributor

Description

This PR adds tests for the helper functions in helpers.cairo. The new tests cover:

  • Conversion logic for board_to_pos and pos_to_board, including normal moves and home stretch conditions, with special handling for threshold values and not-placed pieces.
  • Various scenarios for pos_reducer with different active color combinations and orders (e.g., [0, 1], [0, 3], [2, 1]), including cases where some values are already non-zero and should be preserved.

Related Issue(s)

Closes #206

Checklist:

  • Read the contributing docs (if this is your first contribution)

  • Verified this is not a duplicate of any existing pull request

  • Performed a self-review of the code

  • Rebased to the last commit of the target branch (or merged it into my branch)

  • Linked the issues which this PR resolves

  • Documented the changes in code (API docs will be generated automatically)

Copy link

co-lead bot commented Feb 9, 2025

Thanks for your PR @Jagadeeshftw. It will be reviewed shortly.

@0xibs 0xibs merged commit 5c89f9f into sivicstudio:dev Feb 10, 2025
1 check passed
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.

Add test for functions in helpers.cairo
2 participants