diff options
Diffstat (limited to 'libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp')
| -rw-r--r-- | libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp b/libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp index 94b91806f81..0e4bc7177b8 100644 --- a/libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp +++ b/libcxx/test/input.output/file.streams/fstreams/fstream.members/close.pass.cpp @@ -16,27 +16,27 @@ #include <fstream> #include <cassert> +#include "platform_support.h" int main() { - char temp[L_tmpnam]; - tmpnam(temp); + std::string temp = get_temp_file_name(); { std::fstream fs; assert(!fs.is_open()); - fs.open(temp, std::ios_base::out); + fs.open(temp.c_str(), std::ios_base::out); assert(fs.is_open()); fs.close(); assert(!fs.is_open()); } - remove(temp); + std::remove(temp.c_str()); { std::wfstream fs; assert(!fs.is_open()); - fs.open(temp, std::ios_base::out); + fs.open(temp.c_str(), std::ios_base::out); assert(fs.is_open()); fs.close(); assert(!fs.is_open()); } - remove(temp); + std::remove(temp.c_str()); } |

