diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-04-10 12:48:59 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2020-04-10 12:48:59 +0300 |
commit | 48d74e82e05e1756467441de4e916996c1a9b4be (patch) | |
tree | b6abf38b6a99b7992ffa1849d276cfcecec2a649 /test | |
parent | f23c071d78dfbcfd746c50a2f9b39080262e752b (diff) |
Merge from resumable i/o branch is generally now complete. Just need to write test i/o multiplexers next.
Diffstat (limited to 'test')
-rw-r--r-- | test/tests/file_handle_create_close/kernel_async_file_handle.cpp.hpp | 47 | ||||
-rw-r--r-- | test/tests/file_handle_create_close/runner.cpp | 5 |
2 files changed, 1 insertions, 51 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 deleted file mode 100644 index 278363cd..00000000 --- a/test/tests/file_handle_create_close/kernel_async_file_handle.cpp.hpp +++ /dev/null @@ -1,47 +0,0 @@ -/* Test kernel for file_handle create and close -(C) 2016-2017 Niall Douglas <http://www.nedproductions.biz/> (4 commits) -File Created: May 2016 - - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License in the accompanying file -Licence.txt or at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - -Distributed under the Boost Software License, Version 1.0. - (See accompanying file Licence.txt or copy at - http://www.boost.org/LICENSE_1_0.txt) -*/ - -#include "../../test_kernel_decl.hpp" - -namespace file_handle_create_close -{ - LLFIO_TEST_KERNEL_DECL LLFIO_V2_NAMESPACE::result<LLFIO_V2_NAMESPACE::async_file_handle> test_kernel_async_file_handle_absolute(LLFIO_V2_NAMESPACE::async_file_handle::mode m, LLFIO_V2_NAMESPACE::async_file_handle::creation c, LLFIO_V2_NAMESPACE::async_file_handle::flag f) - { - LLFIO_V2_NAMESPACE::io_service service; - auto h = LLFIO_V2_NAMESPACE::async_file_handle::async_file(service, {}, "testfile.txt", m, c, LLFIO_V2_NAMESPACE::async_file_handle::caching::all, f); - if(h) { - h.value().close().value(); } - return h; - } - LLFIO_TEST_KERNEL_DECL LLFIO_V2_NAMESPACE::result<LLFIO_V2_NAMESPACE::async_file_handle> test_kernel_async_file_handle_relative(LLFIO_V2_NAMESPACE::async_file_handle::mode m, LLFIO_V2_NAMESPACE::async_file_handle::creation c, LLFIO_V2_NAMESPACE::async_file_handle::flag f) - { - LLFIO_V2_NAMESPACE::io_service service; - OUTCOME_TRY(b, LLFIO_V2_NAMESPACE::path_handle::path(".")); - auto h = LLFIO_V2_NAMESPACE::async_file_handle::async_file(service, b, "testfile.txt", m, c, LLFIO_V2_NAMESPACE::async_file_handle::caching::all, f); - if(h) { - h.value().close().value(); } - b.close().value(); - return h; - } -} // namespace file_handle_create_close diff --git a/test/tests/file_handle_create_close/runner.cpp b/test/tests/file_handle_create_close/runner.cpp index 2cb83784..237a7c02 100644 --- a/test/tests/file_handle_create_close/runner.cpp +++ b/test/tests/file_handle_create_close/runner.cpp @@ -1,5 +1,5 @@ /* Integration test kernel for file_handle create and close -(C) 2016-2017 Niall Douglas <http://www.nedproductions.biz/> (22 commits) +(C) 2016-2020 Niall Douglas <http://www.nedproductions.biz/> (22 commits) File Created: Apr 2016 @@ -22,7 +22,6 @@ Distributed under the Boost Software License, Version 1.0. http://www.boost.org/LICENSE_1_0.txt) */ -#include "kernel_async_file_handle.cpp.hpp" #include "kernel_file_handle.cpp.hpp" template <class U> inline void file_handle_create_close_creation(U &&f) @@ -98,5 +97,3 @@ template <class U> inline void file_handle_create_close_creation(U &&f) KERNELTEST_TEST_KERNEL(unit, llfio, file_handle_create_close, file_handle, "Tests that llfio::file_handle::file()'s parameters with absolute paths work as expected", file_handle_create_close_creation(file_handle_create_close::test_kernel_file_handle_absolute)) KERNELTEST_TEST_KERNEL(unit, llfio, file_handle_create_close, file_handle, "Tests that llfio::file_handle::file()'s parameters with relative paths work as expected", file_handle_create_close_creation(file_handle_create_close::test_kernel_file_handle_relative)) -KERNELTEST_TEST_KERNEL(unit, llfio, file_handle_create_close, async_file_handle, "Tests that llfio::async_file_handle::async_file()'s parameters with absolute paths work as expected", file_handle_create_close_creation(file_handle_create_close::test_kernel_async_file_handle_absolute)) -KERNELTEST_TEST_KERNEL(unit, llfio, file_handle_create_close, async_file_handle, "Tests that llfio::async_file_handle::async_file()'s parameters with relative paths work as expected", file_handle_create_close_creation(file_handle_create_close::test_kernel_async_file_handle_relative)) |