-
Notifications
You must be signed in to change notification settings - Fork 189
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
Changes from 1 commit
e8f4532
8df3f7d
a4d92de
4d1500f
3c547ec
b4c1d72
86185a8
89df1dd
c61abfa
35acf14
3327fc3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
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
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -767,6 +767,74 @@ create or replace package body test_suite_builder is | |
| ); | ||
| end; | ||
|
|
||
| procedure nested_contexts_2 is | ||
| l_actual clob; | ||
| l_annotations ut3.ut_annotations; | ||
| begin | ||
| --Arrange | ||
| l_annotations := ut3.ut_annotations( | ||
| 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), | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Isn't that already done with
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Right |
||
| ut3.ut_annotation( 5, 'context','Level 1.1', null), | ||
| ut3.ut_annotation( 6, 'name','context_1_1', null), | ||
| ut3.ut_annotation( 7, 'test', 'Test 1.1.1', 'test_1_1_1'), | ||
| ut3.ut_annotation( 8, 'test', 'Test 1.1.2', 'test_1_1_2'), | ||
| ut3.ut_annotation( 9, 'endcontext', null, null), | ||
| ut3.ut_annotation(10, 'endcontext', null, null), | ||
| ut3.ut_annotation(11, 'context','Level 2', null), | ||
| ut3.ut_annotation(12, 'name','context_2', null), | ||
| ut3.ut_annotation(13, 'test', 'Test 2.1', 'test_2_1'), | ||
| ut3.ut_annotation(14, 'endcontext',null, null) | ||
| ); | ||
| --Act | ||
| l_actual := invoke_builder_for_annotations(l_annotations, 'SOME_PACKAGE'); | ||
| --Assert | ||
| ut.expect(l_actual).to_be_like( | ||
| '<ROWSET><ROW>'|| | ||
| '<UT_LOGICAL_SUITE>' || | ||
| '%<ITEMS>%' || | ||
| '<UT_SUITE_ITEM>' || | ||
| '%<NAME>context_1</NAME><DESCRIPTION>Level 1</DESCRIPTION><PATH>path.some_package.context_1</PATH>' || | ||
| '%<ITEMS>' || | ||
| '<UT_SUITE_ITEM>' || | ||
| '%<NAME>context_1_1</NAME><DESCRIPTION>Level 1.1</DESCRIPTION><PATH>path.some_package.context_1.context_1_1</PATH>' || | ||
| '%<ITEMS>' || | ||
| '<UT_SUITE_ITEM>' || | ||
| '%<NAME>test_1_1_1</NAME><DESCRIPTION>Test 1.1.1</DESCRIPTION><PATH>path.some_package.context_1.context_1_1.test_1_1_1</PATH>' || | ||
| '%</UT_SUITE_ITEM>' || | ||
| '<UT_SUITE_ITEM>' || | ||
| '%<NAME>test_1_1_2</NAME><DESCRIPTION>Test 1.1.2</DESCRIPTION><PATH>path.some_package.context_1.context_1_1.test_1_1_2</PATH>' || | ||
| '%</UT_SUITE_ITEM>' || | ||
| '</ITEMS>' || | ||
| '%<BEFORE_ALL_LIST/>' || | ||
| '%</UT_SUITE_ITEM>' || | ||
| '</ITEMS>' || | ||
| '%</UT_SUITE_ITEM>' || | ||
| '%</ITEMS>' || | ||
| '%</UT_LOGICAL_SUITE>'|| | ||
| '</ROW></ROWSET>' | ||
| ); | ||
| -- Test both contexts separately due to ordering | ||
| ut.expect(l_actual).to_be_like( | ||
| '<ROWSET><ROW>'|| | ||
| '<UT_LOGICAL_SUITE>' || | ||
| '%<ITEMS>%' || | ||
| '<UT_SUITE_ITEM>' || | ||
| '%<NAME>context_2</NAME><DESCRIPTION>Level 2</DESCRIPTION><PATH>path.some_package.context_2</PATH>' || | ||
| '%<ITEMS>' || | ||
| '<UT_SUITE_ITEM>' || | ||
| '%<NAME>test_2_1</NAME><DESCRIPTION>Test 2.1</DESCRIPTION><PATH>path.some_package.context_2.test_2_1</PATH>' || | ||
| '%</UT_SUITE_ITEM>' || | ||
| '%</ITEMS>' || | ||
| '%</UT_SUITE_ITEM>' || | ||
| '%</ITEMS>' || | ||
| '%</UT_LOGICAL_SUITE>'|| | ||
| '</ROW></ROWSET>' | ||
| ); | ||
| end; | ||
|
|
||
|
|
||
| procedure before_after_in_context is | ||
| l_actual clob; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.