Skip to content

Conversation

pesse
Copy link
Member

@pesse pesse commented Dec 19, 2019

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
@pesse pesse requested a review from jgebal December 19, 2019 20:18
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),
Copy link
Member

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.

Copy link
Member Author

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?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right

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
Copy link
Member

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.

Copy link
Member

@jgebal jgebal left a 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)

@jgebal jgebal merged commit 587f966 into develop Dec 20, 2019
@jgebal jgebal added this to the 3.1.10 milestone Dec 20, 2019
@jgebal jgebal added the bugfix label Dec 20, 2019
@jgebal jgebal deleted the bugfix/nested_context_mixup branch December 20, 2019 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nested Contexts get mixed up
2 participants