Skip to content

Commit e9ee2cb

Browse files
authored
Improve test output for libcore/time
1 parent e9e5a75 commit e9ee2cb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/libcore/tests/time.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use core::time::Duration;
22

33
#[test]
44
fn creation() {
5-
assert!(Duration::from_secs(1) != Duration::from_secs(0));
5+
assert_ne!(Duration::from_secs(1), Duration::from_secs(0));
66
assert_eq!(Duration::from_secs(1) + Duration::from_secs(2),
77
Duration::from_secs(3));
88
assert_eq!(Duration::from_millis(10) + Duration::from_secs(4),
@@ -107,14 +107,12 @@ fn checked_sub() {
107107

108108
#[test]
109109
#[should_panic]
110-
#[cfg(not(miri))] // Miri does not support panics
111110
fn sub_bad1() {
112111
let _ = Duration::new(0, 0) - Duration::new(0, 1);
113112
}
114113

115114
#[test]
116115
#[should_panic]
117-
#[cfg(not(miri))] // Miri does not support panics
118116
fn sub_bad2() {
119117
let _ = Duration::new(0, 0) - Duration::new(1, 0);
120118
}

0 commit comments

Comments
 (0)