-
Notifications
You must be signed in to change notification settings - Fork 189
Replaced hard coded 0 in total test coverage #1140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,9 +79,10 @@ create or replace type body ut_coverage_cobertura_reporter is | |
| c_packages_footer constant varchar2(30) := '</packages>'; | ||
| c_package_footer constant varchar2(30) := '</package>'; | ||
| c_class_footer constant varchar2(30) := '</class>'; | ||
| c_classes_footer constant varchar2(30) := '</classes>'; | ||
| c_classes_footer constant varchar2(30) := '</classes>'; | ||
| c_lines_footer constant varchar2(30) := '</lines>'; | ||
| l_epoch varchar2(50) := (sysdate - to_date('01-01-1970 00:00:00', 'dd-mm-yyyy hh24:mi:ss')) * 24 * 60 * 60; | ||
| l_lines_valid number := a_coverage_data.covered_lines + a_coverage_data.uncovered_lines; | ||
| begin | ||
|
|
||
| ut_utils.append_to_list( l_result, ut_utils.get_xml_header(a_run.client_character_set) ); | ||
|
|
@@ -90,9 +91,11 @@ create or replace type body ut_coverage_cobertura_reporter is | |
| --write header | ||
| ut_utils.append_to_list( | ||
| l_result, | ||
| '<coverage line-rate="0" branch-rate="0.0" lines-covered="' | ||
| '<coverage line-rate="' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice small fix. Love it! |
||
| ||to_char(round((case l_lines_valid when 0 then 0 else a_coverage_data.covered_lines/(l_lines_valid) end), 17), rpad('FM0.',21,'9')) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it should probably be: See those failing tests for extra "." present there. |
||
| ||'" branch-rate="0.0" lines-covered="' | ||
| ||a_coverage_data.covered_lines||'" lines-valid="' | ||
| ||TO_CHAR(a_coverage_data.covered_lines + a_coverage_data.uncovered_lines) | ||
| ||TO_CHAR(l_lines_valid) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you make this TO_CHAR lowercase since you've touched this line? |
||
| ||'" branches-covered="0" branches-valid="0" complexity="0" version="1" timestamp="'||l_epoch||'">' | ||
| ); | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
integer will be better, as the lines are always integer