Changed ordering of tests for suites with context#1037
Conversation
pesse
left a comment
There was a problem hiding this comment.
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.
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 || '.%'
| 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.
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.
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