Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f13ce0

Browse files
committed
make warnings uniformly indented
1 parent 7b5e02e commit 7f13ce0

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

source/reporters/ut_documentation_reporter.tpb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ create or replace type body ut_documentation_reporter is
8686
overriding member procedure after_calling_run(self in out nocopy ut_documentation_reporter, a_run in ut_run) as
8787
l_summary_text varchar2(4000);
8888
l_warning_index pls_integer := 0;
89+
l_warnings_lpad integer;
8990

9091
procedure print_failure_for_expectation(a_expectation ut_expectation_result) is
9192
l_lines ut_varchar2_list;
@@ -154,7 +155,7 @@ create or replace type body ut_documentation_reporter is
154155
if a_item.warnings is not null and a_item.warnings.count > 0 then
155156
for i in 1 .. a_item.warnings.count loop
156157
l_warning_index := l_warning_index + 1;
157-
self.print_text(' ' || l_warning_index || ') ' || a_item.path);
158+
self.print_text(' ' || lpad(l_warning_index, l_warnings_lpad) || ') ' || a_item.path);
158159
self.lvl := self.lvl + 3;
159160
self.print_red_text(a_item.warnings(i));
160161
self.lvl := self.lvl - 3;
@@ -180,6 +181,10 @@ create or replace type body ut_documentation_reporter is
180181
print_failures_details(a_run);
181182
print_warnings(a_run);
182183
self.print_text('Finished in ' || a_run.execution_time || ' seconds');
184+
185+
-- make all warning indexes uniformly indented
186+
l_warnings_lpad := length(to_char(a_run.results_count.warnings_count));
187+
183188
l_summary_text :=
184189
a_run.results_count.total_count || ' tests, '
185190
|| a_run.results_count.failure_count || ' failed, ' || a_run.results_count.errored_count || ' errored, '

0 commit comments

Comments
 (0)