diff options
| author | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2013-04-26 09:58:40 +1000 |
|---|---|---|
| committer | Brendan Zabarauskas <bjzaba@yahoo.com.au> | 2013-04-26 09:58:40 +1000 |
| commit | f40be999cab20ee51758620d9ccf435c62fcb51f (patch) | |
| tree | bfe963fc6e11bb999c46b67defec5c566c015be5 /src/libcore/num | |
| parent | dbc2e99693eb20da9b9823bc11953835b156802f (diff) | |
| download | rust-f40be999cab20ee51758620d9ccf435c62fcb51f.tar.gz rust-f40be999cab20ee51758620d9ccf435c62fcb51f.zip | |
Minor style improvements for test functions
Use argument pattern-matching for test_division_rule and remove visibility specifier for test_signed
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/float.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/int-template.rs | 5 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/libcore/num/float.rs b/src/libcore/num/float.rs index d5f22e6b056..92decce325a 100644 --- a/src/libcore/num/float.rs +++ b/src/libcore/num/float.rs @@ -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); diff --git a/src/libcore/num/int-template.rs b/src/libcore/num/int-template.rs index 75d170118e6..56b7616c255 100644 --- a/src/libcore/num/int-template.rs +++ b/src/libcore/num/int-template.rs @@ -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); } |
