Minor style improvements for test functions
Use argument pattern-matching for test_division_rule and remove visibility specifier for test_signed
This commit is contained in:
parent
dbc2e99693
commit
f40be999ca
@ -798,7 +798,7 @@ mod tests {
|
||||
}
|
||||
|
||||
#[test]
|
||||
pub fn test_signed() {
|
||||
fn test_signed() {
|
||||
assert_eq!(infinity.abs(), infinity);
|
||||
assert_eq!(1f.abs(), 1f);
|
||||
assert_eq!(0f.abs(), 0f);
|
||||
|
@ -553,10 +553,7 @@ mod tests {
|
||||
/// - `qr`: quotient and remainder
|
||||
///
|
||||
#[cfg(test)]
|
||||
fn test_division_rule(nd: (T,T), qr: (T,T)) {
|
||||
let (n,d) = nd,
|
||||
(q,r) = qr;
|
||||
|
||||
fn test_division_rule((n,d): (T,T), (q,r): (T,T)) {
|
||||
assert_eq!(d * q + r, n);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user