Skip to content

Commit 7dd200e

Browse files
committed
remove now redundant dbg! macros from tests
1 parent 8aee6d1 commit 7dd200e

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

src/builtins/compiled/duration/tests.rs

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use std::{dbg, string::ToString};
1+
use std::string::ToString;
22

33
use crate::{
44
options::{
@@ -694,15 +694,14 @@ fn test_duration_total() {
694694
..Default::default()
695695
})
696696
.unwrap();
697-
let d1_actual = d1.total(TemporalUnit::Second, None).unwrap();
698-
dbg!(d1_actual);
699-
assert_eq!(d1_actual, 469200.0);
697+
assert_eq!(d1.total(TemporalUnit::Second, None).unwrap(), 469200.0);
700698

701699
// How many 24-hour days is 123456789 seconds?
702700
let d2 = Duration::from_str("PT123456789S").unwrap();
703-
let d2_actual = d2.total(TemporalUnit::Day, None).unwrap();
704-
dbg!(d2_actual);
705-
assert_eq!(d2_actual, 1428.8980208333332);
701+
assert_eq!(
702+
d2.total(TemporalUnit::Day, None).unwrap(),
703+
1428.8980208333332
704+
);
706705

707706
// Find totals in months, with and without taking DST into account
708707
let d3 = Duration::from_partial_duration(PartialDuration {
@@ -716,23 +715,22 @@ fn test_duration_total() {
716715
OffsetDisambiguation::Reject,
717716
)
718717
.unwrap();
719-
let d3_zoned_actual = d3
720-
.total(
718+
assert_eq!(
719+
d3.total(
721720
TemporalUnit::Month,
722-
Some(RelativeTo::ZonedDateTime(relative_to)),
721+
Some(RelativeTo::ZonedDateTime(relative_to))
723722
)
724-
.unwrap();
725-
dbg!(d3_zoned_actual);
726-
assert_eq!(d3_zoned_actual, 3.7958333333333334);
727-
728-
let d3_plain_actual = d3
729-
.total(
723+
.unwrap(),
724+
3.7958333333333334
725+
);
726+
assert_eq!(
727+
d3.total(
730728
TemporalUnit::Month,
731729
Some(RelativeTo::PlainDate(
732-
PlainDate::new(2020, 1, 1, Calendar::default()).unwrap(),
733-
)),
730+
PlainDate::new(2020, 1, 1, Calendar::default()).unwrap()
731+
))
734732
)
735-
.unwrap();
736-
dbg!(d3_plain_actual);
737-
assert_eq!(d3_plain_actual, 3.7944444444444443);
733+
.unwrap(),
734+
3.7944444444444443
735+
);
738736
}

0 commit comments

Comments
 (0)