From f4154836aea19da5ac29a4855ea24caec193168b Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 11 Dec 2023 08:35:02 +0000 Subject: [PATCH] Kernel_23: Deal with concurrent executions and IO --- .../test/Kernel_23/include/CGAL/_test_io.h | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/Kernel_23/test/Kernel_23/include/CGAL/_test_io.h b/Kernel_23/test/Kernel_23/include/CGAL/_test_io.h index eebd53cd03f..886832d0508 100644 --- a/Kernel_23/test/Kernel_23/include/CGAL/_test_io.h +++ b/Kernel_23/test/Kernel_23/include/CGAL/_test_io.h @@ -17,26 +17,19 @@ #ifndef CGAL__TEST_IO_H #define CGAL__TEST_IO_H -#include +#include #include -#ifndef TEST_FILENAME -# define TEST_FILENAME "Test_IO.out" -#endif - template void _test_io_for(const T& t) { - { - std::ofstream oFile(TEST_FILENAME, std::ios::out); - oFile << t << std::endl; - } + std::stringstream ss; + ss << t << std::endl; - std::ifstream iFile(TEST_FILENAME, std::ios::in); T u = t; - iFile >> u; - assert(!iFile.fail()); + ss >> u; + assert(! ss.fail() ); assert(u == t); }