@@ -15,7 +15,7 @@ create or replace package body ut_suite_builder is
1515 See the License for the specific language governing permissions and
1616 limitations under the License.
1717 */
18-
18+
1919 subtype t_annotation_text is varchar2(4000);
2020 subtype t_annotation_name is varchar2(4000);
2121 subtype t_object_name is varchar2(500);
@@ -315,13 +315,13 @@ create or replace package body ut_suite_builder is
315315 l_annotation_pos := a_throws_ann_text.next(l_annotation_pos);
316316 end loop;
317317 end;
318-
318+
319319 procedure add_tags_to_suite_item(
320320 a_suite in out nocopy ut_suite,
321321 a_tags_ann_text tt_annotation_texts,
322322 a_list in out nocopy ut_varchar2_rows,
323323 a_procedure_name t_object_name := null
324- ) is
324+ ) is
325325 l_annotation_pos binary_integer;
326326 l_tags_list ut_varchar2_list := ut_varchar2_list();
327327 l_tag_items ut_varchar2_list;
@@ -354,7 +354,7 @@ create or replace package body ut_suite_builder is
354354 --remove empty strings from table list e.g. tag1,,tag2 and convert to rows
355355 a_list := ut_utils.convert_collection( ut_utils.filter_list(set(l_tags_list),ut_utils.gc_word_no_space) );
356356 end;
357-
357+
358358 procedure set_seq_no(
359359 a_list in out nocopy ut_executables
360360 ) is
@@ -533,16 +533,16 @@ create or replace package body ut_suite_builder is
533533 );
534534 set_seq_no(l_test.after_test_list);
535535 end if;
536-
536+
537537 if l_proc_annotations.exists( gc_tags) then
538538 add_tags_to_suite_item(a_suite, l_proc_annotations( gc_tags), l_test.tags, a_procedure_name);
539539 end if;
540-
540+
541541 if l_proc_annotations.exists( gc_throws) then
542542 add_to_throws_numbers_list(a_suite, l_test.expected_error_codes, a_procedure_name, l_proc_annotations( gc_throws));
543543 end if;
544544 l_test.disabled_flag := ut_utils.boolean_to_int( l_proc_annotations.exists( gc_disabled));
545-
545+
546546 a_suite_items.extend;
547547 a_suite_items( a_suite_items.last ) := l_test;
548548
@@ -687,7 +687,7 @@ create or replace package body ut_suite_builder is
687687 if a_annotations.by_name.exists(gc_aftereach) then
688688 l_after_each_list := add_executables( a_suite.object_owner, a_suite.object_name, a_annotations.by_name(gc_aftereach), gc_aftereach );
689689 end if;
690-
690+
691691 if a_annotations.by_name.exists(gc_tags) then
692692 add_tags_to_suite_item(a_suite, a_annotations.by_name(gc_tags),a_suite.tags);
693693 end if;
@@ -730,22 +730,22 @@ create or replace package body ut_suite_builder is
730730 begin
731731 if a_package_annotations.exists(gc_endcontext) and a_package_annotations.exists(gc_context) then
732732 l_next_endcontext_pos := get_next_annotation_of_type(a_context_ann_pos, gc_endcontext, a_package_annotations);
733- l_next_context_pos := a_package_annotations(gc_context).next(a_context_ann_pos);
733+ l_next_context_pos := a_package_annotations(gc_context).next(a_context_ann_pos);
734734
735735 loop
736- -- Get all the %context annotations between start and first %endcontext
736+ -- Get all the %context annotations between start and first %endcontext
737737 while l_next_context_pos is not null and l_next_context_pos < l_next_endcontext_pos loop
738- l_open_count := l_open_count+1;
739- l_next_context_pos := a_package_annotations(gc_context).next(l_next_context_pos);
740- end loop;
741- -- Skip as many %endcontexts as we had additional contexts open
742- while l_open_count > 0 loop
743- l_open_count := l_open_count-1;
744- l_next_endcontext_pos := a_package_annotations(gc_endcontext).next(l_next_endcontext_pos);
745- end loop;
746- -- Repeat until the next %context is later than next %endcontext
747- exit when l_next_context_pos is null or l_next_context_pos > l_next_endcontext_pos;
748- end loop;
738+ l_open_count := l_open_count+1;
739+ l_next_context_pos := a_package_annotations(gc_context).next(l_next_context_pos);
740+ end loop;
741+ -- Skip as many %endcontexts as we had additional contexts open
742+ while l_open_count > 0 loop
743+ l_open_count := l_open_count-1;
744+ l_next_endcontext_pos := a_package_annotations(gc_endcontext).next(l_next_endcontext_pos);
745+ end loop;
746+ -- Repeat until the next %context is later than next %endcontext
747+ exit when l_next_context_pos is null or l_next_context_pos > l_next_endcontext_pos;
748+ end loop;
749749 end if;
750750 return l_next_endcontext_pos;
751751 end;
@@ -758,11 +758,11 @@ create or replace package body ut_suite_builder is
758758 l_next_context_pos t_annotation_position;
759759 begin
760760 if ( a_package_annotations.exists(gc_endcontext) and a_package_annotations.exists(gc_context)) then
761- l_next_endcontext_pos := get_next_annotation_of_type(a_context_ann_pos, gc_endcontext, a_package_annotations);
762- l_next_context_pos := a_package_annotations(gc_context).next(a_context_ann_pos);
763- if ( l_next_context_pos < l_next_endcontext_pos ) then
764- return true;
765- end if;
761+ l_next_endcontext_pos := get_next_annotation_of_type(a_context_ann_pos, gc_endcontext, a_package_annotations);
762+ l_next_context_pos := a_package_annotations(gc_context).next(a_context_ann_pos);
763+ if ( l_next_context_pos < l_next_endcontext_pos ) then
764+ return true;
765+ end if;
766766 end if;
767767 return false;
768768 end;
@@ -834,17 +834,17 @@ create or replace package body ut_suite_builder is
834834 );
835835 l_annotation_pos := l_context_names.first;
836836
837- while l_annotation_pos is not null loop
838- if l_annotation_pos > a_start_position and l_annotation_pos < l_end_position then
839- if l_found then
840- add_annotation_ignored_warning(a_parent, gc_name,'Duplicate annotation %%%.', l_annotation_pos);
841- else
842- l_result := l_context_names(l_annotation_pos);
843- end if;
844- l_found := true;
845- end if;
846- l_annotation_pos := l_context_names.next(l_annotation_pos);
847- end loop;
837+ while l_annotation_pos is not null loop
838+ if l_annotation_pos > a_start_position and l_annotation_pos < l_end_position then
839+ if l_found then
840+ add_annotation_ignored_warning(a_parent, gc_name,'Duplicate annotation %%%.', l_annotation_pos);
841+ else
842+ l_result := l_context_names(l_annotation_pos);
843+ end if;
844+ l_found := true;
845+ end if;
846+ l_annotation_pos := l_context_names.next(l_annotation_pos);
847+ end loop;
848848 end if;
849849 return l_result;
850850 end;
@@ -918,7 +918,7 @@ create or replace package body ut_suite_builder is
918918 l_context_pos := a_annotations.by_name( gc_context).next( l_context_pos);
919919 -- don't go on when the next context is outside the parent's context boundaries
920920 if ( a_parent_end_context_pos is not null and a_parent_end_context_pos <= l_context_pos ) then
921- l_context_pos := null;
921+ l_context_pos := null;
922922 end if;
923923 l_context_no := l_context_no + 1;
924924 end loop;
0 commit comments