diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2016-06-22 11:09:37 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2016-06-22 11:09:37 +0300 |
commit | 86736dc80a567e0d979ad5b3f1b119f2bdf87e7a (patch) | |
tree | cf7936772d29a440ce2fa6e683c28f21b5f1123b /test/tests/file_handle_create_close | |
parent | 0e0a78c96df388c41a1750f65d45abfb1533e3d2 (diff) |
Added in lots of new file_handle_create_close parameter permutation combinations. Quite a few are reporting as passed when they actually should be failing.
Diffstat (limited to 'test/tests/file_handle_create_close')
-rw-r--r-- | test/tests/file_handle_create_close/runner.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/test/tests/file_handle_create_close/runner.cpp b/test/tests/file_handle_create_close/runner.cpp index f60548ef..4f9f6d45 100644 --- a/test/tests/file_handle_create_close/runner.cpp +++ b/test/tests/file_handle_create_close/runner.cpp @@ -34,6 +34,20 @@ template <class U> inline void file_handle_create_close_creation(U &&f) postcondition::filesystem_comparison_structure_parameters >( { // Initialiser list of output value expected for the input parameters, plus any precondition/postcondition parameters + + // Does the mode parameter have the expected side effects? + { make_errored_result<void>(ENOENT), { file_handle::mode::none, file_handle::creation::if_needed, file_handle::flag::none }, { "non-existing" }, { "non-existing" }}, + { make_ready_result<void>(), { file_handle::mode::none, file_handle::creation::if_needed, file_handle::flag::none }, { "existing1" }, { "existing1" }}, + { make_errored_result<void>(ENOENT), { file_handle::mode::attr_read, file_handle::creation::if_needed, file_handle::flag::none }, { "non-existing" }, { "non-existing" }}, + { make_ready_result<void>(), { file_handle::mode::attr_read, file_handle::creation::if_needed, file_handle::flag::none }, { "existing1" }, { "existing1" }}, + { make_errored_result<void>(ENOENT), { file_handle::mode::attr_write, file_handle::creation::if_needed, file_handle::flag::none }, { "non-existing" }, { "non-existing" }}, + { make_ready_result<void>(), { file_handle::mode::attr_write, file_handle::creation::if_needed, file_handle::flag::none }, { "existing1" }, { "existing1" }}, + { 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_ready_result<void>(), { file_handle::mode::append, file_handle::creation::if_needed, file_handle::flag::none }, { "non-existing" }, { "existing0" }}, + { make_ready_result<void>(), { file_handle::mode::append, file_handle::creation::if_needed, file_handle::flag::none }, { "existing1" }, { "existing1" }}, + + // Does the creation parameter have the expected side effects? { 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" }}, @@ -43,7 +57,10 @@ template <class U> inline void file_handle_create_close_creation(U &&f) { 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" }} + { make_ready_result<void>(), { file_handle::mode::write, file_handle::creation::truncate , file_handle::flag::none }, { "existing1" }, { "existing0" }}, + + // Does the flag parameter have the expected side effects? + { make_ready_result<void>(), { file_handle::mode::write, file_handle::creation::open_existing, file_handle::flag::win_delete_on_last_close|file_handle::flag::posix_unlink_on_first_close }, { "existing1" }, { "non-existing" }} }, // 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) |