2019-02-04 09:05:11 -05:00
|
|
|
fn convert_celsius_to_fahrenheit(celsius: f32) -> f32 {
|
|
|
|
celsius * 1.8 + 32.0
|
|
|
|
}
|
|
|
|
|
2019-02-01 08:41:54 -05:00
|
|
|
#[cfg(test)]
|
|
|
|
mod tests {
|
2019-02-04 09:05:11 -05:00
|
|
|
|
|
|
|
use super::convert_celsius_to_fahrenheit;
|
|
|
|
|
2019-02-01 08:41:54 -05:00
|
|
|
#[test]
|
2019-02-04 09:05:11 -05:00
|
|
|
fn conversion_celsius_to_fahrenheit() {
|
|
|
|
assert_eq!(convert_celsius_to_fahrenheit(25.0), 77.0);
|
2019-02-01 08:41:54 -05:00
|
|
|
}
|
2019-02-06 08:17:16 -05:00
|
|
|
}
|