std: add file::io::test module and ensure correct build
This commit is contained in:
parent
6ebb364d80
commit
c6e5b86db6
@ -32,8 +32,7 @@ free function counterparts.
|
||||
use prelude::*;
|
||||
use super::support::PathLike;
|
||||
use super::{Reader, Writer, Seek};
|
||||
use super::{SeekStyle,SeekSet, SeekCur, SeekEnd,
|
||||
Open, Read, Write, Create, ReadWrite};
|
||||
use super::{SeekStyle, Read, Write};
|
||||
use rt::rtio::{RtioFileStream, IoFactory, IoFactoryObject};
|
||||
use rt::io::{io_error, read_error, EndOfFile,
|
||||
FileMode, FileAccess, FileStat, IoError,
|
||||
@ -42,7 +41,6 @@ use rt::io::{io_error, read_error, EndOfFile,
|
||||
use rt::local::Local;
|
||||
use option::{Some, None};
|
||||
use path::Path;
|
||||
use super::super::test::*;
|
||||
|
||||
/// Open a file for reading/writing, as indicated by `path`.
|
||||
///
|
||||
@ -686,6 +684,15 @@ trait DirectoryInfo : FileSystemInfo {
|
||||
/// `DirectoryInfo` impl for `path::Path`
|
||||
impl DirectoryInfo for Path { }
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::super::{SeekSet, SeekCur, SeekEnd,
|
||||
io_error, Read, Create, Open, ReadWrite};
|
||||
use super::super::super::test::*;
|
||||
use option::{Some, None};
|
||||
use path::Path;
|
||||
use super::*;
|
||||
use iter::range;
|
||||
#[test]
|
||||
fn file_test_io_smoke_test() {
|
||||
do run_in_mt_newsched_task {
|
||||
@ -964,3 +971,4 @@ fn file_test_directoryinfo_readdir() {
|
||||
dir.rmdir();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user