forked from everactive/bathtub
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement Rule #71
Merged
Merged
Implement Rule #71
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Implementing Gherkin rule syntax. - modified: test/bathtub_pkg_test_suite/gherkin_parser_unit_test.sv - New test for rule. - Doesn't fail because the keyword is not recognized, so it is treated as a description.
Reference the rule class, which doesn't exist yet.
- modified: src/bathtub_pkg/gherkin_document_printer/gherkin_document_printer.svh - modified: src/bathtub_pkg/gherkin_document_runner/gherkin_document_runner.svh - Placeholder for `visit_rule()` - modified: src/gherkin_pkg/gherkin_pkg.sv - New class `rule` - New struct type `rule_value`
- modified: src/gherkin_pkg/gherkin_pkg.sv - Add member `rules` to class `feature` - Add member `background` to class `rule` - modified: test/bathtub_pkg_test_suite/gherkin_parser_unit_test.sv - Test feature has a member `rules`
- modified: src/bathtub_pkg/gherkin_parser/gherkin_parser.svh - Update `parse_feature_description()` so keyword "Rule" is not interpreted as description. - New method `parse_rule_description()` implements rules for parsing the rule description. - Read new file `parse_rule.svh`. - modified: src/bathtub_pkg/gherkin_parser/parse_feature.svh - Handle "Rule" keyword. - new file: src/bathtub_pkg/gherkin_parser/parse_rule.svh - New file parses rules. - Based on `parse_feature.svh` since they're very similar.. - modified: test/bathtub_pkg_test_suite/gherkin_parser_unit_test.sv - Test that rule was successfully parsed. - Passes.
- modified: test/bathtub_pkg_test_suite/gherkin_parser_unit_test.sv - Add scenario checking to `Test_that_parser_parses_simple_rule` - New unit test `Test_that_parser_parses_rule_with_scenario_outline`
- modified: test/bathtub_pkg_test_suite/gherkin_parser_unit_test.sv - New test `Test_that_parser_parses_rule_with_scenario_definitions`
- modified: test/bathtub_pkg_test_suite/gherkin_parser_unit_test.sv - New test `Test_that_parser_parses_rule_with_description`
…runner.svh - Add rule support to runner. - New `rule_background` member which gets run at the beginning of every scenario. - Fixed a bug where `visit_feature()` was hanging if there were no scenarios. - Visit rules from `visit_feature()` - New `visit_rule()` task for running rules. - modified: src/bathtub_pkg/scenario_sequence.svh - Run rules from scenario sequence. - new file: test/e2e/gherkin_parser/__init__.py - Make the module a package to prevent namespace collisions. - new file: test/e2e/gherkin_parser/features/rules.feature - Feature file to test rule parser. - new file: test/e2e/gherkin_parser/gherkin_parser.f - Options file for `gherkin_parser` tests. - new file: test/e2e/gherkin_parser/gherkin_parser_env.svh - Environment class for `gherkin_parser` tests. - new file: test/e2e/gherkin_parser/gherkin_parser_step_def_seqs.svh - Step definition sequences for `gherkin_parser` tests. - Contains only mock step. - new file: test/e2e/gherkin_parser/gherkin_parser_tb_top.sv - Top testbench module for `gherkin_parser` tests. - new file: test/e2e/gherkin_parser/gherkin_parser_test.py - New end-to-end test for rules. - new file: test/e2e/gherkin_parser/gherkin_parser_tests.svh - Include `gherkin_parser` tests. - new file: test/e2e/gherkin_parser/tests/gherkin_parser_rules_test.svh - New end-to-end test for rules. - Not self-checking yet, but it doesn't crash or hang.
- modified: test/e2e/gherkin_parser/tests/gherkin_parser_rules_test.svh - Test is now self-checking. - Expected values are hard-coded in the test. - This is not great, but it will do for now.
Add rule printing support to gherkin printer. - modified: src/bathtub_pkg/gherkin_document_printer/gherkin_document_printer.svh - Visit rules from `visit_feature()`. - `visit_rule()` is currently a placeholder that triggers an error, causing the test to fail for now. - modified: test/e2e/gherkin_parser/gherkin_parser_test.py - New test `test_gherkin_printer_e2e` runs a rule test with high verbosity so the Gherkin printer prints the feature file. - Not self-checking yet, other than checking that the test runs and passes. - Doesn't check output yet.
- modified: src/bathtub_pkg/gherkin_document_printer/gherkin_document_printer.svh - Built out `visit_rule()` task, based on `visit_feature()`. - Discovered that Questa treated my indentations as integers. - Refactored indentations into static `indent()` function that produces strings.
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.