diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2017-07-26 04:20:06 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2017-07-26 04:20:06 +0300 |
commit | 6ed8b06eb63ed87aab3bc77577201842bcbf8792 (patch) | |
tree | 55ccb8d8f263efa5c0d852aca7e310dcbd524005 /test/tests/file_handle_create_close | |
parent | f0814e4482ed8bfff28b981f4bbfe13f307728c1 (diff) |
DOES NOT BUILD wip more conversion of AFIO to Outcome v2
Diffstat (limited to 'test/tests/file_handle_create_close')
3 files changed, 5 insertions, 6 deletions
diff --git a/test/tests/file_handle_create_close/kernel_async_file_handle.cpp.hpp b/test/tests/file_handle_create_close/kernel_async_file_handle.cpp.hpp index c760b91f..8010e3fd 100644 --- a/test/tests/file_handle_create_close/kernel_async_file_handle.cpp.hpp +++ b/test/tests/file_handle_create_close/kernel_async_file_handle.cpp.hpp @@ -29,7 +29,7 @@ namespace file_handle_create_close AFIO_TEST_KERNEL_DECL AFIO_V2_NAMESPACE::result<AFIO_V2_NAMESPACE::async_file_handle> test_kernel_async_file_handle(AFIO_V2_NAMESPACE::async_file_handle::mode m, AFIO_V2_NAMESPACE::async_file_handle::creation c, AFIO_V2_NAMESPACE::async_file_handle::flag f) { AFIO_V2_NAMESPACE::io_service service; - auto h = AFIO_V2_NAMESPACE::async_file_handle::async_file(service, "testfile.txt", m, c, AFIO_V2_NAMESPACE::async_file_handle::caching::all, f); + auto h = AFIO_V2_NAMESPACE::async_file_handle::async_file(service, {}, "testfile.txt", m, c, AFIO_V2_NAMESPACE::async_file_handle::caching::all, f); if(h) h.value().close().value(); return h; diff --git a/test/tests/file_handle_create_close/kernel_file_handle.cpp.hpp b/test/tests/file_handle_create_close/kernel_file_handle.cpp.hpp index f1354c80..3a0be4be 100644 --- a/test/tests/file_handle_create_close/kernel_file_handle.cpp.hpp +++ b/test/tests/file_handle_create_close/kernel_file_handle.cpp.hpp @@ -29,7 +29,7 @@ namespace file_handle_create_close AFIO_TEST_KERNEL_DECL AFIO_V2_NAMESPACE::result<AFIO_V2_NAMESPACE::file_handle> test_kernel_file_handle(AFIO_V2_NAMESPACE::file_handle::mode m, AFIO_V2_NAMESPACE::file_handle::creation c, AFIO_V2_NAMESPACE::file_handle::flag f) { //! \todo TODO Use tempfile() once I've implemented it, that works around this being unsafe under mt permutation - auto h = AFIO_V2_NAMESPACE::file_handle::file("testfile.txt", m, c, AFIO_V2_NAMESPACE::file_handle::caching::all, f); + auto h = AFIO_V2_NAMESPACE::file_handle::file({}, "testfile.txt", m, c, AFIO_V2_NAMESPACE::file_handle::caching::all, f); if(h) h.value().close().value(); return h; diff --git a/test/tests/file_handle_create_close/runner.cpp b/test/tests/file_handle_create_close/runner.cpp index b0e3a59b..ac53e918 100644 --- a/test/tests/file_handle_create_close/runner.cpp +++ b/test/tests/file_handle_create_close/runner.cpp @@ -30,10 +30,9 @@ template <class U> inline void file_handle_create_close_creation(U &&f) { using namespace KERNELTEST_V1_NAMESPACE; using file_handle = AFIO_V2_NAMESPACE::file_handle; - using OUTCOME_V2_NAMESPACE::std::errc; - static const result<void> success = make_valued_result<void>(); - static const result<void> no_such_file_or_directory = make_errored_result(errc::no_such_file_or_directory); - static const result<void> file_exists = make_errored_result(errc::file_exists); + static const result<void> success = AFIO_V2_NAMESPACE::success(); + static const result<void> no_such_file_or_directory = std::errc::no_such_file_or_directory; + static const result<void> file_exists = std::errc::file_exists; /* Set up a permuter which for every one of these parameter values listed, tests with the value using the input workspace which should produce outcome |