-
Notifications
You must be signed in to change notification settings - Fork 187
Bugfix/nested context mixup #1035
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
Conversation
We need to make sure to calculate the corrent %endcontext annotation, not just the first that is greater than the next nested %context. To operate correctly during recursion we also need information about the parent %endcontext position Fixes #1034
ut3.ut_annotation( 1, 'suite','Cool', null), | ||
ut3.ut_annotation( 2, 'suitepath','path', null), | ||
ut3.ut_annotation( 3, 'context','Level 1', null), | ||
ut3.ut_annotation( 4, 'name','context_1', null), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add some tests in parent context of nested context before/after nested context.
I wonder if this will still work as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that already done with nested_contexts
test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right
Using simple parenthesis counter and annotations_by_line
add_annotation_ignored_warning(a_parent, gc_name,'Duplicate annotation %%%.', l_annotation_pos); | ||
else | ||
l_result := a_context_names(l_annotation_pos); | ||
if a_annotations.by_name.exists(gc_name) then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks really great.
Nice improvement to code readability and functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great now.
Once we fix default ordering of contexts we should be good to release 3.1.10 (with those minor fixes)
get_context_items