@@ -43,7 +43,10 @@ create or replace package body ut_suite_builder is
4343 l_aftertest_procedure varchar2(250 char);
4444 l_rollback_type integer;
4545 l_displayname varchar2(4000);
46-
46+ function is_last_annotation_for_proc(a_annotations ut_annotations, a_index binary_integer) return boolean is
47+ begin
48+ return a_index = a_annotations.count or a_annotations(a_index).subobject_name != nvl(a_annotations(a_index+1).subobject_name, ' ');
49+ end;
4750 begin
4851 l_suite_rollback := ut_utils.gc_rollback_auto;
4952 for i in 1 .. a_object.annotations.count loop
@@ -100,17 +103,15 @@ create or replace package body ut_suite_builder is
100103 end if;
101104 end if;
102105
103- if l_is_test
104- and (i = a_object.annotations.count
105- or l_proc_name != nvl(a_object.annotations(i+1).subobject_name, ' ') ) then
106+ if l_is_test and is_last_annotation_for_proc(a_object.annotations, i) then
106107 l_suite_items.extend;
107108 l_suite_items(l_suite_items.last) :=
108109 ut_test(a_object_owner => a_object.object_owner
109110 ,a_object_name => a_object.object_name
110111 ,a_name => l_proc_name
111112 ,a_description => l_displayname
112113 ,a_rollback_type => coalesce(l_rollback_type, l_suite_rollback)
113- ,a_disabled_flag => l_suite_disabled or l_test_disabled
114+ ,a_disabled_flag => l_test_disabled
114115 ,a_before_test_proc_name => l_beforetest_procedure
115116 ,a_after_test_proc_name => l_aftertest_procedure);
116117
0 commit comments