From e8782eeb6327eb79b132cc3f71bfaf55310dde00 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Tue, 11 Jun 2013 02:34:14 +1000 Subject: fix tests, remove some warnings --- src/libstd/io.rs | 1 - src/libstd/str.rs | 11 +---------- src/libstd/str/ascii.rs | 1 - 3 files changed, 1 insertion(+), 12 deletions(-) (limited to 'src/libstd') diff --git a/src/libstd/io.rs b/src/libstd/io.rs index 409882c5cfe..58711360c35 100644 --- a/src/libstd/io.rs +++ b/src/libstd/io.rs @@ -1836,7 +1836,6 @@ mod tests { use io; use path::Path; use result; - use str; use u64; use vec; diff --git a/src/libstd/str.rs b/src/libstd/str.rs index e581eff83ad..8cd69f32e49 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -1800,7 +1800,7 @@ impl<'self> StrSlice<'self> for &'self str { */ #[inline] fn substr(&self, begin: uint, n: uint) -> &'self str { - s.slice(begin, begin + count_bytes(s, begin, n)) + self.slice(begin, begin + count_bytes(*self, begin, n)) } /// Escape each char in `s` with char::escape_default. #[inline] @@ -2318,7 +2318,6 @@ impl<'self> Iterator for StrBytesRevIterator<'self> { mod tests { use iterator::IteratorUtil; use container::Container; - use char; use option::Some; use libc::c_char; use libc; @@ -3026,14 +3025,6 @@ mod tests { assert_eq!(~"YMCA", map("ymca", |c| unsafe {libc::toupper(c as c_char)} as char)); } - #[test] - fn test_chars() { - let ss = ~"ศไทย中华Việt Nam"; - assert!(~['ศ','ไ','ท','ย','中','华','V','i','ệ','t',' ','N','a', - 'm'] - == to_chars(ss)); - } - #[test] fn test_utf16() { let pairs = diff --git a/src/libstd/str/ascii.rs b/src/libstd/str/ascii.rs index a4a1b7a171d..618d5095777 100644 --- a/src/libstd/str/ascii.rs +++ b/src/libstd/str/ascii.rs @@ -202,7 +202,6 @@ impl ToStrConsume for ~[Ascii] { #[cfg(test)] mod tests { use super::*; - use str; macro_rules! v2ascii ( ( [$($e:expr),*]) => ( [$(Ascii{chr:$e}),*]); -- cgit 1.4.1-3-g733a5