Add SpanCollector tests#32
Conversation
Reviewer's GuideThis PR introduces a new test module for SpanCollector, adding two unit tests that verify the collector’s initialization and its into_parts method. Class diagram for SpanCollector test additionsclassDiagram
class SpanCollector {
+new(tokens, src, extra)
+into_parts()
spans
stream
extra
}
class SpanCollectorTest {
+new_initialises_stream_and_state()
+into_parts_returns_collected_spans_and_extra()
}
SpanCollectorTest ..> SpanCollector : tests
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing Touches🧪 Generate Unit Tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
5b98773
into
codex/encapsulate-token-utility-functions
* Add SpanCollector tests * Rename test and document TokenStream usage
* Add SpanCollector tests * Rename test and document TokenStream usage
* Introduce TokenStream abstraction * Update rstest dependency * Refine TokenStream API * 📝 Add docstrings to `codex/encapsulate-token-utility-functions` (#31) Docstrings generation was requested by @leynos. * #30 (comment) The following files were modified: * `src/parser/mod.rs` * `src/parser/span_collector.rs` * `src/parser/token_stream.rs` Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Add SpanCollector tests (#32) * Add SpanCollector tests * Rename test and document TokenStream usage * Simplify token stream control flow Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Spelling Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Summary
Testing
make fmtmake lintmake testhttps://chatgpt.com/codex/tasks/task_e_685fdacd5ce88322a1bfdbcb7e28684f
Summary by Sourcery
Add unit tests for SpanCollector to verify its initialization and into_parts behavior
Tests: