@@ -95,6 +95,27 @@ create or replace package body ut_suite_builder is
9595 by_name tt_annotations_by_name
9696 );
9797
98+ function get_qualified_object_name(
99+ a_suite ut_suite_item, a_procedure_name t_object_name
100+ ) return varchar2 is
101+ l_result varchar2(1000);
102+ begin
103+ if a_suite is not null then
104+ l_result := upper( a_suite.object_owner || '.' || a_suite.object_name );
105+ if a_procedure_name is not null then
106+ l_result := l_result || upper( '.' || a_procedure_name );
107+ end if;
108+ end if;
109+ return l_result;
110+ end;
111+
112+ function get_object_reference(
113+ a_suite ut_suite_item, a_procedure_name t_object_name, a_line_no binary_integer
114+ ) return varchar2 is
115+ begin
116+ return chr( 10 ) || 'at package "' || get_qualified_object_name(a_suite, a_procedure_name) || '", line ' || a_line_no;
117+ end;
118+
98119 procedure delete_annotations_range(
99120 a_annotations in out nocopy t_annotations_info,
100121 a_start_pos t_annotation_position,
@@ -131,20 +152,6 @@ create or replace package body ut_suite_builder is
131152 -- Processing annotations
132153 -----------------------------------------------
133154
134- function get_qualified_object_name(
135- a_suite ut_suite_item, a_procedure_name t_object_name
136- ) return varchar2 is
137- l_result varchar2(1000);
138- begin
139- if a_suite is not null then
140- l_result := upper( a_suite.object_owner || '.' || a_suite.object_name );
141- if a_procedure_name is not null then
142- l_result := l_result || upper( '.' || a_procedure_name );
143- end if;
144- end if;
145- return l_result;
146- end;
147-
148155 procedure add_annotation_ignored_warning(
149156 a_suite in out nocopy ut_suite_item,
150157 a_annotation t_annotation_name,
@@ -154,8 +161,8 @@ create or replace package body ut_suite_builder is
154161 ) is
155162 begin
156163 a_suite.put_warning(
157- replace(a_message,'%%%','"--%'||a_annotation||'"') || ' Annotation ignored.'
158- || chr( 10 ) || 'at " ' || get_qualified_object_name( a_suite, a_procedure_name) || '", line ' || a_line_no
164+ replace(a_message,'%%%','"--%'||a_annotation||'"')
165+ || ' Annotation ignored. ' || get_object_reference( a_suite, a_procedure_name, a_line_no )
159166 );
160167 end;
161168
@@ -271,8 +278,8 @@ create or replace package body ut_suite_builder is
271278
272279 if l_exception_number is null then
273280 a_suite.put_warning(
274- 'Invalid parameter value "'||l_throws_list(i)||'" for "--%throws" annotation. Parameter ignored.'
275- || chr( 10 ) || 'at "' || get_qualified_object_name( a_suite, a_procedure_name) || '", line ' || a_line_no
281+ 'Invalid parameter value "'||l_throws_list(i)
282+ ||'" for "--%throws" annotation. Parameter ignored.'||get_object_reference( a_suite, a_procedure_name, a_line_no )
276283 );
277284 else
278285 l_exception_number_list.extend;
@@ -291,7 +298,7 @@ create or replace package body ut_suite_builder is
291298 if a_throws_ann_text(l_annotation_pos) is null then
292299 a_suite.put_warning(
293300 '"--%throws" annotation requires a parameter. Annotation ignored.'
294- || chr( 10 ) || 'at "' || get_qualified_object_name( a_suite, a_procedure_name) || '", line ' || l_annotation_pos
301+ || get_object_reference( a_suite, a_procedure_name, l_annotation_pos )
295302 );
296303 else
297304 a_list :=
@@ -321,7 +328,7 @@ create or replace package body ut_suite_builder is
321328 if a_tags_ann_text(l_annotation_pos) is null then
322329 a_suite.put_warning(
323330 '"--%tags" annotation requires a tag value populated. Annotation ignored.'
324- || chr( 10 ) || 'at "' || get_qualified_object_name( a_suite, a_procedure_name) || '", line ' || l_annotation_pos
331+ || get_object_reference( a_suite, a_procedure_name, l_annotation_pos )
325332 );
326333 else
327334 l_tag_list := l_tag_list multiset union distinct ut_utils.trim_list_elements(
0 commit comments