Index: test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp =================================================================== --- test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp +++ test/std/input.output/file.streams/fstreams/ifstream.cons/pointer.pass.cpp @@ -25,22 +25,16 @@ 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. } Index: test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp =================================================================== --- test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp +++ test/std/input.output/file.streams/fstreams/ifstream.cons/string.pass.cpp @@ -25,22 +25,16 @@ 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. } Index: test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp =================================================================== --- test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp +++ test/std/input.output/file.streams/fstreams/ofstream.cons/pointer.pass.cpp @@ -31,6 +31,12 @@ 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 @@ 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()); } Index: test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp =================================================================== --- test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp +++ test/std/input.output/file.streams/fstreams/ofstream.cons/string.pass.cpp @@ -31,6 +31,12 @@ 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 @@ 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()); }