diff options
Diffstat (limited to 'libcxx/test/std')
4 files changed, 36 insertions, 24 deletions
diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp index f43df3c9f84..ef3959cfcef 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp @@ -25,22 +25,16 @@ int main() fs >> x; assert(x == 3.25); } - { - std::ifstream fs("test.dat", std::ios_base::out); - double x = 0; - fs >> x; - assert(x == 3.25); - } + // std::ifstream(const char*, std::ios_base::openmode) is tested in + // test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp + // which creates writable files. { std::wifstream fs("test.dat"); double x = 0; fs >> x; assert(x == 3.25); } - { - std::wifstream fs("test.dat", std::ios_base::out); - double x = 0; - fs >> x; - assert(x == 3.25); - } + // std::wifstream(const char*, std::ios_base::openmode) is tested in + // test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp + // which creates writable files. } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp index ad5fe5149df..d4155ea8e7f 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp @@ -25,22 +25,16 @@ int main() fs >> x; assert(x == 3.25); } - { - std::ifstream fs(std::string("test.dat"), std::ios_base::out); - double x = 0; - fs >> x; - assert(x == 3.25); - } + // std::ifstream(const std::string&, std::ios_base::openmode) is tested in + // test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp + // which creates writable files. { std::wifstream fs(std::string("test.dat")); double x = 0; fs >> x; assert(x == 3.25); } - { - std::wifstream fs(std::string("test.dat"), std::ios_base::out); - double x = 0; - fs >> x; - assert(x == 3.25); - } + // std::wifstream(const std::string&, std::ios_base::openmode) is tested in + // test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp + // which creates writable files. } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp index bd5832abeb5..60f92569049 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp @@ -31,6 +31,12 @@ int main() fs >> x; assert(x == 3.25); } + { + std::ifstream fs(temp.c_str(), std::ios_base::out); + double x = 0; + fs >> x; + assert(x == 3.25); + } std::remove(temp.c_str()); { std::wofstream fs(temp.c_str()); @@ -42,5 +48,11 @@ int main() fs >> x; assert(x == 3.25); } + { + std::wifstream fs(temp.c_str(), std::ios_base::out); + double x = 0; + fs >> x; + assert(x == 3.25); + } std::remove(temp.c_str()); } diff --git a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp index 7112b17fb8b..b95db662602 100644 --- a/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp +++ b/libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp @@ -31,6 +31,12 @@ int main() fs >> x; assert(x == 3.25); } + { + std::ifstream fs(temp, std::ios_base::out); + double x = 0; + fs >> x; + assert(x == 3.25); + } std::remove(temp.c_str()); { std::wofstream fs(temp); @@ -42,5 +48,11 @@ int main() fs >> x; assert(x == 3.25); } + { + std::wifstream fs(temp, std::ios_base::out); + double x = 0; + fs >> x; + assert(x == 3.25); + } std::remove(temp.c_str()); } |