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:
Brendan Zabarauskas 2013-04-26 09:58:40 +10:00
parent dbc2e99693
commit f40be999ca
2 changed files with 2 additions and 5 deletions

View File

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

View File

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