Skip to content

test: add edge case coverage for transform and vector functions (#231)#1958

Open
junhinhow wants to merge 2 commits intoBelfrySCAD:masterfrom
junhinhow:feat/improve-test-coverage-231
Open

test: add edge case coverage for transform and vector functions (#231)#1958
junhinhow wants to merge 2 commits intoBelfrySCAD:masterfrom
junhinhow:feat/improve-test-coverage-231

Conversation

@junhinhow
Copy link
Copy Markdown

Summary

  • Add ~74 new asserts across 9 transform test functions (translate, move, scale, mirror, xflip, yflip, zflip, skew, frame_map)
  • Add ~80 new asserts across 8 vector test functions (unit, v_abs, v_floor, v_ceil, v_mul, v_div, v_theta, add_scalar)
  • Covers edge cases: zero vectors, negative values, identity transforms, 2D/3D variants

Test plan

  • All new asserts pass in OpenSCAD
  • No ECHO output produced
  • No regressions in existing tests

Addresses #231

🤖 Generated with Claude Code

Expanded tests for translate, move, scale, mirror, xflip, yflip,
zflip, skew, and frame_map with edge cases including:
- 2D vector inputs
- Zero/identity values
- Negative values
- Large values
- Double-operation identity (mirror*mirror = I)
- Composition properties (move(a)*move(b) = move(a+b))
- List of points transformations
- Angle-based skew parameters

Total new asserts: ~74 across 9 test functions.

Ref: BelfrySCAD#231
Expanded tests for unit, v_abs, v_floor, v_ceil, v_mul, v_div,
v_theta, and add_scalar with edge cases including:
- Zero vectors (2D and 3D)
- Negative values
- Already-normalized vectors
- Large and small magnitude values
- 2D vs 3D inputs
- Fractional and boundary values
- Self-division identity
- Precise angle calculations

Total new asserts: ~80 across 8 test functions.

Ref: BelfrySCAD#231
@adrianVmariano
Copy link
Copy Markdown
Collaborator

A general observation is that you're generating a ton of AI produced PRs and they all need to be examined to figure out what they do and if they have any issues, which requires human effort. Also we need comments to be in English, not Portuguese.

@junhinhow
Copy link
Copy Markdown
Author

Thanks for the feedback, Adrian! You're right on both points.

I've already updated all commit messages and comments to English across all PRs — that's fixed now.

Regarding the volume: I apologize for the burst of PRs. The intention was just to contribute where I could across the open issues. There's absolutely no rush to review any of these — please take your time and go through them at whatever pace works for you. Happy to address any issues or questions you find along the way.

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.

2 participants