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

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make warnings uniformly indented
  • Loading branch information
Pazus committed Jun 28, 2017
commit 7f13ce0db020db339b51438f5be58a7b8bcf9051
7 changes: 6 additions & 1 deletion source/reporters/ut_documentation_reporter.tpb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ create or replace type body ut_documentation_reporter is
overriding member procedure after_calling_run(self in out nocopy ut_documentation_reporter, a_run in ut_run) as
l_summary_text varchar2(4000);
l_warning_index pls_integer := 0;
l_warnings_lpad integer;

procedure print_failure_for_expectation(a_expectation ut_expectation_result) is
l_lines ut_varchar2_list;
Expand Down Expand Up @@ -154,7 +155,7 @@ create or replace type body ut_documentation_reporter is
if a_item.warnings is not null and a_item.warnings.count > 0 then
for i in 1 .. a_item.warnings.count loop
l_warning_index := l_warning_index + 1;
self.print_text(' ' || l_warning_index || ') ' || a_item.path);
self.print_text(' ' || lpad(l_warning_index, l_warnings_lpad) || ') ' || a_item.path);
self.lvl := self.lvl + 3;
self.print_red_text(a_item.warnings(i));
self.lvl := self.lvl - 3;
Expand All @@ -180,6 +181,10 @@ create or replace type body ut_documentation_reporter is
print_failures_details(a_run);
print_warnings(a_run);
self.print_text('Finished in ' || a_run.execution_time || ' seconds');

-- make all warning indexes uniformly indented
l_warnings_lpad := length(to_char(a_run.results_count.warnings_count));

l_summary_text :=
a_run.results_count.total_count || ' tests, '
|| a_run.results_count.failure_count || ' failed, ' || a_run.results_count.errored_count || ' errored, '
Expand Down