Add unit tests for actor_types.rs primitive BIF generators (BT-2153)#2178
Add unit tests for actor_types.rs primitive BIF generators (BT-2153)#2178
Conversation
…tors BT-2153 reference_extra, no_extra, generate_future_bif, and generate_file_handle_bif had 0% coverage; pid_extra's fallback arm was also untested. Adds 14 per-selector unit tests using the established doc_to_string pattern, bringing line coverage from 38% to near-complete for this file. https://claude.ai/code/session_01Du94UjEjUzQfNe2eiWYpNS
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUnit tests were added to ChangesActor Type Generator Tests
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Pull request overview
Adds unit tests for the Core Erlang primitive BIF generators in actor_types.rs, closing a coverage gap in the beamtalk-core codegen primitives layer.
Changes:
- Adds a new
#[cfg(test)]module with assertions forpid_extra,reference_extra, andno_extra(including unknown-selector fallbacks). - Adds unit tests for
generate_future_bifcovering supported selectors and the unknown-selector fallback. - Adds unit tests for
generate_file_handle_bifcovering supported selectors and the unknown-selector fallback.
Summary
actor_types.rsprimitive BIF generators, covering 4 previously-untested functions:reference_extra,no_extra,generate_future_bif,generate_file_handle_bif, pluspid_extra's fallback armdoc_to_stringpattern from sibling modules (binary.rs,error_handling.rs)Test plan
cargo test -p beamtalk-core -- codegen::core_erlang::primitives::actor_types— 14/14 passcargo clippy -p beamtalk-core -- -D warnings— cleancargo fmt --package beamtalk-core -- --check— cleanhttps://linear.app/beamtalk/issue/BT-2153
https://claude.ai/code/session_01Du94UjEjUzQfNe2eiWYpNS
Generated by Claude Code
Summary by CodeRabbit