Rollup merge of #86359 - fee1-dead:f64-junit-formatter, r=JohnTitor

Use as_secs_f64 in JunitFormatter

cc `@andoriyu`
This commit is contained in:
Yuki Okushi 2021-06-19 10:14:08 +09:00 committed by GitHub
commit 0c7b74fcef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,7 +79,7 @@ fn write_run_finish(&mut self, state: &ConsoleTestState) -> io::Result<bool> {
name=\"{}\" time=\"{}\">",
class_name,
test_name,
duration.as_secs()
duration.as_secs_f64()
))?;
self.write_message("<failure type=\"assert\"/>")?;
self.write_message("</testcase>")?;
@ -91,7 +91,7 @@ fn write_run_finish(&mut self, state: &ConsoleTestState) -> io::Result<bool> {
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>")?;
@ -103,7 +103,7 @@ fn write_run_finish(&mut self, state: &ConsoleTestState) -> io::Result<bool> {
name=\"{}\" time=\"{}\">",
class_name,
test_name,
duration.as_secs()
duration.as_secs_f64()
))?;
self.write_message("<failure type=\"timeout\"/>")?;
self.write_message("</testcase>")?;
@ -123,7 +123,7 @@ fn write_run_finish(&mut self, state: &ConsoleTestState) -> io::Result<bool> {
name=\"{}\" time=\"{}\"/>",
class_name,
test_name,
duration.as_secs()
duration.as_secs_f64()
))?;
}
}