mirror of
https://github.com/kmc7468/cs220.git
synced 2025-12-12 21:08:45 +00:00
Correct minor typos (#14)
* fix: Correct minor typo - relase -> release * fix: Correct minor typos - farenheit, farhenheit -> fahrenheit - celcius -> celsius * fix: Correct minor typo - sume -> sum
This commit is contained in:
@@ -71,7 +71,7 @@ _run_tests_with() {
|
||||
# example: run_tests
|
||||
# Uses global variable RUNNER and TESTS
|
||||
run_tests() {
|
||||
# "cargo --relase" should be split into "cargo" and "--release"
|
||||
# "cargo --release" should be split into "cargo" and "--release"
|
||||
local IFS=' '
|
||||
echo $(_run_tests_with $RUNNER)
|
||||
}
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
use std::ops::Mul;
|
||||
|
||||
const FARHENHEIT_OFFSET: f64 = 32.0;
|
||||
const FARHENHEIT_SCALE: f64 = 5.0 / 9.0;
|
||||
const FAHRENHEIT_OFFSET: f64 = 32.0;
|
||||
const FAHRENHEIT_SCALE: f64 = 5.0 / 9.0;
|
||||
|
||||
/// Converts Farenheit to Celcius temperature degree.
|
||||
pub(crate) fn farhenheit_to_celcius(degree: f64) -> f64 {
|
||||
/// Converts Fahrenheit to Celsius temperature degree.
|
||||
pub(crate) fn fahrenheit_to_celsius(degree: f64) -> f64 {
|
||||
todo!()
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ pub(crate) fn capitalize(input: String) -> String {
|
||||
todo!()
|
||||
}
|
||||
|
||||
/// Returns the sume of the given array. (We assume the absence of integer overflow.)
|
||||
/// Returns the sum of the given array. (We assume the absence of integer overflow.)
|
||||
pub(crate) fn sum_array(input: &[u64]) -> u64 {
|
||||
todo!()
|
||||
}
|
||||
|
||||
@@ -3,9 +3,9 @@ mod test {
|
||||
use super::super::assignment02::*;
|
||||
|
||||
#[test]
|
||||
fn test_farenheit() {
|
||||
assert_eq!(farhenheit_to_celcius(32.0), 0.0);
|
||||
assert_eq!(farhenheit_to_celcius(212.0), 100.0);
|
||||
fn test_fahrenheit() {
|
||||
assert_eq!(fahrenheit_to_celsius(32.0), 0.0);
|
||||
assert_eq!(fahrenheit_to_celsius(212.0), 100.0);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user