fix tests, remove some warnings

This commit is contained in:
Huon Wilson 2013-06-11 02:34:14 +10:00
parent 2fa83c0503
commit e8782eeb63
22 changed files with 18 additions and 44 deletions

View file

@ -1836,7 +1836,6 @@ mod tests {
use io;
use path::Path;
use result;
use str;
use u64;
use vec;

View file

@ -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<u8> 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 =

View file

@ -202,7 +202,6 @@ impl ToStrConsume for ~[Ascii] {
#[cfg(test)]
mod tests {
use super::*;
use str;
macro_rules! v2ascii (
( [$($e:expr),*]) => ( [$(Ascii{chr:$e}),*]);