Skip to content

Commit 32230f1

Browse files
authored
Test that correct value is returned for height change (#2164)
1 parent b3bbf6c commit 32230f1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

third_party/rust-on-exercism/health-statistics.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ fn test_visit() {
6767
assert_eq!(report.patient_name, "Bob");
6868
assert_eq!(report.visit_count, 1);
6969
assert_eq!(report.blood_pressure_change, None);
70+
assert!((report.height_change - 0.9).abs() < 0.00001);
7071

7172
let report =
7273
bob.visit_doctor(Measurements { height: 156.1, blood_pressure: (115, 76) });
7374

7475
assert_eq!(report.visit_count, 2);
7576
assert_eq!(report.blood_pressure_change, Some((-5, -4)));
77+
assert_eq!(report.height_change, 0.0);
7678
}
7779
// ANCHOR_END: tests

0 commit comments

Comments
 (0)