diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2017-07-29 04:15:48 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2017-07-29 04:15:48 +0300 |
commit | b0d4d742f986629d90054b8bf29599e6cc4c6573 (patch) | |
tree | 075e854a6d16b20c7a70e035a291849e50b03a2b /test/tests/section_handle_create_close | |
parent | 0665f2664d1d31ee130de477e3eda615a5baf0f3 (diff) |
Now fully compiling, although almost certainly not working.
Diffstat (limited to 'test/tests/section_handle_create_close')
-rw-r--r-- | test/tests/section_handle_create_close/runner.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/tests/section_handle_create_close/runner.cpp b/test/tests/section_handle_create_close/runner.cpp index 997b2834..a7056303 100644 --- a/test/tests/section_handle_create_close/runner.cpp +++ b/test/tests/section_handle_create_close/runner.cpp @@ -28,8 +28,8 @@ Distributed under the Boost Software License, Version 1.0. template <class U> inline void section_handle_create_close_(U &&f) { using namespace KERNELTEST_V1_NAMESPACE; - using namespace AFIO_V2_NAMESPACE; using AFIO_V2_NAMESPACE::file_handle; + using AFIO_V2_NAMESPACE::section_handle; // Create a temporary file and put some text into it file_handle temph; @@ -73,14 +73,18 @@ template <class U> inline void section_handle_create_close_(U &&f) temph.write(0, "niall is not here", 17).value(); } else + { temph = file_handle(); + } return &testreturn; }, [&](auto *testreturn) { // Need to close the section and any backing file as otherwise filesystem_setup won't be able to clear up the working dir - if (*testreturn) - testreturn->value().close(); - temph.close(); + if (**testreturn) + { + (void)(*testreturn)->value().close(); + } + (void) temph.close(); }, "check section") )); |