Skip to content

Commit

Permalink
correct tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shieldo committed Jul 14, 2023
1 parent 3b277ff commit c13d98e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions src/core/space_heat_demand/ventilation_element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,11 @@ mod test {
// external_conditions.next();
assert_eq!(
round_by_precision(
infiltration_element.h_ve_heat_transfer_coefficient(75.0, simtime_step.index),
infiltration_element.h_ve_heat_transfer_coefficient(
75.0,
None,
Some(simtime_step.index)
),
1e6
),
round_by_precision(EXPECTED_HEAT_TRANSFER_COEFFICIENTS[simtime_step.index], 1e6),
Expand Down Expand Up @@ -691,11 +695,14 @@ mod test {
pub fn should_have_correct_h_ve_for_mechanical(mvhr: MechanicalVentilationHeatRecovery) {
// for (i, _) in simulation_time_iterator.enumerate() {
assert_eq!(
round_by_precision(mvhr.h_ve_heat_transfer_coefficient(75.0, None), 1e6),
round_by_precision(mvhr.h_ve_heat_transfer_coefficient(75.0, None, None), 1e6),
round_by_precision(4.28975166666666, 1e6),
);
assert_eq!(
round_by_precision(mvhr.h_ve_heat_transfer_coefficient(75.0, Some(1.2)), 1e6),
round_by_precision(
mvhr.h_ve_heat_transfer_coefficient(75.0, Some(1.2), None),
1e6
),
round_by_precision(5.147701999999999, 1e6),
);
// }
Expand Down Expand Up @@ -777,7 +784,11 @@ mod test {
for (i, _) in simulation_time_iterator.enumerate() {
assert_eq!(
round_by_precision(
whole_house_extract_ventilation.h_ve_heat_transfer_coefficient(75.0, None, i),
whole_house_extract_ventilation.h_ve_heat_transfer_coefficient(
75.0,
None,
Some(i)
),
1e6
),
round_by_precision(WHOLE_HOUSE_H_VE_RESULTS[i], 1e6),
Expand All @@ -789,7 +800,7 @@ mod test {
whole_house_extract_ventilation.h_ve_heat_transfer_coefficient(
75.0,
Some(1.2),
i
Some(i)
),
1e6
),
Expand Down

0 comments on commit c13d98e

Please sign in to comment.