Skip to content

Commit

Permalink
Use as_secs_f64 in JunitFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
fee1-dead committed Jun 16, 2021
1 parent 2336406 commit e4b3131
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/test/src/formatters/junit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
name=\"{}\" time=\"{}\">",
class_name,
test_name,
duration.as_secs()
duration.as_secs_f64()
))?;
self.write_message("<failure type=\"assert\"/>")?;
self.write_message("</testcase>")?;
Expand All @@ -91,7 +91,7 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
name=\"{}\" time=\"{}\">",
class_name,
test_name,
duration.as_secs()
duration.as_secs_f64()
))?;
self.write_message(&*format!("<failure message=\"{}\" type=\"assert\"/>", m))?;
self.write_message("</testcase>")?;
Expand All @@ -103,7 +103,7 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
name=\"{}\" time=\"{}\">",
class_name,
test_name,
duration.as_secs()
duration.as_secs_f64()
))?;
self.write_message("<failure type=\"timeout\"/>")?;
self.write_message("</testcase>")?;
Expand All @@ -123,7 +123,7 @@ impl<T: Write> OutputFormatter for JunitFormatter<T> {
name=\"{}\" time=\"{}\"/>",
class_name,
test_name,
duration.as_secs()
duration.as_secs_f64()
))?;
}
}
Expand Down

0 comments on commit e4b3131

Please sign in to comment.