From 5520d562221815e1df8b8b3312e81358b55f901e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 1 Nov 2017 14:45:06 +0100 Subject: [PATCH] Remove test input file in file stream unit tests only once Don't remove the files in the test cases classes dtors, this was inconsistent with how they were created: we either need to create the file in the ctor and destroy it in the dtor or do both only once globally. Implement the second solution using the helper AutoRemoveFile instead of a simple static bool in GetInFileName() implementations. --- tests/streams/ffilestream.cpp | 41 +++++++++++++++++++++++++---------- tests/streams/filestream.cpp | 41 +++++++++++++++++++++++++---------- 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/tests/streams/ffilestream.cpp b/tests/streams/ffilestream.cpp index 47470ad4d1..1586701a0e 100644 --- a/tests/streams/ffilestream.cpp +++ b/tests/streams/ffilestream.cpp @@ -37,7 +37,6 @@ class ffileStream : public BaseStreamTestCase