test: Add a DFA test case for a capture group with repetition; Deduplicate DFA test code.#112
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThe test suite for DFA serialization was refactored to use a new helper function that constructs DFAs from schema strings internally, serializes them, and compares the output to expected results. All test cases were updated to use this function, and a new test for repetition with tagged captures was added. Changes
Sequence Diagram(s)sequenceDiagram
participant TestCase
participant test_dfa
participant Schema
participant NFA
participant DFA
TestCase->>test_dfa: Call with schema strings, expected output
test_dfa->>Schema: Construct and add variables from schema strings
test_dfa->>Schema: Extract schema AST
test_dfa->>NFA: Create lexical rules from schema variables
test_dfa->>NFA: Build NFA from rules
test_dfa->>DFA: Convert NFA to DFA
test_dfa->>DFA: Serialize DFA
test_dfa->>TestCase: Compare serialized output to expected
Possibly related PRs
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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
Documentation and Community
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Description
Add DFA tests for:
Clean up existing tests to be more concise.
Validation performed
New tests run successfully.
Summary by CodeRabbit