File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,5 +141,22 @@ create or replace package body ut_runner is
141141 return;
142142 end;
143143
144+ function is_output_reporter( a_reporter_name varchar2 ) return varchar is
145+ l_result varchar2(1);
146+ l_reporter_name varchar2(32) := regexp_replace(a_reporter_name, '[^a-zA-Z0-9_]', '');
147+ l_owner varchar2(128) := ut_utils.ut_owner();
148+ begin
149+ execute immediate '
150+ select
151+ case
152+ when '||l_reporter_name||'() is of ('||l_owner||'.ut_output_reporter_base) then ''Y''
153+ when '||l_reporter_name||'() is of ('||l_owner||'.ut_reporter_base) then ''N''
154+ end
155+ from dual' into l_result;
156+ return l_result;
157+ exception when others then
158+ return null;
159+ end;
160+
144161end ut_runner;
145162/
Original file line number Diff line number Diff line change @@ -99,6 +99,16 @@ create or replace package ut_runner authid current_user is
9999 */
100100 function get_unit_test_info(a_owner varchar2, a_package_name varchar2 := null) return tt_annotations pipelined;
101101
102+ /** Checks whether a reporter is an output reporter or not
103+ * If reporter is of ut_output_reporter_base, returns 'Y'
104+ * If reporter is of ut_reporter_base, returns 'N'
105+ * Otherwise returns NULL
106+ *
107+ * @param a_reporter_name Name of the reporter to check
108+ * @return Y, N or NULL
109+ */
110+ function is_output_reporter( a_reporter_name varchar2 ) return varchar;
111+
102112
103113end ut_runner;
104114/
You can’t perform that action at this time.
0 commit comments