@@ -15,11 +15,6 @@ 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-
19- /**
20- * Regexp to validate tag
21- */
22- gc_word_no_space constant varchar2(50) := '^(\w|\S)+$';
2318
2419 subtype t_annotation_text is varchar2(4000);
2520 subtype t_annotation_name is varchar2(4000);
@@ -311,13 +306,13 @@ create or replace package body ut_suite_builder is
311306 l_annotation_pos := a_throws_ann_text.next(l_annotation_pos);
312307 end loop;
313308 end;
314-
315- procedure add_tags_to_test (
309+
310+ procedure add_tags_to_suite_item (
316311 a_suite in out nocopy ut_suite,
312+ a_tags_ann_text tt_annotation_texts,
317313 a_list in out nocopy ut_varchar2_rows,
318- a_procedure_name t_object_name,
319- a_tags_ann_text tt_annotation_texts
320- ) is
314+ a_procedure_name t_object_name := null
315+ ) is
321316 l_annotation_pos binary_integer;
322317 l_tag_list ut_varchar2_list := ut_varchar2_list();
323318 begin
@@ -333,14 +328,12 @@ create or replace package body ut_suite_builder is
333328 ut_utils.string_to_table(a_tags_ann_text(l_annotation_pos),',')
334329 );
335330 end if;
336- --remove empty strings from table list e.g. tag1,,tag2 and conver to rows
337- a_list := ut_utils.convert_collection( ut_utils.filter_list(l_tag_list,gc_word_no_space) );
338331 l_annotation_pos := a_tags_ann_text.next(l_annotation_pos);
339332 end loop;
340-
333+ --remove empty strings from table list e.g. tag1,,tag2 and conver to rows
334+ a_list := ut_utils.convert_collection( ut_utils.filter_list(l_tag_list,ut_utils.gc_word_no_space) );
341335 end;
342-
343-
336+
344337 procedure set_seq_no(
345338 a_list in out nocopy ut_executables
346339 ) is
@@ -521,7 +514,7 @@ create or replace package body ut_suite_builder is
521514 end if;
522515
523516 if l_proc_annotations.exists( gc_tag) then
524- add_tags_to_test (a_suite, l_test.tags, a_procedure_name, l_proc_annotations( gc_tag) );
517+ add_tags_to_suite_item (a_suite, l_proc_annotations( gc_tag), l_test.tags, a_procedure_name);
525518 end if;
526519
527520 if l_proc_annotations.exists( gc_throws) then
@@ -625,30 +618,6 @@ create or replace package body ut_suite_builder is
625618 a_suite.path := lower(coalesce(a_suite.path, a_suite.object_name));
626619 end;
627620
628- procedure add_tags_to_suite(
629- a_suite in out nocopy ut_suite,
630- a_tags_ann_text tt_annotation_texts
631- ) is
632- l_annotation_pos binary_integer;
633- l_tag_list ut_varchar2_list := ut_varchar2_list();
634- begin
635- l_annotation_pos := a_tags_ann_text.first;
636- while l_annotation_pos is not null loop
637- if a_tags_ann_text(l_annotation_pos) is null then
638- a_suite.put_warning(
639- '"--%tags" annotation requires a tag value populated. Annotation ignored, line ' || l_annotation_pos
640- );
641- else
642- l_tag_list := l_tag_list multiset union distinct ut_utils.trim_list_elements(
643- ut_utils.string_to_table(a_tags_ann_text(l_annotation_pos),',')
644- );
645- end if;
646- l_annotation_pos := a_tags_ann_text.next(l_annotation_pos);
647- end loop;
648- --remove empty strings from table list e.g. tag1,,tag2
649- a_suite.tags := ut_utils.convert_collection(ut_utils.filter_list(l_tag_list,gc_word_no_space));
650- end;
651-
652621 procedure add_suite_tests(
653622 a_suite in out nocopy ut_suite,
654623 a_annotations t_annotations_info,
@@ -699,7 +668,7 @@ create or replace package body ut_suite_builder is
699668 end if;
700669
701670 if a_annotations.by_name.exists(gc_tag) then
702- add_tags_to_suite (a_suite, a_annotations.by_name(gc_tag));
671+ add_tags_to_suite_item (a_suite, a_annotations.by_name(gc_tag),a_suite.tags );
703672 end if;
704673 a_suite.disabled_flag := ut_utils.boolean_to_int(a_annotations.by_name.exists(gc_disabled));
705674
0 commit comments