diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2016-06-22 10:47:41 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2016-06-22 10:47:41 +0300 |
commit | 0e0a78c96df388c41a1750f65d45abfb1533e3d2 (patch) | |
tree | 9f3348086ff073334ab94774ec102f47a193a245 /test/tests/file_handle_create_close | |
parent | 0a6d461d8292e25188f9d0a47a09b1c9d6d45f5e (diff) |
Expanded the file_handle_create_close kernel parameters
Diffstat (limited to 'test/tests/file_handle_create_close')
3 files changed, 17 insertions, 15 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 7fcf3597..25eeda10 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 @@ -7,10 +7,10 @@ File Created: May 2016 namespace file_handle_create_close { - BOOST_AFIO_TEST_KERNEL_DECL boost::outcome::result<boost::afio::async_file_handle> test_kernel_async_file_handle(boost::afio::async_file_handle::creation c) + BOOST_AFIO_TEST_KERNEL_DECL boost::outcome::result<boost::afio::async_file_handle> test_kernel_async_file_handle(boost::afio::async_file_handle::mode m, boost::afio::async_file_handle::creation c, boost::afio::async_file_handle::flag f) { boost::afio::io_service service; - auto h = boost::afio::async_file_handle::async_file(service, "testfile.txt", boost::afio::async_file_handle::mode::write, c); + auto h = boost::afio::async_file_handle::async_file(service, "testfile.txt", m, c, boost::afio::async_file_handle::caching::all, f); if(h) h.get().close(); 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 4c38a7b5..90f64972 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 @@ -7,9 +7,9 @@ File Created: May 2016 namespace file_handle_create_close { - BOOST_AFIO_TEST_KERNEL_DECL boost::outcome::result<boost::afio::file_handle> test_kernel_file_handle(boost::afio::file_handle::creation c) + BOOST_AFIO_TEST_KERNEL_DECL boost::outcome::result<boost::afio::file_handle> test_kernel_file_handle(boost::afio::file_handle::mode m, boost::afio::file_handle::creation c, boost::afio::file_handle::flag f) { - auto h = boost::afio::file_handle::file("testfile.txt", boost::afio::file_handle::mode::write, c); + auto h = boost::afio::file_handle::file("testfile.txt", m, c, boost::afio::file_handle::caching::all, f); if(h) h.get().close(); return h; diff --git a/test/tests/file_handle_create_close/runner.cpp b/test/tests/file_handle_create_close/runner.cpp index 12013793..f60548ef 100644 --- a/test/tests/file_handle_create_close/runner.cpp +++ b/test/tests/file_handle_create_close/runner.cpp @@ -25,23 +25,25 @@ template <class U> inline void file_handle_create_close_creation(U &&f) static const auto permuter(mt_permute_parameters< // This is a multithreaded parameter permutation test result<void>, // The output outcome/result/option type. Type void means we don't care about the return type. parameters< // The types of one or more input parameters to permute/fuzz the kernel with. - typename file_handle::creation + typename file_handle::mode, + typename file_handle::creation, + typename file_handle::flag >, // Any additional per-permute parameters not used to invoke the kernel precondition::filesystem_setup_parameters, postcondition::filesystem_comparison_structure_parameters >( { // Initialiser list of output value expected for the input parameters, plus any precondition/postcondition parameters - { make_errored_result<void>(ENOENT), { file_handle::creation::open_existing }, { "non-existing" }, { "non-existing" }}, - { make_ready_result<void>(), { file_handle::creation::open_existing }, { "existing0" }, { "existing0" }}, - { make_ready_result<void>(), { file_handle::creation::open_existing }, { "existing1" }, { "existing1" }}, - { make_ready_result<void>(), { file_handle::creation::only_if_not_exist }, { "non-existing" }, { "existing0" }}, - { make_errored_result<void>(EEXIST), { file_handle::creation::only_if_not_exist }, { "existing0" }, { "existing0" }}, - { make_ready_result<void>(), { file_handle::creation::if_needed }, { "non-existing" }, { "existing0" }}, - { make_ready_result<void>(), { file_handle::creation::if_needed }, { "existing1" }, { "existing1" }}, - { make_errored_result<void>(ENOENT), { file_handle::creation::truncate }, { "non-existing" }, { "non-existing" }}, - { make_ready_result<void>(), { file_handle::creation::truncate }, { "existing0" }, { "existing0" }}, - { make_ready_result<void>(), { file_handle::creation::truncate }, { "existing1" }, { "existing0" }} + { make_errored_result<void>(ENOENT), { file_handle::mode::write, file_handle::creation::open_existing , file_handle::flag::none }, { "non-existing" }, { "non-existing" }}, + { make_ready_result<void>(), { file_handle::mode::write, file_handle::creation::open_existing , file_handle::flag::none }, { "existing0" }, { "existing0" }}, + { make_ready_result<void>(), { file_handle::mode::write, file_handle::creation::open_existing , file_handle::flag::none }, { "existing1" }, { "existing1" }}, + { make_ready_result<void>(), { file_handle::mode::write, file_handle::creation::only_if_not_exist, file_handle::flag::none }, { "non-existing" }, { "existing0" }}, + { make_errored_result<void>(EEXIST), { file_handle::mode::write, file_handle::creation::only_if_not_exist, file_handle::flag::none }, { "existing0" }, { "existing0" }}, + { make_ready_result<void>(), { file_handle::mode::write, file_handle::creation::if_needed , file_handle::flag::none }, { "non-existing" }, { "existing0" }}, + { make_ready_result<void>(), { file_handle::mode::write, file_handle::creation::if_needed , file_handle::flag::none }, { "existing1" }, { "existing1" }}, + { make_errored_result<void>(ENOENT), { file_handle::mode::write, file_handle::creation::truncate , file_handle::flag::none }, { "non-existing" }, { "non-existing" }}, + { make_ready_result<void>(), { file_handle::mode::write, file_handle::creation::truncate , file_handle::flag::none }, { "existing0" }, { "existing0" }}, + { make_ready_result<void>(), { file_handle::mode::write, file_handle::creation::truncate , file_handle::flag::none }, { "existing1" }, { "existing0" }} }, // Any parameters from now on are called before each permutation and the object returned is // destroyed after each permutation. The callspec is (parameter_permuter<...> *parent, outcome<T> &testret, size_t, pars) |