-
Notifications
You must be signed in to change notification settings - Fork 185
Changed ordering of tests for suites with context #1037
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
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.
Test OK.
Tested on local develop-environment with APP-user on ut3
. Changes in position of --%context
and --%test
annotations are correctly reflected in the output.
Test-package used:
create or replace package ut_context_test as
-- %suite(Context Test)
-- %suitepath(context)
-- %context(Level 2)
--%name(proj_same)
-- %test(Test 2.1 )
procedure test_2_1;
-- %endcontext
-- %context(Level 1)
--%name(proj_diff)
-- %context(Level 1.1)
-- %test(Test 1.1.2)
procedure test_1_1_2;
-- %test(Test 1.1.1)
procedure test_1_1_1;
-- %endcontext
-- %endcontext
end;
/
case when c.obj.self_type = 'UT_SUITE_CONTEXT' then | ||
( select max( x.line_no ) + 1 | ||
from ut_suite_cache x | ||
where c.obj.object_owner = x.object_owner and c.obj.object_name = x.object_name and |
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.
Aligning the multiple criteria would improve readability, or?
where c.obj.object_owner = x.boject_owner
and c.obj.object_name = x.object_name
and x.path like c.obj.path || '.%'
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.
Fixed
then substr(c.obj.path, 1, instr(c.obj.path, '.', -1) ) | ||
else c.obj.path | ||
end, '.', chr(0) | ||
substr( c.obj.path, 1, instr( c.obj.path, lower(c.obj.object_name), -1 ) + length(c.obj.object_name) ), |
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.
I find this very hard to read/understand. I guess extracting to a helper function would be too much overhead - can we add a comment to explain the intention?
-- get path until object's name
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.
It is documented properly now.
Thanks for this comment. It helps me a lot to see what is not obvious/clear.
234be36
to
1da8720
Compare
Fixed SQL formatting.
1da8720
to
326e055
Compare
@pesse - Can you review and check if you're OK with the changes after requested fixes? |
Resolves #1036