diff options
Diffstat (limited to 'libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp')
-rw-r--r-- | libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp index 436344daa08..8860c9ae92c 100644 --- a/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp +++ b/libcxx/test/input.output/file.streams/fstreams/ofstream.members/rdbuf.pass.cpp @@ -19,16 +19,18 @@ int main() { + char temp[L_tmpnam]; + tmpnam(temp); { - std::ofstream fs("test.dat"); + std::ofstream fs(temp); std::filebuf* fb = fs.rdbuf(); assert(fb->sputc('r') == 'r'); } - remove("test.dat"); + remove(temp); { - std::wofstream fs("test.dat"); + std::wofstream fs(temp); std::wfilebuf* fb = fs.rdbuf(); assert(fb->sputc(L'r') == L'r'); } - remove("test.dat"); + remove(temp); } |