Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4ca671e

Browse files
committed
addressed review comments
1 parent 8a6f642 commit 4ca671e

3 files changed

Lines changed: 11 additions & 28 deletions

File tree

source/core/types/ut_test_object.tpb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ create or replace type body ut_test_object is
2626

2727
self.rollback_type := a_rollback_type;
2828
end;
29-
30-
member procedure set_object_path(self in out nocopy ut_test_object, a_path varchar2) is
31-
begin
32-
if lower(a_path) not like lower('%'||self.object_name) then
33-
raise_application_error(-20200,'Incorrect object path');
34-
end if;
35-
self.object_path := a_path;
36-
end;
3729

3830
member function execution_time return number is
3931
l_sec number;

source/core/types/ut_test_object.tps

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ create or replace type ut_test_object force under ut_composite_object
1515

1616
member procedure set_ignore_flag(self in out nocopy ut_test_object, a_ignore_flag boolean),
1717
member procedure set_rollback_type(self in out nocopy ut_test_object, a_rollback_type integer),
18-
member procedure set_object_path(self in out nocopy ut_test_object, a_path varchar2),
1918

2019
member function execution_time return number
2120
)

source/core/ut_suite_manager.pkb

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ create or replace package body ut_suite_manager is
4646
if l_annotation_data.package_annotations.exists('suitepackage') then
4747
l_suite_package := ut_annotations.get_annotation_param(l_annotation_data.package_annotations('suitepackage'), 1) || '.' ||
4848
lower(l_object_name);
49-
--else
50-
-- l_suite_package := lower(l_object_name);
5149
end if;
5250

5351
if l_annotation_data.package_annotations.exists('rollback') then
@@ -187,7 +185,6 @@ create or replace package body ut_suite_manager is
187185
l_ind := a_root_suite.item_index(l_temp_root);
188186

189187
if l_ind is null then
190-
--l_cur_item := ut_test_suite(null, l_temp_root);
191188
l_cur_item := ut_test_suite(a_suite_name => null
192189
,a_object_name => l_temp_root
193190
,a_object_path => l_path);
@@ -357,9 +354,7 @@ create or replace package body ut_suite_manager is
357354
else
358355
for i in 1 .. a_paths.count loop
359356
l_path := a_paths(i);
360-
if regexp_like(l_path, '^\w+(\.\w+){0,2}$') or regexp_like(l_path, '^\w+:\w+(\.\w+)*$') then
361-
null;
362-
else
357+
if l_path is null or not (regexp_like(l_path, '^\w+(\.\w+){0,2}$') or regexp_like(l_path, '^\w+:\w+(\.\w+)*$')) then
363358
raise_application_error(ut_utils.gc_invalid_path_format, 'Invalid path format: ' || nvl(l_path, 'NULL'));
364359
end if;
365360
end loop;
@@ -460,22 +455,19 @@ create or replace package body ut_suite_manager is
460455
l_path := rtrim(l_schema || ':' || l_temp_suite.object_path || '.' || l_procedure_name, '.');
461456
end;
462457
end if;
458+
459+
-- fully quilified path branch in the form
460+
-- by this time it's the only format left
461+
-- schema:suite.suite.suite
462+
l_suite_path := regexp_substr(l_path, ':(.+)', subexpression => 1);
463+
l_root_suite_name := regexp_substr(l_suite_path, '^\w+');
463464

464-
if regexp_like(l_path, '^\w+:.+$') then
465-
-- fully quilified path branch in the form
466-
-- schema:suite.suite.suite
467-
468-
l_suite_path := regexp_substr(l_path, ':(.+)', subexpression => 1);
469-
l_root_suite_name := regexp_substr(l_suite_path, '^\w+');
470-
471-
l_suite := l_schema_suites(l_root_suite_name);
465+
l_suite := l_schema_suites(l_root_suite_name);
472466

473-
--set_skipped_flag(l_suite, l_suite_path);
474-
set_skipped_flag(l_suite, regexp_substr(l_suite_path, '\.(.+)', subexpression => 1));
467+
set_skipped_flag(l_suite, regexp_substr(l_suite_path, '\.(.+)', subexpression => 1));
475468

476-
l_objects_to_run.extend;
477-
l_objects_to_run(l_objects_to_run.count) := l_suite;
478-
end if;
469+
l_objects_to_run.extend;
470+
l_objects_to_run(l_objects_to_run.count) := l_suite;
479471

480472
end if;
481473

0 commit comments

Comments
 (0)