diff --git a/example/dynamic_capture_eh.cpp b/example/try_capture_all_eh.cpp similarity index 94% rename from example/dynamic_capture_eh.cpp rename to example/try_capture_all_eh.cpp index 0a787675..28508b6c 100644 --- a/example/dynamic_capture_eh.cpp +++ b/example/try_capture_all_eh.cpp @@ -57,11 +57,7 @@ int main() std::launch::async, [&] { - return leaf::try_capture_all( - [&] - { - return task(); - } ); + return leaf::try_capture_all(task); } ); } ); diff --git a/example/dynamic_capture_result.cpp b/example/try_capture_all_result.cpp similarity index 95% rename from example/dynamic_capture_result.cpp rename to example/try_capture_all_result.cpp index f99875c9..42475dec 100644 --- a/example/dynamic_capture_result.cpp +++ b/example/try_capture_all_result.cpp @@ -57,11 +57,7 @@ int main() std::launch::async, [&] { - return leaf::try_capture_all( - [&] - { - return task(); - } ); + return leaf::try_capture_all(task); } ); } ); diff --git a/meson.build b/meson.build index b2f3ec33..c7dd326c 100644 --- a/meson.build +++ b/meson.build @@ -141,7 +141,6 @@ if option_enable_unit_tests 'diagnostic_info_test3', 'diagnostic_info_test4', 'diagnostic_info_test5', - 'dynamic_capture_test', 'e_errno_test', 'e_LastError_test', 'error_code_test', @@ -181,6 +180,7 @@ if option_enable_unit_tests 'tls_array_alloc_test3', 'tls_array_test', 'to_variant_test', + 'try_capture_all_test', 'try_catch_error_id_test', 'try_catch_system_error_test', 'try_catch_test', @@ -249,15 +249,15 @@ endif if option_enable_examples examples = [ - 'dynamic_capture_result', 'error_log', 'error_trace', - 'print_half' + 'print_half', + 'try_capture_all_result' ] if option_exceptions examples += [ - 'dynamic_capture_eh', - 'exception_to_result' + 'exception_to_result', + 'try_capture_all_eh' ] if option_lua examples += [ diff --git a/test/Jamfile.v2 b/test/Jamfile.v2 index b58f4a43..2a0986cd 100644 --- a/test/Jamfile.v2 +++ b/test/Jamfile.v2 @@ -81,7 +81,6 @@ run diagnostic_info_test2.cpp ; run diagnostic_info_test3.cpp ; run diagnostic_info_test4.cpp ; run diagnostic_info_test5.cpp ; -run dynamic_capture_test.cpp ; run e_errno_test.cpp ; run e_LastError_test.cpp ; run error_code_test.cpp ; @@ -121,6 +120,7 @@ run tls_array_alloc_test2.cpp ; run tls_array_alloc_test3.cpp ; run tls_array_test.cpp ; run to_variant_test.cpp ; +run try_capture_all_test.cpp ; run try_catch_error_id_test.cpp ; run try_catch_system_error_test.cpp ; run try_catch_test.cpp ; @@ -150,8 +150,8 @@ compile-fail _compile-fail-result_3.cpp ; compile-fail _compile-fail-result_4.cpp ; compile-fail _compile-fail-verbose_diagnostic_info.cpp ; -exe dynamic_capture_eh : ../example/dynamic_capture_eh.cpp : single:no off:no leaf_debug_capture0:no leaf_release_capture0:no ; -exe dynamic_capture_result : ../example/dynamic_capture_result.cpp : single:no leaf_debug_capture0:no leaf_release_capture0:no leaf_debug_embedded:no leaf_release_embedded:no ; +exe try_capture_all_eh : ../example/try_capture_all_eh.cpp : single:no off:no leaf_debug_capture0:no leaf_release_capture0:no ; +exe try_capture_all_result : ../example/try_capture_all_result.cpp : single:no leaf_debug_capture0:no leaf_release_capture0:no leaf_debug_embedded:no leaf_release_embedded:no ; exe error_log : ../example/error_log.cpp : off:no ; exe error_trace : ../example/error_trace.cpp : off:no ; exe exception_to_result : ../example/exception_to_result.cpp : off:no ; diff --git a/test/dynamic_capture_test.cpp b/test/try_capture_all_test.cpp similarity index 100% rename from test/dynamic_capture_test.cpp rename to test/try_capture_all_test.cpp