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:
Chris Ohk
2022-09-02 07:22:22 +09:00
committed by GitHub
parent c2df180b2e
commit b0da24b45f
3 changed files with 9 additions and 9 deletions

View File

@@ -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)
}

View File

@@ -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!()
}

View File

@@ -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]