couchbase 4.2.2 → 4.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/deps/couchbase-cxx-client/.github/workflows/sanitizers.yml +20 -12
- package/deps/couchbase-cxx-client/.github/workflows/tests.yml +5 -3
- package/deps/couchbase-cxx-client/.idea/vcs.xml +2 -0
- package/deps/couchbase-cxx-client/CMakeLists.txt +15 -6
- package/deps/couchbase-cxx-client/bin/build-tests +3 -0
- package/deps/couchbase-cxx-client/bin/build-tests.rb +9 -0
- package/deps/couchbase-cxx-client/bin/init-cluster +38 -11
- package/deps/couchbase-cxx-client/bin/run-unit-tests +9 -9
- package/deps/couchbase-cxx-client/cmake/CompilerWarnings.cmake +12 -4
- package/deps/couchbase-cxx-client/cmake/Documentation.cmake +4 -3
- package/deps/couchbase-cxx-client/cmake/OpenSSL.cmake +52 -7
- package/deps/couchbase-cxx-client/cmake/Testing.cmake +4 -4
- package/deps/couchbase-cxx-client/cmake/ThirdPartyDependencies.cmake +4 -0
- package/deps/couchbase-cxx-client/cmake/VersionInfo.cmake +39 -3
- package/deps/couchbase-cxx-client/cmake/test_openssl.cxx +7 -0
- package/deps/couchbase-cxx-client/core/bucket.cxx +3 -2
- package/deps/couchbase-cxx-client/core/bucket.hxx +9 -0
- package/deps/couchbase-cxx-client/core/cluster_options.cxx +2 -2
- package/deps/couchbase-cxx-client/core/cluster_options.hxx +3 -7
- package/deps/couchbase-cxx-client/core/cluster_options_fwd.hxx +26 -0
- package/deps/couchbase-cxx-client/core/config_profile.hxx +2 -65
- package/deps/couchbase-cxx-client/core/config_profiles.cxx +79 -0
- package/deps/couchbase-cxx-client/core/config_profiles.hxx +56 -0
- package/deps/couchbase-cxx-client/core/crypto/CMakeLists.txt +5 -1
- package/deps/couchbase-cxx-client/core/error_context/analytics.hxx +2 -1
- package/deps/couchbase-cxx-client/core/error_context/http.hxx +2 -1
- package/deps/couchbase-cxx-client/core/error_context/query.hxx +2 -1
- package/deps/couchbase-cxx-client/core/error_context/search.hxx +2 -1
- package/deps/couchbase-cxx-client/core/error_context/view.hxx +2 -1
- package/deps/couchbase-cxx-client/core/impl/analytics.cxx +236 -0
- package/deps/couchbase-cxx-client/core/impl/cluster.cxx +1 -1
- package/deps/couchbase-cxx-client/core/impl/collection_query_index_manager.cxx +3 -3
- package/deps/couchbase-cxx-client/core/impl/dns_srv_tracker.cxx +5 -3
- package/deps/couchbase-cxx-client/core/impl/get_all_query_indexes.cxx +3 -3
- package/deps/couchbase-cxx-client/core/impl/query.cxx +19 -17
- package/deps/couchbase-cxx-client/core/impl/subdoc/lookup_in_macro.cxx +1 -0
- package/deps/couchbase-cxx-client/core/impl/subdoc/mutate_in_macro.cxx +1 -0
- package/deps/couchbase-cxx-client/core/impl/transaction_get_result.cxx +54 -0
- package/deps/couchbase-cxx-client/core/io/dns_client.cxx +225 -0
- package/deps/couchbase-cxx-client/core/io/dns_client.hxx +19 -188
- package/deps/couchbase-cxx-client/core/io/http_context.hxx +1 -1
- package/deps/couchbase-cxx-client/core/io/http_session.hxx +10 -0
- package/deps/couchbase-cxx-client/core/io/http_session_manager.hxx +5 -3
- package/deps/couchbase-cxx-client/core/io/mcbp_session.cxx +27 -0
- package/deps/couchbase-cxx-client/core/io/retry_orchestrator.hxx +3 -2
- package/deps/couchbase-cxx-client/core/meta/CMakeLists.txt +7 -5
- package/deps/couchbase-cxx-client/core/meta/version.cxx +19 -0
- package/deps/couchbase-cxx-client/core/operations/document_analytics.cxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/document_analytics.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/document_append.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_decrement.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_exists.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_get.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_get_and_lock.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_get_and_touch.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_get_projected.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_increment.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_insert.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_lookup_in.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_mutate_in.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_prepend.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_query.cxx +2 -0
- package/deps/couchbase-cxx-client/core/operations/document_query.hxx +6 -0
- package/deps/couchbase-cxx-client/core/operations/document_remove.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_replace.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_search.cxx +6 -2
- package/deps/couchbase-cxx-client/core/operations/document_search.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_touch.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_unlock.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_upsert.hxx +1 -1
- package/deps/couchbase-cxx-client/core/operations/document_view.hxx +1 -0
- package/deps/couchbase-cxx-client/core/operations/management/analytics_problem.hxx +2 -1
- package/deps/couchbase-cxx-client/core/operations/management/eventing_problem.hxx +2 -1
- package/deps/couchbase-cxx-client/core/platform/base64.cc +2 -1
- package/deps/couchbase-cxx-client/core/protocol/client_opcode.hxx +1 -0
- package/deps/couchbase-cxx-client/core/protocol/cmd_info.hxx +2 -1
- package/deps/couchbase-cxx-client/core/public_fwd.hxx +21 -0
- package/deps/couchbase-cxx-client/core/tls_verify_mode.hxx +26 -0
- package/deps/couchbase-cxx-client/core/topology/configuration.cxx +15 -2
- package/deps/couchbase-cxx-client/core/topology/configuration.hxx +5 -1
- package/deps/couchbase-cxx-client/core/transactions/active_transaction_record.hxx +2 -2
- package/deps/couchbase-cxx-client/core/transactions/atr_cleanup_entry.cxx +1 -0
- package/deps/couchbase-cxx-client/core/transactions/atr_ids.cxx +1 -1
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.cxx +78 -44
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_impl.hxx +90 -59
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_testing_hooks.cxx +93 -0
- package/deps/couchbase-cxx-client/core/transactions/attempt_context_testing_hooks.hxx +48 -75
- package/deps/couchbase-cxx-client/core/transactions/cleanup_testing_hooks.cxx +52 -0
- package/deps/couchbase-cxx-client/core/transactions/cleanup_testing_hooks.hxx +17 -31
- package/deps/couchbase-cxx-client/core/transactions/exceptions.cxx +0 -1
- package/deps/couchbase-cxx-client/core/transactions/exceptions.hxx +14 -11
- package/deps/couchbase-cxx-client/core/transactions/forward_compat.hxx +2 -2
- package/deps/couchbase-cxx-client/core/transactions/internal/transaction_context.hxx +14 -14
- package/deps/couchbase-cxx-client/core/transactions/internal/transaction_fields.hxx +1 -0
- package/deps/couchbase-cxx-client/core/transactions/internal/transactions_cleanup.hxx +7 -1
- package/deps/couchbase-cxx-client/core/transactions/staged_mutation.cxx +1 -1
- package/deps/couchbase-cxx-client/core/transactions/staged_mutation.hxx +12 -2
- package/deps/couchbase-cxx-client/core/transactions/transaction_context.cxx +9 -11
- package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.cxx +41 -31
- package/deps/couchbase-cxx-client/core/transactions/transaction_get_result.hxx +69 -21
- package/deps/couchbase-cxx-client/core/transactions/transaction_links.hxx +13 -1
- package/deps/couchbase-cxx-client/core/transactions/transactions.cxx +5 -4
- package/deps/couchbase-cxx-client/core/transactions/transactions_cleanup.cxx +144 -155
- package/deps/couchbase-cxx-client/core/transactions/waitable_op_list.hxx +1 -0
- package/deps/couchbase-cxx-client/core/transactions.hxx +1 -1
- package/deps/couchbase-cxx-client/core/utils/connection_string.cxx +25 -3
- package/deps/couchbase-cxx-client/core/utils/connection_string.hxx +3 -3
- package/deps/couchbase-cxx-client/core/utils/crc32.hxx +3 -2
- package/deps/couchbase-cxx-client/core/utils/json.cxx +4 -1
- package/deps/couchbase-cxx-client/core/utils/json_streaming_lexer.hxx +2 -1
- package/deps/couchbase-cxx-client/core/utils/url_codec.cxx +2 -1
- package/deps/couchbase-cxx-client/couchbase/analytics_error_context.hxx +143 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_meta_data.hxx +155 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_metrics.hxx +163 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_options.hxx +359 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_result.hxx +102 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_scan_consistency.hxx +46 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_status.hxx +41 -0
- package/deps/couchbase-cxx-client/couchbase/analytics_warning.hxx +85 -0
- package/deps/couchbase-cxx-client/couchbase/behavior_options.hxx +10 -1
- package/deps/couchbase-cxx-client/couchbase/cluster.hxx +38 -3
- package/deps/couchbase-cxx-client/couchbase/cluster_options.hxx +10 -10
- package/deps/couchbase-cxx-client/couchbase/collection.hxx +22 -17
- package/deps/couchbase-cxx-client/couchbase/collection_query_index_manager.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/common_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/configuration_profile.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/configuration_profiles_registry.hxx +0 -1
- package/deps/couchbase-cxx-client/couchbase/create_primary_query_index_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/drop_primary_query_index_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/drop_query_index_options.hxx +1 -1
- package/deps/couchbase-cxx-client/couchbase/fmt/analytics_status.hxx +76 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/cas.hxx +12 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/durability_level.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/key_value_extended_error_info.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/key_value_status_code.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/mutation_token.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/query_scan_consistency.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/query_status.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/retry_reason.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/fmt/tls_verify_mode.hxx +6 -0
- package/deps/couchbase-cxx-client/couchbase/get_all_query_indexes_options.hxx +5 -4
- package/deps/couchbase-cxx-client/couchbase/query_index_manager.hxx +4 -2
- package/deps/couchbase-cxx-client/couchbase/query_options.hxx +0 -1
- package/deps/couchbase-cxx-client/couchbase/scope.hxx +35 -1
- package/deps/couchbase-cxx-client/couchbase/subdoc/array_add_unique.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/array_append.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/array_insert.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/array_prepend.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/count.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/counter.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/exists.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/get.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/insert.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/remove.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/subdoc/replace.hxx +3 -1
- package/deps/couchbase-cxx-client/couchbase/subdoc/upsert.hxx +2 -0
- package/deps/couchbase-cxx-client/couchbase/tracing/request_span.hxx +63 -0
- package/deps/couchbase-cxx-client/couchbase/tracing/request_tracer.hxx +2 -40
- package/deps/couchbase-cxx-client/couchbase/transaction_op_error_context.hxx +4 -4
- package/deps/couchbase-cxx-client/couchbase/transactions/async_attempt_context.hxx +93 -14
- package/deps/couchbase-cxx-client/couchbase/transactions/attempt_context.hxx +88 -15
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_get_result.hxx +55 -35
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_keyspace.hxx +11 -1
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_options.hxx +79 -8
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_query_options.hxx +127 -15
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_query_result.hxx +6 -21
- package/deps/couchbase-cxx-client/couchbase/transactions/transaction_result.hxx +0 -1
- package/deps/couchbase-cxx-client/couchbase/transactions/transactions_cleanup_config.hxx +5 -3
- package/deps/couchbase-cxx-client/couchbase/transactions/transactions_config.hxx +9 -5
- package/deps/couchbase-cxx-client/couchbase/transactions/transactions_query_config.hxx +6 -3
- package/deps/couchbase-cxx-client/couchbase/transactions.hxx +36 -2
- package/deps/couchbase-cxx-client/docs/Doxyfile.in +324 -223
- package/deps/couchbase-cxx-client/docs/cbc-analytics.md +171 -0
- package/deps/couchbase-cxx-client/docs/cbc-get.md +160 -0
- package/deps/couchbase-cxx-client/docs/cbc-pillowfight.md +163 -0
- package/deps/couchbase-cxx-client/docs/cbc-query.md +179 -0
- package/deps/couchbase-cxx-client/docs/cbc.md +46 -0
- package/deps/couchbase-cxx-client/docs/cli.hxx +33 -0
- package/deps/couchbase-cxx-client/docs/doxygen-awesome.css +474 -89
- package/deps/couchbase-cxx-client/docs/mainpage.hxx +9 -8
- package/deps/couchbase-cxx-client/docs/stability.hxx +15 -0
- package/deps/couchbase-cxx-client/examples/async_game_server.cxx +56 -54
- package/deps/couchbase-cxx-client/examples/distributed_mutex.cxx +2 -0
- package/deps/couchbase-cxx-client/examples/game_server.cxx +9 -10
- package/deps/couchbase-cxx-client/test/CMakeLists.txt +9 -7
- package/deps/couchbase-cxx-client/test/benchmark_helper_integration.hxx +2 -2
- package/deps/couchbase-cxx-client/test/data/search_beers_dataset.json +70 -0
- package/deps/couchbase-cxx-client/test/data/search_beers_index_params.json +108 -0
- package/deps/couchbase-cxx-client/test/test_helper.hxx +6 -6
- package/deps/couchbase-cxx-client/test/test_integration_analytics.cxx +289 -13
- package/deps/couchbase-cxx-client/test/test_integration_crud.cxx +8 -1
- package/deps/couchbase-cxx-client/test/test_integration_diagnostics.cxx +3 -3
- package/deps/couchbase-cxx-client/test/test_integration_examples.cxx +182 -0
- package/deps/couchbase-cxx-client/test/test_integration_management.cxx +25 -9
- package/deps/couchbase-cxx-client/test/test_integration_query.cxx +1 -1
- package/deps/couchbase-cxx-client/test/test_integration_search.cxx +603 -0
- package/deps/couchbase-cxx-client/test/test_integration_subdoc.cxx +2 -2
- package/deps/couchbase-cxx-client/test/test_integration_tracer.cxx +2 -0
- package/deps/couchbase-cxx-client/test/test_integration_transcoders.cxx +9 -5
- package/deps/couchbase-cxx-client/test/test_transaction_context.cxx +550 -0
- package/deps/couchbase-cxx-client/test/test_transaction_examples.cxx +180 -0
- package/deps/couchbase-cxx-client/test/test_transaction_public_async_api.cxx +393 -0
- package/deps/couchbase-cxx-client/test/test_transaction_public_blocking_api.cxx +653 -0
- package/deps/couchbase-cxx-client/test/test_transaction_simple.cxx +984 -0
- package/deps/couchbase-cxx-client/test/test_transaction_simple_async.cxx +970 -0
- package/deps/couchbase-cxx-client/test/test_unit_config_profiles.cxx +13 -13
- package/deps/couchbase-cxx-client/test/test_unit_connection_string.cxx +35 -0
- package/deps/couchbase-cxx-client/test/test_unit_json_transcoder.cxx +4 -0
- package/deps/couchbase-cxx-client/test/test_unit_transaction_utils.cxx +113 -0
- package/deps/couchbase-cxx-client/test/test_unit_utils.cxx +8 -4
- package/deps/couchbase-cxx-client/test/utils/CMakeLists.txt +13 -9
- package/deps/couchbase-cxx-client/test/utils/integration_shortcuts.hxx +3 -3
- package/deps/couchbase-cxx-client/test/utils/integration_test_guard.cxx +19 -9
- package/deps/couchbase-cxx-client/test/utils/server_version.hxx +10 -0
- package/deps/couchbase-cxx-client/test/utils/test_data.cxx +41 -0
- package/deps/couchbase-cxx-client/test/utils/test_data.hxx +29 -0
- package/deps/couchbase-cxx-client/test/utils/wait_until.cxx +61 -0
- package/deps/couchbase-cxx-client/test/utils/wait_until.hxx +8 -1
- package/deps/couchbase-cxx-client/third_party/catch2/.bazelrc +10 -0
- package/deps/couchbase-cxx-client/third_party/catch2/.conan/build.py +4 -4
- package/deps/couchbase-cxx-client/third_party/catch2/.conan/test_package/CMakeLists.txt +5 -4
- package/deps/couchbase-cxx-client/third_party/catch2/.conan/test_package/conanfile.py +3 -2
- package/deps/couchbase-cxx-client/third_party/catch2/.conan/test_package/test_package.cpp +1 -3
- package/deps/couchbase-cxx-client/third_party/catch2/.github/FUNDING.yml +1 -0
- package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/linux-bazel-builds.yml +24 -0
- package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/linux-meson-builds.yml +43 -0
- package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/linux-other-builds.yml +104 -0
- package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/linux-simple-builds.yml +122 -0
- package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/mac-builds.yml +52 -0
- package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/validate-header-guards.yml +36 -0
- package/deps/couchbase-cxx-client/third_party/catch2/.github/workflows/windows-simple-builds.yml +37 -0
- package/deps/couchbase-cxx-client/third_party/catch2/BUILD.bazel +83 -8
- package/deps/couchbase-cxx-client/third_party/catch2/CMake/CatchConfigOptions.cmake +79 -0
- package/deps/couchbase-cxx-client/third_party/catch2/CMake/CatchMiscFunctions.cmake +120 -0
- package/deps/couchbase-cxx-client/third_party/catch2/CMake/catch2-with-main.pc.in +10 -0
- package/deps/couchbase-cxx-client/third_party/catch2/CMake/catch2.pc.in +5 -1
- package/deps/couchbase-cxx-client/third_party/catch2/CMakeLists.txt +98 -152
- package/deps/couchbase-cxx-client/third_party/catch2/CMakePresets.json +25 -0
- package/deps/couchbase-cxx-client/third_party/catch2/Doxyfile +2484 -0
- package/deps/couchbase-cxx-client/third_party/catch2/README.md +83 -17
- package/deps/couchbase-cxx-client/third_party/catch2/SECURITY.md +19 -0
- package/deps/couchbase-cxx-client/third_party/catch2/WORKSPACE.bazel +16 -0
- package/deps/couchbase-cxx-client/third_party/catch2/appveyor.yml +55 -73
- package/deps/couchbase-cxx-client/third_party/catch2/codecov.yml +3 -6
- package/deps/couchbase-cxx-client/third_party/catch2/conanfile.py +44 -14
- package/deps/couchbase-cxx-client/third_party/catch2/data/artwork/catch2-logo-small-with-background.png +0 -0
- package/deps/couchbase-cxx-client/third_party/catch2/docs/Readme.md +18 -16
- package/deps/couchbase-cxx-client/third_party/catch2/docs/assertions.md +45 -64
- package/deps/couchbase-cxx-client/third_party/catch2/docs/benchmarks.md +3 -6
- package/deps/couchbase-cxx-client/third_party/catch2/docs/ci-and-misc.md +27 -29
- package/deps/couchbase-cxx-client/third_party/catch2/docs/cmake-integration.md +157 -35
- package/deps/couchbase-cxx-client/third_party/catch2/docs/command-line.md +232 -65
- package/deps/couchbase-cxx-client/third_party/catch2/docs/commercial-users.md +14 -13
- package/deps/couchbase-cxx-client/third_party/catch2/docs/comparing-floating-point-numbers.md +192 -0
- package/deps/couchbase-cxx-client/third_party/catch2/docs/configuration.md +48 -54
- package/deps/couchbase-cxx-client/third_party/catch2/docs/contributing.md +150 -38
- package/deps/couchbase-cxx-client/third_party/catch2/docs/deprecations.md +14 -118
- package/deps/couchbase-cxx-client/third_party/catch2/docs/event-listeners.md +31 -62
- package/deps/couchbase-cxx-client/third_party/catch2/docs/faq.md +94 -0
- package/deps/couchbase-cxx-client/third_party/catch2/docs/generators.md +14 -10
- package/deps/couchbase-cxx-client/third_party/catch2/docs/limitations.md +34 -36
- package/deps/couchbase-cxx-client/third_party/catch2/docs/list-of-examples.md +0 -3
- package/deps/couchbase-cxx-client/third_party/catch2/docs/logging.md +2 -2
- package/deps/couchbase-cxx-client/third_party/catch2/docs/matchers.md +355 -122
- package/deps/couchbase-cxx-client/third_party/catch2/docs/migrate-v2-to-v3.md +98 -0
- package/deps/couchbase-cxx-client/third_party/catch2/docs/opensource-users.md +43 -13
- package/deps/couchbase-cxx-client/third_party/catch2/docs/other-macros.md +19 -18
- package/deps/couchbase-cxx-client/third_party/catch2/docs/own-main.md +50 -49
- package/deps/couchbase-cxx-client/third_party/catch2/docs/release-notes.md +375 -6
- package/deps/couchbase-cxx-client/third_party/catch2/docs/release-process.md +9 -16
- package/deps/couchbase-cxx-client/third_party/catch2/docs/reporter-events.md +175 -0
- package/deps/couchbase-cxx-client/third_party/catch2/docs/reporters.md +191 -25
- package/deps/couchbase-cxx-client/third_party/catch2/docs/skipping-passing-failing.md +129 -0
- package/deps/couchbase-cxx-client/third_party/catch2/docs/test-cases-and-sections.md +91 -20
- package/deps/couchbase-cxx-client/third_party/catch2/docs/test-fixtures.md +28 -9
- package/deps/couchbase-cxx-client/third_party/catch2/docs/tostring.md +3 -3
- package/deps/couchbase-cxx-client/third_party/catch2/docs/tutorial.md +87 -139
- package/deps/couchbase-cxx-client/third_party/catch2/docs/usage-tips.md +100 -0
- package/deps/couchbase-cxx-client/third_party/catch2/docs/why-catch.md +24 -11
- package/deps/couchbase-cxx-client/third_party/catch2/examples/010-TestCase.cpp +4 -7
- package/deps/couchbase-cxx-client/third_party/catch2/examples/020-TestCase-1.cpp +3 -9
- package/deps/couchbase-cxx-client/third_party/catch2/examples/020-TestCase-2.cpp +2 -2
- package/deps/couchbase-cxx-client/third_party/catch2/examples/030-Asn-Require-Check.cpp +5 -5
- package/deps/couchbase-cxx-client/third_party/catch2/examples/100-Fix-Section.cpp +5 -4
- package/deps/couchbase-cxx-client/third_party/catch2/examples/110-Fix-ClassFixture.cpp +7 -4
- package/deps/couchbase-cxx-client/third_party/catch2/examples/120-Bdd-ScenarioGivenWhenThen.cpp +4 -4
- package/deps/couchbase-cxx-client/third_party/catch2/examples/210-Evt-EventListeners.cpp +51 -44
- package/deps/couchbase-cxx-client/third_party/catch2/examples/231-Cfg-OutputStreams.cpp +3 -4
- package/deps/couchbase-cxx-client/third_party/catch2/examples/300-Gen-OwnGenerator.cpp +13 -3
- package/deps/couchbase-cxx-client/third_party/catch2/examples/301-Gen-MapTypeConversion.cpp +9 -7
- package/deps/couchbase-cxx-client/third_party/catch2/examples/302-Gen-Table.cpp +4 -3
- package/deps/couchbase-cxx-client/third_party/catch2/examples/310-Gen-VariablesInGenerators.cpp +3 -1
- package/deps/couchbase-cxx-client/third_party/catch2/examples/311-Gen-CustomCapture.cpp +3 -1
- package/deps/couchbase-cxx-client/third_party/catch2/examples/CMakeLists.txt +29 -126
- package/deps/couchbase-cxx-client/third_party/catch2/extras/Catch.cmake +279 -0
- package/deps/couchbase-cxx-client/third_party/catch2/extras/CatchAddTests.cmake +187 -0
- package/deps/couchbase-cxx-client/third_party/catch2/extras/CatchShardTests.cmake +74 -0
- package/deps/couchbase-cxx-client/third_party/catch2/extras/CatchShardTestsImpl.cmake +52 -0
- package/deps/couchbase-cxx-client/third_party/catch2/extras/catch_amalgamated.cpp +10655 -0
- package/deps/couchbase-cxx-client/third_party/catch2/extras/catch_amalgamated.hpp +12972 -0
- package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/CMakeLists.txt +20 -0
- package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/NullOStream.cpp +10 -0
- package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/NullOStream.h +20 -0
- package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/build_fuzzers.sh +33 -0
- package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/fuzz_TestSpecParser.cpp +16 -0
- package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/fuzz_XmlWriter.cpp +16 -0
- package/deps/couchbase-cxx-client/third_party/catch2/fuzzing/fuzz_textflow.cpp +47 -0
- package/deps/couchbase-cxx-client/third_party/catch2/mdsnippets.json +9 -0
- package/deps/couchbase-cxx-client/third_party/catch2/meson.build +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/CMakeLists.txt +510 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_benchmark.hpp +147 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_benchmark_all.hpp +46 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_chronometer.cpp +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_chronometer.hpp +74 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_clock.hpp +39 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_constructor.hpp +82 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_environment.hpp +37 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_estimate.hpp +30 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_execution_plan.hpp +58 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_optimizer.hpp +78 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_outlier_classification.hpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/catch_sample_analysis.hpp +49 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_analyse.hpp +79 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_benchmark_function.cpp +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_benchmark_function.hpp +107 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_benchmark_stats.hpp +64 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_benchmark_stats_fwd.hpp +23 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_complete_invoke.hpp +58 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_estimate_clock.hpp +121 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_measure.hpp +32 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_repeat.hpp +36 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.cpp +31 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_run_for_at_least.hpp +65 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_stats.cpp +257 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_stats.hpp +144 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/benchmark/detail/catch_timing.hpp +31 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_all.hpp +127 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_approx.cpp +85 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_approx.hpp +128 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_assertion_info.hpp +28 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_assertion_result.cpp +105 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_assertion_result.hpp +60 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_config.cpp +247 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_config.hpp +153 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_get_random_seed.cpp +18 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_get_random_seed.hpp +18 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_message.cpp +116 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_message.hpp +148 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_registry_hub.cpp +105 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_section_info.hpp +42 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_session.cpp +363 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_session.hpp +62 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tag_alias.hpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tag_alias_autoregistrar.cpp +24 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tag_alias_autoregistrar.hpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_template_test_macros.hpp +124 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_case_info.cpp +247 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_case_info.hpp +131 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_macros.hpp +226 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_spec.cpp +138 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_test_spec.hpp +119 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_timer.cpp +37 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_timer.hpp +27 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tostring.cpp +254 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_tostring.hpp +668 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_totals.cpp +65 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_totals.hpp +41 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_translate_exception.cpp +20 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_translate_exception.hpp +88 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_user_config.hpp.in +210 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_version.cpp +43 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_version.hpp +39 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/catch_version_macros.hpp +15 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generator_exception.cpp +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generator_exception.hpp +31 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators.cpp +42 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators.hpp +250 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_adapters.hpp +241 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_all.hpp +30 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_random.cpp +13 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_random.hpp +98 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/generators/catch_generators_range.hpp +110 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_all.hpp +37 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_capture.cpp +13 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_capture.hpp +109 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_config.cpp +13 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_config.hpp +100 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_enum_values_registry.hpp +47 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_exception.cpp +14 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_exception.hpp +36 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.cpp +32 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_generatortracker.hpp +90 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.cpp +14 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_registry_hub.hpp +66 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_reporter.cpp +101 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_reporter.hpp +224 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.cpp +14 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_reporter_factory.hpp +45 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_tag_alias_registry.hpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_test_invoker.hpp +21 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_testcase.cpp +13 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/interfaces/catch_interfaces_testcase.hpp +36 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_assertion_handler.cpp +82 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_assertion_handler.hpp +68 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_case_insensitive_comparisons.cpp +35 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_case_insensitive_comparisons.hpp +30 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_case_sensitive.hpp +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_clara.cpp +448 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_clara.hpp +702 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_commandline.cpp +313 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_commandline.hpp +21 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_compare_traits.hpp +75 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_compiler_capabilities.hpp +430 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_config_android_logwrite.hpp +33 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_config_counter.hpp +32 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_config_uncaught_exceptions.hpp +44 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_config_wchar.hpp +33 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_console_colour.cpp +282 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_console_colour.hpp +141 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_console_width.hpp +19 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_container_nonmembers.hpp +73 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_context.cpp +41 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_context.hpp +51 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_debug_console.cpp +45 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_debug_console.hpp +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_debugger.cpp +120 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_debugger.hpp +67 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_decomposer.cpp +23 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_decomposer.hpp +340 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_enforce.cpp +41 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_enforce.hpp +54 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_enum_values_registry.cpp +73 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_enum_values_registry.hpp +36 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_errno_guard.cpp +16 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_errno_guard.hpp +27 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_exception_translator_registry.cpp +84 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_exception_translator_registry.hpp +30 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_fatal_condition_handler.cpp +243 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_fatal_condition_handler.hpp +69 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_floating_point_helpers.cpp +32 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_floating_point_helpers.hpp +103 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_getenv.cpp +37 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_getenv.hpp +20 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_is_permutation.hpp +138 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_istream.cpp +159 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_istream.hpp +54 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_lazy_expr.cpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_lazy_expr.hpp +40 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_leak_detector.cpp +38 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_leak_detector.hpp +19 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_list.cpp +123 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_list.hpp +43 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_logical_traits.hpp +44 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_main.cpp +39 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_message_info.cpp +25 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_message_info.hpp +42 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_meta.hpp +47 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_move_and_forward.hpp +19 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_noncopyable.hpp +28 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_optional.hpp +100 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_output_redirect.cpp +146 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_output_redirect.hpp +118 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_parse_numbers.cpp +52 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_parse_numbers.hpp +26 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_platform.hpp +37 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_polyfills.cpp +34 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_polyfills.hpp +16 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_preprocessor.hpp +237 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_preprocessor_remove_parens.hpp +19 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_random_number_generator.cpp +70 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_random_number_generator.hpp +59 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_random_seed_generation.cpp +34 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_random_seed_generation.hpp +26 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reporter_registry.cpp +88 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reporter_registry.hpp +55 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reporter_spec_parser.cpp +173 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reporter_spec_parser.hpp +85 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_result_type.cpp +26 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_result_type.hpp +57 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reusable_string_stream.cpp +62 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_reusable_string_stream.hpp +57 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_run_context.cpp +688 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_run_context.hpp +160 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_section.cpp +60 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_section.hpp +53 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_sharding.hpp +42 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_singletons.cpp +36 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_singletons.hpp +45 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_source_line_info.cpp +33 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_source_line_info.hpp +37 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_startup_exception_registry.cpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_startup_exception_registry.hpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stdstreams.cpp +24 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stdstreams.hpp +22 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stream_end_stop.hpp +30 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_string_manip.cpp +104 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_string_manip.hpp +61 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stringref.cpp +66 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_stringref.hpp +121 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_tag_alias_registry.cpp +55 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_tag_alias_registry.hpp +33 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_template_test_registry.hpp +337 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_info_hasher.cpp +39 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_info_hasher.hpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_registry_impl.cpp +146 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_registry_impl.hpp +62 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_tracker.cpp +239 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_case_tracker.hpp +244 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_failure_exception.cpp +31 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_failure_exception.hpp +34 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_macro_impl.hpp +159 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_registry.cpp +82 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_registry.hpp +132 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_run_info.hpp +22 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_spec_parser.cpp +239 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_test_spec_parser.hpp +81 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_textflow.cpp +255 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_textflow.hpp +169 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_to_string.hpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_uncaught_exceptions.cpp +26 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_uncaught_exceptions.hpp +15 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_unique_name.hpp +20 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_unique_ptr.hpp +118 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_void_type.hpp +25 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_wildcard_pattern.cpp +47 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_wildcard_pattern.hpp +38 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_windows_h_proxy.hpp +28 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_xmlwriter.cpp +348 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/internal/catch_xmlwriter.hpp +152 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers.cpp +25 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers.hpp +237 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_all.hpp +36 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_container_properties.cpp +34 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_container_properties.hpp +90 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_contains.hpp +102 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_exception.cpp +26 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_exception.hpp +61 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_floating_point.cpp +241 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_floating_point.hpp +94 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_predicate.cpp +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_predicate.hpp +59 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_quantifiers.cpp +24 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_quantifiers.hpp +165 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_range_equals.hpp +144 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_string.cpp +114 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_string.hpp +85 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_templated.cpp +41 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_templated.hpp +296 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/catch_matchers_vector.hpp +194 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/internal/catch_matchers_impl.cpp +25 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/matchers/internal/catch_matchers_impl.hpp +83 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/meson.build +368 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_automake.cpp +37 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_automake.hpp +38 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_common_base.cpp +49 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_common_base.hpp +79 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_compact.cpp +254 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_compact.hpp +39 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_console.cpp +656 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_console.hpp +67 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_cumulative_base.cpp +159 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_cumulative_base.hpp +151 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_event_listener.cpp +40 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_event_listener.hpp +60 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_helpers.cpp +343 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_helpers.hpp +95 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_junit.cpp +309 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_junit.hpp +58 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_multi.cpp +197 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_multi.hpp +72 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_registrars.cpp +36 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_registrars.hpp +131 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_sonarqube.cpp +162 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_sonarqube.hpp +61 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_streaming_base.cpp +23 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_streaming_base.hpp +73 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_tap.cpp +229 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_tap.hpp +43 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_teamcity.cpp +177 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_teamcity.hpp +66 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_xml.cpp +336 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporter_xml.hpp +66 -0
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch2/reporters/catch_reporters_all.hpp +40 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/CMakeLists.txt +665 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/CMakeLists.txt +554 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/ToDo.txt +10 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X01-PrefixedMacros.cpp +97 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X02-DisabledMacros.cpp +65 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp +39 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp +40 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X05-DeferredStaticChecks.cpp +21 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X10-FallbackStringifier.cpp +35 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X11-DisableStringification.cpp +27 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X12-CustomDebugBreakMacro.cpp +26 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X21-PartialTestCaseEvents.cpp +74 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X22-BenchmarksInCumulativeReporter.cpp +79 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X23-CasingInReporterNames.cpp +41 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X24-ListenerStdoutCaptureInMultireporter.cpp +40 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X25-ListenerCanAskForCapturedStdout.cpp +47 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X26-ReporterPreferencesForPassingAssertionsIsRespected.cpp +52 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X27-CapturedStdoutInTestCaseEvents.cpp +82 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X28-ListenersGetEventsBeforeReporters.cpp +99 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X29-CustomArgumentsForReporters.cpp +59 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X30-BazelReporter.cpp +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X31-DuplicatedTestCases.cpp +16 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X32-DuplicatedTestCasesDifferentTags.cpp +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X33-DuplicatedTestCaseMethods.cpp +22 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X34-DuplicatedTestCaseMethodsDifferentFixtures.cpp +27 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X35-DuplicatedReporterNames.cpp +31 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X90-WindowsHeaderInclusion.cpp +21 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X91-AmalgamatedCatch.cpp +38 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X92-NoTests.cpp +11 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/ExtraTests/X93-AllSkipped.cpp +16 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/automake.sw.approved.txt +420 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/automake.sw.multi.approved.txt +409 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/compact.sw.approved.txt +2544 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/compact.sw.multi.approved.txt +2533 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/console.std.approved.txt +1538 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/console.sw.approved.txt +18236 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/console.sw.multi.approved.txt +18225 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/console.swa4.approved.txt +956 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/default.sw.multi.approved.txt +11 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/junit.sw.approved.txt +2052 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/junit.sw.multi.approved.txt +2051 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/sonarqube.sw.approved.txt +2071 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt +2070 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/tap.sw.approved.txt +4481 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/tap.sw.multi.approved.txt +4470 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/teamcity.sw.approved.txt +998 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/teamcity.sw.multi.approved.txt +997 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/xml.sw.approved.txt +21208 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/Baselines/xml.sw.multi.approved.txt +21207 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Algorithms.tests.cpp +94 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Clara.tests.cpp +73 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +467 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/CmdLineHelpers.tests.cpp +111 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp +64 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Details.tests.cpp +131 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/FloatingPoint.tests.cpp +74 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp +546 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp +447 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Parse.tests.cpp +38 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/PartTracker.tests.cpp +254 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp +62 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp +328 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Sharding.tests.cpp +45 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp +32 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/String.tests.cpp +212 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/StringManip.tests.cpp +83 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Tag.tests.cpp +104 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/TestCaseInfoHasher.tests.cpp +72 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/TestSpec.tests.cpp +365 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/TestSpecParser.tests.cpp +55 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/TextFlow.tests.cpp +200 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/ToString.tests.cpp +97 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Traits.tests.cpp +45 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/UniquePtr.tests.cpp +141 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/IntrospectiveTests/Xml.tests.cpp +183 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/TestRegistrations.cpp +181 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/TimingTests/Sleep.tests.cpp +24 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Approx.tests.cpp +218 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/BDD.tests.cpp +106 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Benchmark.tests.cpp +173 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Class.tests.cpp +133 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Compilation.tests.cpp +355 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Condition.tests.cpp +334 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Decomposition.tests.cpp +41 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/EnumToString.tests.cpp +108 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Exception.tests.cpp +204 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Generators.tests.cpp +313 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Matchers.tests.cpp +1144 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/MatchersRanges.tests.cpp +917 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Message.tests.cpp +287 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Misc.tests.cpp +553 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Skip.tests.cpp +73 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringByte.tests.cpp +23 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringChrono.tests.cpp +51 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringGeneral.tests.cpp +211 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringOptional.tests.cpp +31 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringPair.tests.cpp +38 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringTuple.tests.cpp +54 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringVariant.tests.cpp +99 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringVector.tests.cpp +94 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/ToStringWhich.tests.cpp +186 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/Tricky.tests.cpp +380 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/UsageTests/VariadicMacros.tests.cpp +29 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/helpers/parse_test_spec.cpp +22 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/helpers/parse_test_spec.hpp +20 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/helpers/range_test_helpers.hpp +210 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/SelfTest/helpers/type_with_lit_0_comparisons.hpp +44 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/ConfigureTestsCommon.py +75 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testBazelReporter.py +104 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testBazelSharding.py +75 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testConfigureDefaultReporter.py +41 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testConfigureDisable.py +48 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testConfigureDisableStringification.py +44 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testConfigureExperimentalRedirect.py +49 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testPartialTestCaseEvent.py +79 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testRandomOrder.py +77 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/TestScripts/testSharding.py +165 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tests/meson.build +76 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/appveyorBuildConfigurationScript.bat +21 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/appveyorMergeCoverageScript.py +9 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/appveyorTestRunScript.bat +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/coverage-helper.cpp +142 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/misc/installOpenCppCoverage.ps1 +19 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/approvalTests.py +243 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/approve.py +31 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/buildAndTest.cmd +17 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/buildAndTest.sh +19 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/checkConvenienceHeaders.py +151 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/checkDuplicateFilenames.py +14 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/checkLicense.py +45 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/developBuild.py +9 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/extractFeaturesFromReleaseNotes.py +92 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/fixWhitespace.py +51 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/generateAmalgamatedFiles.py +129 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/majorRelease.py +9 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/minorRelease.py +9 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/patchRelease.py +9 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/releaseCommon.py +143 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/scriptCommon.py +4 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/updateDocumentSnippets.py +23 -0
- package/deps/couchbase-cxx-client/third_party/catch2/tools/scripts/updateDocumentToC.py +447 -0
- package/deps/couchbase-cxx-client/third_party/snappy/.github/workflows/build.yml +135 -0
- package/deps/couchbase-cxx-client/third_party/snappy/.gitmodules +6 -0
- package/deps/couchbase-cxx-client/third_party/snappy/CMakeLists.txt +150 -27
- package/deps/couchbase-cxx-client/third_party/snappy/CONTRIBUTING.md +9 -4
- package/deps/couchbase-cxx-client/third_party/snappy/NEWS +12 -0
- package/deps/couchbase-cxx-client/third_party/snappy/README.md +52 -35
- package/deps/couchbase-cxx-client/third_party/snappy/cmake/config.h.in +28 -24
- package/deps/couchbase-cxx-client/third_party/snappy/snappy-internal.h +189 -25
- package/deps/couchbase-cxx-client/third_party/snappy/snappy-sinksource.cc +26 -9
- package/deps/couchbase-cxx-client/third_party/snappy/snappy-sinksource.h +11 -11
- package/deps/couchbase-cxx-client/third_party/snappy/snappy-stubs-internal.cc +1 -1
- package/deps/couchbase-cxx-client/third_party/snappy/snappy-stubs-internal.h +227 -308
- package/deps/couchbase-cxx-client/third_party/snappy/snappy-stubs-public.h.in +0 -11
- package/deps/couchbase-cxx-client/third_party/snappy/snappy-test.cc +88 -198
- package/deps/couchbase-cxx-client/third_party/snappy/snappy-test.h +102 -285
- package/deps/couchbase-cxx-client/third_party/snappy/snappy.cc +1176 -410
- package/deps/couchbase-cxx-client/third_party/snappy/snappy.h +19 -4
- package/deps/couchbase-cxx-client/third_party/snappy/snappy_benchmark.cc +378 -0
- package/deps/couchbase-cxx-client/third_party/snappy/snappy_compress_fuzzer.cc +3 -2
- package/deps/couchbase-cxx-client/third_party/snappy/snappy_test_data.cc +57 -0
- package/deps/couchbase-cxx-client/third_party/snappy/snappy_test_data.h +68 -0
- package/deps/couchbase-cxx-client/third_party/snappy/snappy_test_tool.cc +471 -0
- package/deps/couchbase-cxx-client/third_party/snappy/snappy_uncompress_fuzzer.cc +3 -2
- package/deps/couchbase-cxx-client/third_party/snappy/snappy_unittest.cc +170 -666
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/workflows/build-and-test.yml +38 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/workflows/pylint.yml +26 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.github/workflows/test_bindings.yml +24 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.travis-libcxx-setup.sh +28 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.travis.yml +231 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/.ycm_extra_conf.py +115 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/AUTHORS +58 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/BUILD.bazel +44 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/CMakeLists.txt +287 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/CONTRIBUTING.md +58 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/CONTRIBUTORS +83 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/LICENSE +202 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/README.md +1323 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/WORKSPACE +51 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/_config.yml +1 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/appveyor.yml +50 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/BUILD +3 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/build_defs.bzl +25 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/google_benchmark/BUILD +38 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/google_benchmark/__init__.py +156 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/google_benchmark/benchmark.cc +180 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/google_benchmark/example.py +136 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/pybind11.BUILD +20 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/python_headers.BUILD +6 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/bindings/python/requirements.txt +2 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/AddCXXCompilerFlag.cmake +74 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/CXXFeatureCheck.cmake +69 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/Config.cmake.in +1 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/GetGitVersion.cmake +54 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/GoogleTest.cmake +41 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/GoogleTest.cmake.in +58 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/benchmark.pc.in +12 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/gnu_posix_regex.cpp +12 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/llvm-toolchain.cmake +8 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/posix_regex.cpp +14 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/split_list.cmake +3 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/std_regex.cpp +10 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/steady_clock.cpp +7 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/cmake/thread_safety_attributes.cpp +4 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conan/CMakeLists.txt +7 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conan/test_package/CMakeLists.txt +10 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conan/test_package/conanfile.py +19 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conan/test_package/test_package.cpp +18 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/conanfile.py +79 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/dependencies.md +18 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/docs/AssemblyTests.md +147 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/docs/_config.yml +1 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/docs/releasing.md +16 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/docs/tools.md +203 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/include/benchmark/benchmark.h +1604 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/requirements.txt +2 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/setup.py +140 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/CMakeLists.txt +114 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/arraysize.h +33 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark.cc +499 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_api_internal.cc +15 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_api_internal.h +53 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_main.cc +17 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_name.cc +58 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_register.cc +515 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_register.h +108 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_runner.cc +362 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/benchmark_runner.h +51 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/check.h +82 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/colorprint.cc +188 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/colorprint.h +33 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/commandlineflags.cc +228 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/commandlineflags.h +103 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/complexity.cc +238 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/complexity.h +55 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/console_reporter.cc +177 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/counter.cc +80 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/counter.h +32 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/csv_reporter.cc +154 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/cycleclock.h +211 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/internal_macros.h +102 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/json_reporter.cc +255 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/log.h +74 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/mutex.h +155 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/re.h +158 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/reporter.cc +105 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/sleep.cc +67 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/sleep.h +15 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/statistics.cc +193 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/statistics.h +37 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/string_util.cc +255 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/string_util.h +59 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/sysinfo.cc +716 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/thread_manager.h +64 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/thread_timer.h +86 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/timers.cc +245 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/src/timers.h +48 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/AssemblyTests.cmake +46 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/BUILD +73 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/CMakeLists.txt +263 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/args_product_test.cc +77 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/basic_test.cc +136 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/benchmark_gtest.cc +134 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/benchmark_name_gtest.cc +74 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/benchmark_test.cc +245 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/clobber_memory_assembly_test.cc +64 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/commandlineflags_gtest.cc +201 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/complexity_test.cc +213 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/cxx03_test.cc +63 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/diagnostics_test.cc +80 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/display_aggregates_only_test.cc +43 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/donotoptimize_assembly_test.cc +163 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/donotoptimize_test.cc +52 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/filter_test.cc +104 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/fixture_test.cc +51 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/internal_threading_test.cc +184 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/link_main_test.cc +8 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/map_test.cc +57 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/memory_manager_test.cc +44 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/multiple_ranges_test.cc +96 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/options_test.cc +75 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/output_test.h +213 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/output_test_helper.cc +515 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/register_benchmark_test.cc +184 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/report_aggregates_only_test.cc +39 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/reporter_output_test.cc +747 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/skip_with_error_test.cc +195 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/state_assembly_test.cc +68 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/statistics_gtest.cc +28 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/string_util_gtest.cc +153 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/templated_fixture_test.cc +28 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/user_counters_tabular_test.cc +285 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/user_counters_test.cc +531 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/test/user_counters_thousands_test.cc +173 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/BUILD.bazel +19 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/compare.py +429 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test1_run1.json +119 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test1_run2.json +119 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test2_run.json +81 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test3_run0.json +65 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/Inputs/test3_run1.json +65 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/__init__.py +8 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/report.py +903 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/gbench/util.py +163 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/requirements.txt +1 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/benchmark/tools/strip_asm.py +151 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/.travis.yml +65 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/BUILD.bazel +182 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/CMakeLists.txt +32 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/CONTRIBUTING.md +142 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/LICENSE +28 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/README.md +135 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/WORKSPACE +30 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/appveyor.yml +156 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/build-linux-bazel.sh +36 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/build-platformio.sh +2 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/env-linux.sh +41 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/env-osx.sh +41 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/get-nprocessors.sh +48 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/install-linux.sh +49 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/install-osx.sh +39 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/install-platformio.sh +5 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/log-config.sh +47 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/ci/travis.sh +29 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/CMakeLists.txt +219 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/CONTRIBUTORS +40 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/LICENSE +28 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/README.md +44 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/cmake/gmock.pc.in +10 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/cmake/gmock_main.pc.in +10 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/cheat_sheet.md +786 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/community_created_documentation.md +9 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/cook_book.md +4276 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/for_dummies.md +702 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/gmock_faq.md +398 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/docs/pump_manual.md +189 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-actions.h +1688 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-cardinalities.h +157 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-function-mocker.h +479 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h +577 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-generated-actions.h.pump +390 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-matchers.h +5394 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-more-matchers.h +92 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-nice-strict.h +230 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h +2030 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/gmock.h +98 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/README.md +16 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +10 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +12 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-matchers.h +36 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/custom/gmock-port.h +39 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/gmock-internal-utils.h +459 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/gmock-port.h +87 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/include/gmock/internal/gmock-pp.h +279 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/README.md +5 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/fuse_gmock_files.py +257 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/LICENSE +203 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/README +34 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/README.cppclean +115 -0
- package/deps/couchbase-cxx-client/{core/CMakeLists.txt → third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/__init__.py} +0 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/ast.py +1772 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class.py +245 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/gmock_class_test.py +552 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/keywords.py +56 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/tokenize.py +284 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/cpp/utils.py +37 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/generator/gmock_gen.py +30 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/scripts/pump.py +856 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-all.cc +46 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-cardinalities.cc +155 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-internal-utils.cc +200 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-matchers.cc +459 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock-spec-builders.cc +908 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock.cc +213 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/src/gmock_main.cc +72 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/BUILD.bazel +111 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-actions_test.cc +1583 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-cardinalities_test.cc +429 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-function-mocker_nc.cc +16 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-function-mocker_nc_test.py +43 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-function-mocker_test.cc +974 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-generated-actions_test.cc +1036 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-internal-utils_test.cc +720 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-matchers_test.cc +8562 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-more-actions_test.cc +725 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-nice-strict_test.cc +500 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-port_test.cc +42 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-pp-string_test.cc +206 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-pp_test.cc +83 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock-spec-builders_test.cc +2775 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_all_test.cc +47 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_ex_test.cc +80 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_leak_test.py +104 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_leak_test_.cc +99 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_link2_test.cc +39 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_link_test.cc +39 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_link_test.h +690 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_output_test.py +183 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_output_test_.cc +309 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_output_test_golden.txt +317 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_stress_test.cc +240 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_test.cc +181 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/gmock_test_utils.py +108 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googlemock/test/pump_test.py +182 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/CMakeLists.txt +320 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/CONTRIBUTORS +38 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/LICENSE +28 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/README.md +262 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/Config.cmake.in +9 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/gtest.pc.in +9 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/gtest_main.pc.in +10 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/internal_utils.cmake +341 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/cmake/libgtest.la.in +21 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/advanced.md +2640 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/faq.md +771 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/pkgconfig.md +150 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/primer.md +583 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/docs/samples.md +22 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-death-test.h +342 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-matchers.h +756 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-message.h +219 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-param-test.h +512 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-printers.h +903 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-spi.h +238 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-test-part.h +184 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest-typed-test.h +337 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest.h +2491 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest_pred_impl.h +359 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/gtest_prod.h +61 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/custom/README.md +56 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/custom/gtest-port.h +37 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/custom/gtest.h +37 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h +304 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h +211 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-internal.h +1564 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h +947 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-port-arch.h +112 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-port.h +2371 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-string.h +175 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h +187 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/prime_tables.h +126 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample1.cc +66 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample1.h +41 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample10_unittest.cc +139 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample1_unittest.cc +151 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample2.cc +54 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample2.h +81 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample2_unittest.cc +107 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample3-inl.h +172 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample3_unittest.cc +149 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample4.cc +54 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample4.h +53 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample4_unittest.cc +53 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample5_unittest.cc +196 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample6_unittest.cc +224 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample7_unittest.cc +117 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample8_unittest.cc +154 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/samples/sample9_unittest.cc +156 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/README.md +5 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/common.py +83 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/fuse_gtest_files.py +253 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/gen_gtest_pred_impl.py +733 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/gtest-config.in +274 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/release_docs.py +158 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/run_with_path.py +32 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/upload.py +1402 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/scripts/upload_gtest.py +78 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-all.cc +48 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-death-test.cc +1644 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-filepath.cc +368 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-internal-inl.h +1228 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-matchers.cc +97 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-port.cc +1404 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-printers.cc +444 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-test-part.cc +108 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest-typed-test.cc +111 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest.cc +6606 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/src/gtest_main.cc +54 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/BUILD.bazel +562 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-break-on-failure-unittest.py +208 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-break-on-failure-unittest_.cc +86 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-catch-exceptions-test.py +236 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-catch-exceptions-test_.cc +293 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-color-test.py +127 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-color-test_.cc +62 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-death-test-test.cc +1542 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-death-test_ex_test.cc +92 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-env-var-test.py +120 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-env-var-test_.cc +132 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-failfast-unittest.py +410 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-failfast-unittest_.cc +167 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-filepath-test.cc +649 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-filter-unittest.py +639 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-filter-unittest_.cc +137 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-json-outfiles-test.py +191 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-json-output-unittest.py +804 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-list-tests-unittest.py +205 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-list-tests-unittest_.cc +156 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-listener-test.cc +518 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-message-test.cc +158 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-options-test.cc +216 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-output-test-golden-lin.txt +1180 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-output-test.py +346 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-output-test_.cc +1126 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test.py +63 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-invalid-name1-test_.cc +50 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test.py +62 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-invalid-name2-test_.cc +55 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-test.cc +1119 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test-test.h +51 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-param-test2-test.cc +61 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-port-test.cc +1280 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-printers-test.cc +1847 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-setuptestsuite-test.py +54 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-setuptestsuite-test_.cc +49 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-shuffle-test.py +323 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-shuffle-test_.cc +101 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-test-part-test.cc +230 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-throw-on-failure-test.py +168 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-throw-on-failure-test_.cc +71 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-uninitialized-test.py +67 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/googletest-uninitialized-test_.cc +42 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest-typed-test2_test.cc +44 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest-typed-test_test.cc +462 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest-typed-test_test.h +65 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest-unittest-api_test.cc +341 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_all_test.cc +46 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_assert_by_exception_test.cc +116 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_environment_test.cc +188 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_help_test.py +171 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_help_test_.cc +45 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_json_test_utils.py +60 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_list_output_unittest.py +286 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_list_output_unittest_.cc +81 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_main_unittest.cc +44 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_no_test_unittest.cc +54 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_pred_impl_unittest.cc +2422 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_premature_exit_test.cc +126 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_prod_test.cc +56 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_repeat_test.cc +233 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_skip_check_output_test.py +59 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_skip_environment_check_output_test.py +54 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_skip_in_environment_setup_test.cc +49 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_skip_test.cc +55 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_sole_header_test.cc +56 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_stress_test.cc +248 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_test_macro_stack_footprint_test.cc +89 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_test_utils.py +312 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_testbridge_test.py +63 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_testbridge_test_.cc +43 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_throw_on_failure_ex_test.cc +90 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_unittest.cc +7792 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_outfile1_test_.cc +43 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_outfile2_test_.cc +43 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_outfiles_test.py +135 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_output_unittest.py +405 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_output_unittest_.cc +197 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/gtest_xml_test_utils.py +197 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/production.cc +35 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/googletest/test/production.h +54 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/library.json +62 -0
- package/deps/couchbase-cxx-client/third_party/snappy/third_party/googletest/platformio.ini +47 -0
- package/deps/couchbase-cxx-client/tools/CMakeLists.txt +2 -0
- package/deps/couchbase-cxx-client/tools/analytics.cxx +375 -0
- package/deps/couchbase-cxx-client/tools/analytics.hxx +26 -0
- package/deps/couchbase-cxx-client/tools/cbc.cxx +11 -4
- package/deps/couchbase-cxx-client/tools/command_registry.cxx +4 -0
- package/deps/couchbase-cxx-client/tools/get.cxx +27 -31
- package/deps/couchbase-cxx-client/tools/get.hxx +1 -1
- package/deps/couchbase-cxx-client/tools/pillowfight.cxx +396 -0
- package/deps/couchbase-cxx-client/tools/pillowfight.hxx +26 -0
- package/deps/couchbase-cxx-client/tools/query.cxx +97 -101
- package/deps/couchbase-cxx-client/tools/query.hxx +1 -1
- package/deps/couchbase-cxx-client/tools/utils.cxx +15 -1
- package/deps/couchbase-cxx-client/tools/utils.hxx +3 -0
- package/deps/couchbase-cxx-client/tools/version.hxx +1 -1
- package/dist/authenticators.d.ts +1 -1
- package/dist/binding.d.ts +24 -9
- package/dist/bindingutilities.d.ts +6 -2
- package/dist/bindingutilities.js +39 -7
- package/dist/cluster.d.ts +27 -0
- package/dist/cluster.js +88 -56
- package/dist/collection.js +6 -6
- package/dist/configProfile.js +16 -10
- package/dist/couchbase.d.ts +1 -0
- package/dist/couchbase.js +2 -1
- package/dist/errors.d.ts +2 -2
- package/dist/errors.js +4 -4
- package/dist/scope.js +6 -6
- package/dist/sdspecs.js +11 -11
- package/dist/searchquery.d.ts +1 -1
- package/dist/streamablepromises.d.ts +1 -1
- package/dist/transactions.js +5 -1
- package/dist/usermanager.js +9 -9
- package/dist/viewindexmanager.js +8 -8
- package/package.json +1 -1
- package/src/binding.cpp +2 -0
- package/src/jstocbpp_autogen.hpp +0 -4
- package/src/jstocbpp_basic.hpp +8 -2
- package/src/jstocbpp_errors.hpp +35 -0
- package/src/jstocbpp_transactions.hpp +61 -9
- package/src/transaction.cpp +1 -1
- package/deps/couchbase-cxx-client/core/config_profile.cxx +0 -25
- package/deps/couchbase-cxx-client/test/test_transaction_transaction_context.cxx +0 -550
- package/deps/couchbase-cxx-client/test/test_transaction_transaction_public_async_api.cxx +0 -392
- package/deps/couchbase-cxx-client/test/test_transaction_transaction_public_blocking_api.cxx +0 -643
- package/deps/couchbase-cxx-client/test/test_transaction_transaction_simple.cxx +0 -899
- package/deps/couchbase-cxx-client/test/test_transaction_transaction_simple_async.cxx +0 -972
- package/deps/couchbase-cxx-client/test/tools/CMakeLists.txt +0 -10
- package/deps/couchbase-cxx-client/test/tools/tool_kv_loader.cxx +0 -349
- package/deps/couchbase-cxx-client/test/utils/uniq_id.cxx +0 -29
- package/deps/couchbase-cxx-client/test/utils/uniq_id.hxx +0 -26
- package/deps/couchbase-cxx-client/third_party/catch2/.travis.yml +0 -335
- package/deps/couchbase-cxx-client/third_party/catch2/CMake/MiscFunctions.cmake +0 -26
- package/deps/couchbase-cxx-client/third_party/catch2/WORKSPACE +0 -0
- package/deps/couchbase-cxx-client/third_party/catch2/contrib/Catch.cmake +0 -206
- package/deps/couchbase-cxx-client/third_party/catch2/contrib/CatchAddTests.cmake +0 -135
- package/deps/couchbase-cxx-client/third_party/catch2/docs/slow-compiles.md +0 -106
- package/deps/couchbase-cxx-client/third_party/catch2/examples/000-CatchMain.cpp +0 -15
- package/deps/couchbase-cxx-client/third_party/catch2/examples/200-Rpt-CatchMain.cpp +0 -27
- package/deps/couchbase-cxx-client/third_party/catch2/examples/207-Rpt-TeamCityReporter.cpp +0 -171
- package/deps/couchbase-cxx-client/third_party/catch2/include/catch.hpp +0 -496
- package/deps/couchbase-cxx-client/third_party/catch2/include/catch_with_main.hpp +0 -14
- package/deps/couchbase-cxx-client/third_party/catch2/include/external/clara.hpp +0 -1268
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_benchmark.hpp +0 -122
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_benchmarking_all.hpp +0 -29
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_chronometer.hpp +0 -71
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_clock.hpp +0 -40
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_constructor.hpp +0 -79
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_environment.hpp +0 -38
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_estimate.hpp +0 -31
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_execution_plan.hpp +0 -59
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_optimizer.hpp +0 -68
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_outlier_classification.hpp +0 -29
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/catch_sample_analysis.hpp +0 -50
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_analyse.hpp +0 -78
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_benchmark_function.hpp +0 -105
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_complete_invoke.hpp +0 -68
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_estimate_clock.hpp +0 -115
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_measure.hpp +0 -35
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_repeat.hpp +0 -37
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_run_for_at_least.hpp +0 -65
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_stats.cpp +0 -224
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_stats.hpp +0 -160
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/benchmark/detail/catch_timing.hpp +0 -33
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_approx.cpp +0 -88
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_approx.h +0 -132
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertionhandler.cpp +0 -122
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertionhandler.h +0 -88
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertioninfo.h +0 -31
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertionresult.cpp +0 -104
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_assertionresult.h +0 -59
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_capture.hpp +0 -159
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_capture_matchers.cpp +0 -24
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_capture_matchers.h +0 -88
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_clara.h +0 -38
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_commandline.cpp +0 -230
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_commandline.h +0 -20
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_common.cpp +0 -43
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_common.h +0 -92
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_compiler_capabilities.h +0 -377
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_config.cpp +0 -86
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_config.hpp +0 -133
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_config_uncaught_exceptions.hpp +0 -44
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_console_colour.cpp +0 -243
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_console_colour.h +0 -69
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_context.cpp +0 -70
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_context.h +0 -64
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_debug_console.cpp +0 -41
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_debug_console.h +0 -17
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_debugger.cpp +0 -122
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_debugger.h +0 -65
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_decomposer.cpp +0 -24
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_decomposer.h +0 -259
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_default_main.hpp +0 -47
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_enforce.cpp +0 -40
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_enforce.h +0 -53
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_enum_values_registry.cpp +0 -75
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_enum_values_registry.h +0 -35
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_errno_guard.cpp +0 -15
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_errno_guard.h +0 -22
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_exception_translator_registry.cpp +0 -89
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_exception_translator_registry.h +0 -30
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_external_interfaces.h +0 -20
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_fatal_condition.cpp +0 -244
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_fatal_condition.h +0 -68
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_generators.cpp +0 -32
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_generators.hpp +0 -219
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_generators_generic.hpp +0 -237
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_generators_specific.hpp +0 -175
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_impl.hpp +0 -33
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_capture.cpp +0 -5
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_capture.h +0 -100
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_config.cpp +0 -5
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_config.h +0 -92
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_enum_values_registry.h +0 -46
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_exception.cpp +0 -6
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_exception.h +0 -88
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_generatortracker.h +0 -39
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_registry_hub.cpp +0 -6
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_registry_hub.h +0 -61
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_reporter.cpp +0 -114
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_reporter.h +0 -272
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_runner.cpp +0 -5
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_runner.h +0 -19
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_tag_alias_registry.h +0 -28
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_testcase.cpp +0 -6
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_interfaces_testcase.h +0 -38
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_leak_detector.cpp +0 -37
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_leak_detector.h +0 -18
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_list.cpp +0 -173
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_list.h +0 -38
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers.cpp +0 -28
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers.h +0 -174
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_exception.cpp +0 -30
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_exception.hpp +0 -36
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_floating.cpp +0 -237
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_floating.h +0 -70
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_generic.cpp +0 -9
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_generic.hpp +0 -58
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_string.cpp +0 -118
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_string.h +0 -80
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_matchers_vector.h +0 -180
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_message.cpp +0 -142
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_message.h +0 -99
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_meta.hpp +0 -50
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_objc.hpp +0 -215
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_objc_arc.hpp +0 -51
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_option.hpp +0 -73
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_output_redirect.cpp +0 -147
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_output_redirect.h +0 -116
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_platform.h +0 -30
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_polyfills.cpp +0 -31
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_polyfills.hpp +0 -15
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_preprocessor.hpp +0 -237
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_random_number_generator.cpp +0 -73
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_random_number_generator.h +0 -58
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_reenable_warnings.h +0 -21
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_registry_hub.cpp +0 -99
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_reporter_registrars.hpp +0 -78
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_reporter_registry.cpp +0 -34
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_reporter_registry.h +0 -37
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_result_type.cpp +0 -27
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_result_type.h +0 -55
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_run_context.cpp +0 -595
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_run_context.h +0 -159
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_section.cpp +0 -38
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_section.h +0 -51
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_section_info.cpp +0 -19
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_section_info.h +0 -42
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_session.cpp +0 -313
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_session.h +0 -62
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_singletons.cpp +0 -36
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_singletons.hpp +0 -44
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_startup_exception_registry.cpp +0 -28
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_startup_exception_registry.h +0 -29
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_stream.cpp +0 -187
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_stream.h +0 -51
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_string_manip.cpp +0 -109
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_string_manip.h +0 -45
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_stringref.cpp +0 -50
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_stringref.h +0 -104
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_suppress_warnings.h +0 -27
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias.cpp +0 -5
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias.h +0 -26
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias_autoregistrar.cpp +0 -16
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias_autoregistrar.h +0 -26
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias_registry.cpp +0 -58
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tag_alias_registry.h +0 -31
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_info.cpp +0 -186
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_info.h +0 -90
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_registry_impl.cpp +0 -176
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_registry_impl.h +0 -71
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_tracker.cpp +0 -254
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_case_tracker.h +0 -180
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_registry.cpp +0 -37
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_registry.h +0 -402
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_spec.cpp +0 -99
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_spec.h +0 -94
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_spec_parser.cpp +0 -240
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_test_spec_parser.h +0 -79
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_text.h +0 -17
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_timer.cpp +0 -74
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_timer.h +0 -30
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_to_string.hpp +0 -28
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tostring.cpp +0 -265
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_tostring.h +0 -675
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_totals.cpp +0 -61
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_totals.h +0 -41
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_uncaught_exceptions.cpp +0 -25
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_uncaught_exceptions.h +0 -15
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_user_interfaces.h +0 -18
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_version.cpp +0 -44
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_version.h +0 -39
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_wildcard_pattern.cpp +0 -47
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_wildcard_pattern.h +0 -38
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_windows_h_proxy.h +0 -39
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_xmlwriter.cpp +0 -334
- package/deps/couchbase-cxx-client/third_party/catch2/include/internal/catch_xmlwriter.h +0 -116
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_automake.hpp +0 -62
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_bases.cpp +0 -84
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_bases.hpp +0 -285
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_compact.cpp +0 -290
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_compact.h +0 -39
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_console.cpp +0 -700
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_console.h +0 -89
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_junit.cpp +0 -300
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_junit.h +0 -62
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_listening.cpp +0 -164
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_listening.h +0 -63
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_sonarqube.hpp +0 -181
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_tap.hpp +0 -254
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_teamcity.hpp +0 -219
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_xml.cpp +0 -281
- package/deps/couchbase-cxx-client/third_party/catch2/include/reporters/catch_reporter_xml.h +0 -68
- package/deps/couchbase-cxx-client/third_party/catch2/misc/appveyorBuildConfigurationScript.bat +0 -22
- package/deps/couchbase-cxx-client/third_party/catch2/misc/appveyorMergeCoverageScript.py +0 -9
- package/deps/couchbase-cxx-client/third_party/catch2/misc/appveyorTestRunScript.bat +0 -15
- package/deps/couchbase-cxx-client/third_party/catch2/misc/coverage-helper.cpp +0 -142
- package/deps/couchbase-cxx-client/third_party/catch2/misc/installOpenCppCoverage.ps1 +0 -19
- package/deps/couchbase-cxx-client/third_party/catch2/projects/CMakeLists.txt +0 -492
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/CMakeLists.txt +0 -201
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/ToDo.txt +0 -11
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X01-PrefixedMacros.cpp +0 -84
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X02-DisabledMacros.cpp +0 -31
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X03-DisabledExceptions-DefaultHandler.cpp +0 -23
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X04-DisabledExceptions-CustomHandler.cpp +0 -33
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X10-FallbackStringifier.cpp +0 -23
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X11-DisableStringification.cpp +0 -16
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X12-CustomDebugBreakMacro.cpp +0 -17
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X20-BenchmarkingMacros.cpp +0 -125
- package/deps/couchbase-cxx-client/third_party/catch2/projects/ExtraTests/X90-WindowsHeaderInclusion.cpp +0 -12
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/compact.sw.approved.txt +0 -1903
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/console.std.approved.txt +0 -1425
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/console.sw.approved.txt +0 -14183
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/console.swa4.approved.txt +0 -936
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/junit.sw.approved.txt +0 -1773
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/sonarqube.sw.approved.txt +0 -1777
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/Baselines/xml.sw.approved.txt +0 -16767
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/CompileTimePerfTests/10.tests.cpp +0 -13
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/CompileTimePerfTests/100.tests.cpp +0 -13
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/CompileTimePerfTests/All.tests.cpp +0 -15
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/CmdLine.tests.cpp +0 -582
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/Details.tests.cpp +0 -23
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/GeneratorsImpl.tests.cpp +0 -352
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/InternalBenchmark.tests.cpp +0 -405
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/PartTracker.tests.cpp +0 -253
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/RandomNumberGeneration.tests.cpp +0 -45
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/String.tests.cpp +0 -150
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/StringManip.tests.cpp +0 -67
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/Tag.tests.cpp +0 -54
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/ToString.tests.cpp +0 -53
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/IntrospectiveTests/Xml.tests.cpp +0 -114
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_console_colour.cpp +0 -3
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_debugger.cpp +0 -2
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_interfaces_reporter.cpp +0 -2
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_option.cpp +0 -3
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_stream.cpp +0 -3
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_test_case_tracker.cpp +0 -2
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_test_spec.cpp +0 -3
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/SurrogateCpps/catch_xmlwriter.cpp +0 -4
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/TestMain.cpp +0 -34
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/TimingTests/Sleep.tests.cpp +0 -23
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Approx.tests.cpp +0 -215
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/BDD.tests.cpp +0 -110
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Benchmark.tests.cpp +0 -144
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Class.tests.cpp +0 -137
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Compilation.tests.cpp +0 -269
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Condition.tests.cpp +0 -347
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Decomposition.tests.cpp +0 -39
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/EnumToString.tests.cpp +0 -99
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Exception.tests.cpp +0 -210
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Generators.tests.cpp +0 -271
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Matchers.tests.cpp +0 -676
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Message.tests.cpp +0 -269
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Misc.tests.cpp +0 -493
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringByte.tests.cpp +0 -15
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringChrono.tests.cpp +0 -44
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringGeneral.tests.cpp +0 -210
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringOptional.tests.cpp +0 -23
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringPair.tests.cpp +0 -30
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringTuple.tests.cpp +0 -47
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringVariant.tests.cpp +0 -91
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringVector.tests.cpp +0 -86
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/ToStringWhich.tests.cpp +0 -193
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/Tricky.tests.cpp +0 -429
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/UsageTests/VariadicMacros.tests.cpp +0 -29
- package/deps/couchbase-cxx-client/third_party/catch2/projects/SelfTest/WarnAboutNoTests.cmake +0 -19
- package/deps/couchbase-cxx-client/third_party/catch2/projects/TestScripts/testRandomOrder.py +0 -59
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/CatchOCTestCase.h +0 -25
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/CatchOCTestCase.mm +0 -87
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/Main.mm +0 -2
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/OCTest.1 +0 -79
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/OCTest.mm +0 -28
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/TestObj.h +0 -28
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest/TestObj.m +0 -25
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest.xcodeproj/project.pbxproj +0 -294
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/OCTest.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/deps/couchbase-cxx-client/third_party/catch2/projects/XCode/OCTest/catch_objc_impl.mm +0 -69
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/approvalTests.py +0 -217
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/approve.py +0 -33
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/benchmarkCompile.py +0 -148
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/benchmarkRunner.py +0 -56
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/developBuild.py +0 -10
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/embed.py +0 -63
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/embedClara.py +0 -27
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/extractFeaturesFromReleaseNotes.py +0 -94
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/fixWhitespace.py +0 -52
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/generateSingleHeader.py +0 -151
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/majorRelease.py +0 -10
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/minorRelease.py +0 -10
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/patchRelease.py +0 -10
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/releaseCommon.py +0 -168
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/releaseNotes.py +0 -65
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/scriptCommon.py +0 -31
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/updateDocumentToC.py +0 -449
- package/deps/couchbase-cxx-client/third_party/catch2/scripts/updateWandbox.py +0 -53
- package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch.hpp +0 -17959
- package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch_reporter_automake.hpp +0 -62
- package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch_reporter_sonarqube.hpp +0 -181
- package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch_reporter_tap.hpp +0 -254
- package/deps/couchbase-cxx-client/third_party/catch2/single_include/catch2/catch_reporter_teamcity.hpp +0 -219
- package/deps/couchbase-cxx-client/third_party/catch2/src/catch_with_main.cpp +0 -2
- package/deps/couchbase-cxx-client/third_party/snappy/.appveyor.yml +0 -36
- package/deps/couchbase-cxx-client/third_party/snappy/.travis.yml +0 -94
- /package/deps/couchbase-cxx-client/third_party/catch2/{artwork → data/artwork}/catch2-c-logo.png +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{artwork → data/artwork}/catch2-hand-logo.png +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{artwork → data/artwork}/catch2-logo-small.png +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{contrib → extras}/ParseAndAddCatchTests.cmake +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{contrib → extras}/gdbinit +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{contrib → extras}/lldbinit +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{projects → tests}/SelfTest/Baselines/automake.std.approved.txt +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{projects → tests}/SelfTest/Misc/invalid-test-names.input +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{projects → tests}/SelfTest/Misc/plain-old-tests.input +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{projects → tests}/SelfTest/Misc/special-characters-in-file.input +0 -0
- /package/deps/couchbase-cxx-client/third_party/catch2/{misc → tools/misc}/CMakeLists.txt +0 -0
@@ -0,0 +1,2775 @@
|
|
1
|
+
// Copyright 2007, Google Inc.
|
2
|
+
// All rights reserved.
|
3
|
+
//
|
4
|
+
// Redistribution and use in source and binary forms, with or without
|
5
|
+
// modification, are permitted provided that the following conditions are
|
6
|
+
// met:
|
7
|
+
//
|
8
|
+
// * Redistributions of source code must retain the above copyright
|
9
|
+
// notice, this list of conditions and the following disclaimer.
|
10
|
+
// * Redistributions in binary form must reproduce the above
|
11
|
+
// copyright notice, this list of conditions and the following disclaimer
|
12
|
+
// in the documentation and/or other materials provided with the
|
13
|
+
// distribution.
|
14
|
+
// * Neither the name of Google Inc. nor the names of its
|
15
|
+
// contributors may be used to endorse or promote products derived from
|
16
|
+
// this software without specific prior written permission.
|
17
|
+
//
|
18
|
+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19
|
+
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
20
|
+
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
21
|
+
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
22
|
+
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
23
|
+
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
24
|
+
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
25
|
+
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
26
|
+
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
27
|
+
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
28
|
+
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
29
|
+
|
30
|
+
|
31
|
+
// Google Mock - a framework for writing C++ mock classes.
|
32
|
+
//
|
33
|
+
// This file tests the spec builder syntax.
|
34
|
+
|
35
|
+
#include "gmock/gmock-spec-builders.h"
|
36
|
+
|
37
|
+
#include <memory>
|
38
|
+
#include <ostream> // NOLINT
|
39
|
+
#include <sstream>
|
40
|
+
#include <string>
|
41
|
+
|
42
|
+
#include "gmock/gmock.h"
|
43
|
+
#include "gmock/internal/gmock-port.h"
|
44
|
+
#include "gtest/gtest.h"
|
45
|
+
#include "gtest/gtest-spi.h"
|
46
|
+
#include "gtest/internal/gtest-port.h"
|
47
|
+
|
48
|
+
namespace testing {
|
49
|
+
namespace internal {
|
50
|
+
|
51
|
+
// Helper class for testing the Expectation class template.
|
52
|
+
class ExpectationTester {
|
53
|
+
public:
|
54
|
+
// Sets the call count of the given expectation to the given number.
|
55
|
+
void SetCallCount(int n, ExpectationBase* exp) {
|
56
|
+
exp->call_count_ = n;
|
57
|
+
}
|
58
|
+
};
|
59
|
+
|
60
|
+
} // namespace internal
|
61
|
+
} // namespace testing
|
62
|
+
|
63
|
+
namespace {
|
64
|
+
|
65
|
+
using testing::_;
|
66
|
+
using testing::AnyNumber;
|
67
|
+
using testing::AtLeast;
|
68
|
+
using testing::AtMost;
|
69
|
+
using testing::Between;
|
70
|
+
using testing::Cardinality;
|
71
|
+
using testing::CardinalityInterface;
|
72
|
+
using testing::Const;
|
73
|
+
using testing::ContainsRegex;
|
74
|
+
using testing::DoAll;
|
75
|
+
using testing::DoDefault;
|
76
|
+
using testing::Eq;
|
77
|
+
using testing::Expectation;
|
78
|
+
using testing::ExpectationSet;
|
79
|
+
using testing::GMOCK_FLAG(verbose);
|
80
|
+
using testing::Gt;
|
81
|
+
using testing::IgnoreResult;
|
82
|
+
using testing::InSequence;
|
83
|
+
using testing::Invoke;
|
84
|
+
using testing::InvokeWithoutArgs;
|
85
|
+
using testing::IsNotSubstring;
|
86
|
+
using testing::IsSubstring;
|
87
|
+
using testing::Lt;
|
88
|
+
using testing::Message;
|
89
|
+
using testing::Mock;
|
90
|
+
using testing::NaggyMock;
|
91
|
+
using testing::Ne;
|
92
|
+
using testing::Return;
|
93
|
+
using testing::SaveArg;
|
94
|
+
using testing::Sequence;
|
95
|
+
using testing::SetArgPointee;
|
96
|
+
using testing::internal::ExpectationTester;
|
97
|
+
using testing::internal::FormatFileLocation;
|
98
|
+
using testing::internal::kAllow;
|
99
|
+
using testing::internal::kErrorVerbosity;
|
100
|
+
using testing::internal::kFail;
|
101
|
+
using testing::internal::kInfoVerbosity;
|
102
|
+
using testing::internal::kWarn;
|
103
|
+
using testing::internal::kWarningVerbosity;
|
104
|
+
|
105
|
+
#if GTEST_HAS_STREAM_REDIRECTION
|
106
|
+
using testing::HasSubstr;
|
107
|
+
using testing::internal::CaptureStdout;
|
108
|
+
using testing::internal::GetCapturedStdout;
|
109
|
+
#endif
|
110
|
+
|
111
|
+
class Incomplete;
|
112
|
+
|
113
|
+
class MockIncomplete {
|
114
|
+
public:
|
115
|
+
// This line verifies that a mock method can take a by-reference
|
116
|
+
// argument of an incomplete type.
|
117
|
+
MOCK_METHOD1(ByRefFunc, void(const Incomplete& x));
|
118
|
+
};
|
119
|
+
|
120
|
+
// Tells Google Mock how to print a value of type Incomplete.
|
121
|
+
void PrintTo(const Incomplete& x, ::std::ostream* os);
|
122
|
+
|
123
|
+
TEST(MockMethodTest, CanInstantiateWithIncompleteArgType) {
|
124
|
+
// Even though this mock class contains a mock method that takes
|
125
|
+
// by-reference an argument whose type is incomplete, we can still
|
126
|
+
// use the mock, as long as Google Mock knows how to print the
|
127
|
+
// argument.
|
128
|
+
MockIncomplete incomplete;
|
129
|
+
EXPECT_CALL(incomplete, ByRefFunc(_))
|
130
|
+
.Times(AnyNumber());
|
131
|
+
}
|
132
|
+
|
133
|
+
// The definition of the printer for the argument type doesn't have to
|
134
|
+
// be visible where the mock is used.
|
135
|
+
void PrintTo(const Incomplete& /* x */, ::std::ostream* os) {
|
136
|
+
*os << "incomplete";
|
137
|
+
}
|
138
|
+
|
139
|
+
class Result {};
|
140
|
+
|
141
|
+
// A type that's not default constructible.
|
142
|
+
class NonDefaultConstructible {
|
143
|
+
public:
|
144
|
+
explicit NonDefaultConstructible(int /* dummy */) {}
|
145
|
+
};
|
146
|
+
|
147
|
+
class MockA {
|
148
|
+
public:
|
149
|
+
MockA() {}
|
150
|
+
|
151
|
+
MOCK_METHOD1(DoA, void(int n));
|
152
|
+
MOCK_METHOD1(ReturnResult, Result(int n));
|
153
|
+
MOCK_METHOD0(ReturnNonDefaultConstructible, NonDefaultConstructible());
|
154
|
+
MOCK_METHOD2(Binary, bool(int x, int y));
|
155
|
+
MOCK_METHOD2(ReturnInt, int(int x, int y));
|
156
|
+
|
157
|
+
private:
|
158
|
+
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockA);
|
159
|
+
};
|
160
|
+
|
161
|
+
class MockB {
|
162
|
+
public:
|
163
|
+
MockB() {}
|
164
|
+
|
165
|
+
MOCK_CONST_METHOD0(DoB, int()); // NOLINT
|
166
|
+
MOCK_METHOD1(DoB, int(int n)); // NOLINT
|
167
|
+
|
168
|
+
private:
|
169
|
+
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockB);
|
170
|
+
};
|
171
|
+
|
172
|
+
class ReferenceHoldingMock {
|
173
|
+
public:
|
174
|
+
ReferenceHoldingMock() {}
|
175
|
+
|
176
|
+
MOCK_METHOD1(AcceptReference, void(std::shared_ptr<MockA>*));
|
177
|
+
|
178
|
+
private:
|
179
|
+
GTEST_DISALLOW_COPY_AND_ASSIGN_(ReferenceHoldingMock);
|
180
|
+
};
|
181
|
+
|
182
|
+
// Tests that EXPECT_CALL and ON_CALL compile in a presence of macro
|
183
|
+
// redefining a mock method name. This could happen, for example, when
|
184
|
+
// the tested code #includes Win32 API headers which define many APIs
|
185
|
+
// as macros, e.g. #define TextOut TextOutW.
|
186
|
+
|
187
|
+
#define Method MethodW
|
188
|
+
|
189
|
+
class CC {
|
190
|
+
public:
|
191
|
+
virtual ~CC() {}
|
192
|
+
virtual int Method() = 0;
|
193
|
+
};
|
194
|
+
class MockCC : public CC {
|
195
|
+
public:
|
196
|
+
MockCC() {}
|
197
|
+
|
198
|
+
MOCK_METHOD0(Method, int());
|
199
|
+
|
200
|
+
private:
|
201
|
+
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockCC);
|
202
|
+
};
|
203
|
+
|
204
|
+
// Tests that a method with expanded name compiles.
|
205
|
+
TEST(OnCallSyntaxTest, CompilesWithMethodNameExpandedFromMacro) {
|
206
|
+
MockCC cc;
|
207
|
+
ON_CALL(cc, Method());
|
208
|
+
}
|
209
|
+
|
210
|
+
// Tests that the method with expanded name not only compiles but runs
|
211
|
+
// and returns a correct value, too.
|
212
|
+
TEST(OnCallSyntaxTest, WorksWithMethodNameExpandedFromMacro) {
|
213
|
+
MockCC cc;
|
214
|
+
ON_CALL(cc, Method()).WillByDefault(Return(42));
|
215
|
+
EXPECT_EQ(42, cc.Method());
|
216
|
+
}
|
217
|
+
|
218
|
+
// Tests that a method with expanded name compiles.
|
219
|
+
TEST(ExpectCallSyntaxTest, CompilesWithMethodNameExpandedFromMacro) {
|
220
|
+
MockCC cc;
|
221
|
+
EXPECT_CALL(cc, Method());
|
222
|
+
cc.Method();
|
223
|
+
}
|
224
|
+
|
225
|
+
// Tests that it works, too.
|
226
|
+
TEST(ExpectCallSyntaxTest, WorksWithMethodNameExpandedFromMacro) {
|
227
|
+
MockCC cc;
|
228
|
+
EXPECT_CALL(cc, Method()).WillOnce(Return(42));
|
229
|
+
EXPECT_EQ(42, cc.Method());
|
230
|
+
}
|
231
|
+
|
232
|
+
#undef Method // Done with macro redefinition tests.
|
233
|
+
|
234
|
+
// Tests that ON_CALL evaluates its arguments exactly once as promised
|
235
|
+
// by Google Mock.
|
236
|
+
TEST(OnCallSyntaxTest, EvaluatesFirstArgumentOnce) {
|
237
|
+
MockA a;
|
238
|
+
MockA* pa = &a;
|
239
|
+
|
240
|
+
ON_CALL(*pa++, DoA(_));
|
241
|
+
EXPECT_EQ(&a + 1, pa);
|
242
|
+
}
|
243
|
+
|
244
|
+
TEST(OnCallSyntaxTest, EvaluatesSecondArgumentOnce) {
|
245
|
+
MockA a;
|
246
|
+
int n = 0;
|
247
|
+
|
248
|
+
ON_CALL(a, DoA(n++));
|
249
|
+
EXPECT_EQ(1, n);
|
250
|
+
}
|
251
|
+
|
252
|
+
// Tests that the syntax of ON_CALL() is enforced at run time.
|
253
|
+
|
254
|
+
TEST(OnCallSyntaxTest, WithIsOptional) {
|
255
|
+
MockA a;
|
256
|
+
|
257
|
+
ON_CALL(a, DoA(5))
|
258
|
+
.WillByDefault(Return());
|
259
|
+
ON_CALL(a, DoA(_))
|
260
|
+
.With(_)
|
261
|
+
.WillByDefault(Return());
|
262
|
+
}
|
263
|
+
|
264
|
+
TEST(OnCallSyntaxTest, WithCanAppearAtMostOnce) {
|
265
|
+
MockA a;
|
266
|
+
|
267
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
268
|
+
ON_CALL(a, ReturnResult(_))
|
269
|
+
.With(_)
|
270
|
+
.With(_)
|
271
|
+
.WillByDefault(Return(Result()));
|
272
|
+
}, ".With() cannot appear more than once in an ON_CALL()");
|
273
|
+
}
|
274
|
+
|
275
|
+
TEST(OnCallSyntaxTest, WillByDefaultIsMandatory) {
|
276
|
+
MockA a;
|
277
|
+
|
278
|
+
EXPECT_DEATH_IF_SUPPORTED({
|
279
|
+
ON_CALL(a, DoA(5));
|
280
|
+
a.DoA(5);
|
281
|
+
}, "");
|
282
|
+
}
|
283
|
+
|
284
|
+
TEST(OnCallSyntaxTest, WillByDefaultCanAppearAtMostOnce) {
|
285
|
+
MockA a;
|
286
|
+
|
287
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
288
|
+
ON_CALL(a, DoA(5))
|
289
|
+
.WillByDefault(Return())
|
290
|
+
.WillByDefault(Return());
|
291
|
+
}, ".WillByDefault() must appear exactly once in an ON_CALL()");
|
292
|
+
}
|
293
|
+
|
294
|
+
// Tests that EXPECT_CALL evaluates its arguments exactly once as
|
295
|
+
// promised by Google Mock.
|
296
|
+
TEST(ExpectCallSyntaxTest, EvaluatesFirstArgumentOnce) {
|
297
|
+
MockA a;
|
298
|
+
MockA* pa = &a;
|
299
|
+
|
300
|
+
EXPECT_CALL(*pa++, DoA(_));
|
301
|
+
a.DoA(0);
|
302
|
+
EXPECT_EQ(&a + 1, pa);
|
303
|
+
}
|
304
|
+
|
305
|
+
TEST(ExpectCallSyntaxTest, EvaluatesSecondArgumentOnce) {
|
306
|
+
MockA a;
|
307
|
+
int n = 0;
|
308
|
+
|
309
|
+
EXPECT_CALL(a, DoA(n++));
|
310
|
+
a.DoA(0);
|
311
|
+
EXPECT_EQ(1, n);
|
312
|
+
}
|
313
|
+
|
314
|
+
// Tests that the syntax of EXPECT_CALL() is enforced at run time.
|
315
|
+
|
316
|
+
TEST(ExpectCallSyntaxTest, WithIsOptional) {
|
317
|
+
MockA a;
|
318
|
+
|
319
|
+
EXPECT_CALL(a, DoA(5))
|
320
|
+
.Times(0);
|
321
|
+
EXPECT_CALL(a, DoA(6))
|
322
|
+
.With(_)
|
323
|
+
.Times(0);
|
324
|
+
}
|
325
|
+
|
326
|
+
TEST(ExpectCallSyntaxTest, WithCanAppearAtMostOnce) {
|
327
|
+
MockA a;
|
328
|
+
|
329
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
330
|
+
EXPECT_CALL(a, DoA(6))
|
331
|
+
.With(_)
|
332
|
+
.With(_);
|
333
|
+
}, ".With() cannot appear more than once in an EXPECT_CALL()");
|
334
|
+
|
335
|
+
a.DoA(6);
|
336
|
+
}
|
337
|
+
|
338
|
+
TEST(ExpectCallSyntaxTest, WithMustBeFirstClause) {
|
339
|
+
MockA a;
|
340
|
+
|
341
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
342
|
+
EXPECT_CALL(a, DoA(1))
|
343
|
+
.Times(1)
|
344
|
+
.With(_);
|
345
|
+
}, ".With() must be the first clause in an EXPECT_CALL()");
|
346
|
+
|
347
|
+
a.DoA(1);
|
348
|
+
|
349
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
350
|
+
EXPECT_CALL(a, DoA(2))
|
351
|
+
.WillOnce(Return())
|
352
|
+
.With(_);
|
353
|
+
}, ".With() must be the first clause in an EXPECT_CALL()");
|
354
|
+
|
355
|
+
a.DoA(2);
|
356
|
+
}
|
357
|
+
|
358
|
+
TEST(ExpectCallSyntaxTest, TimesCanBeInferred) {
|
359
|
+
MockA a;
|
360
|
+
|
361
|
+
EXPECT_CALL(a, DoA(1))
|
362
|
+
.WillOnce(Return());
|
363
|
+
|
364
|
+
EXPECT_CALL(a, DoA(2))
|
365
|
+
.WillOnce(Return())
|
366
|
+
.WillRepeatedly(Return());
|
367
|
+
|
368
|
+
a.DoA(1);
|
369
|
+
a.DoA(2);
|
370
|
+
a.DoA(2);
|
371
|
+
}
|
372
|
+
|
373
|
+
TEST(ExpectCallSyntaxTest, TimesCanAppearAtMostOnce) {
|
374
|
+
MockA a;
|
375
|
+
|
376
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
377
|
+
EXPECT_CALL(a, DoA(1))
|
378
|
+
.Times(1)
|
379
|
+
.Times(2);
|
380
|
+
}, ".Times() cannot appear more than once in an EXPECT_CALL()");
|
381
|
+
|
382
|
+
a.DoA(1);
|
383
|
+
a.DoA(1);
|
384
|
+
}
|
385
|
+
|
386
|
+
TEST(ExpectCallSyntaxTest, TimesMustBeBeforeInSequence) {
|
387
|
+
MockA a;
|
388
|
+
Sequence s;
|
389
|
+
|
390
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
391
|
+
EXPECT_CALL(a, DoA(1))
|
392
|
+
.InSequence(s)
|
393
|
+
.Times(1);
|
394
|
+
}, ".Times() cannot appear after ");
|
395
|
+
|
396
|
+
a.DoA(1);
|
397
|
+
}
|
398
|
+
|
399
|
+
TEST(ExpectCallSyntaxTest, InSequenceIsOptional) {
|
400
|
+
MockA a;
|
401
|
+
Sequence s;
|
402
|
+
|
403
|
+
EXPECT_CALL(a, DoA(1));
|
404
|
+
EXPECT_CALL(a, DoA(2))
|
405
|
+
.InSequence(s);
|
406
|
+
|
407
|
+
a.DoA(1);
|
408
|
+
a.DoA(2);
|
409
|
+
}
|
410
|
+
|
411
|
+
TEST(ExpectCallSyntaxTest, InSequenceCanAppearMultipleTimes) {
|
412
|
+
MockA a;
|
413
|
+
Sequence s1, s2;
|
414
|
+
|
415
|
+
EXPECT_CALL(a, DoA(1))
|
416
|
+
.InSequence(s1, s2)
|
417
|
+
.InSequence(s1);
|
418
|
+
|
419
|
+
a.DoA(1);
|
420
|
+
}
|
421
|
+
|
422
|
+
TEST(ExpectCallSyntaxTest, InSequenceMustBeBeforeAfter) {
|
423
|
+
MockA a;
|
424
|
+
Sequence s;
|
425
|
+
|
426
|
+
Expectation e = EXPECT_CALL(a, DoA(1))
|
427
|
+
.Times(AnyNumber());
|
428
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
429
|
+
EXPECT_CALL(a, DoA(2))
|
430
|
+
.After(e)
|
431
|
+
.InSequence(s);
|
432
|
+
}, ".InSequence() cannot appear after ");
|
433
|
+
|
434
|
+
a.DoA(2);
|
435
|
+
}
|
436
|
+
|
437
|
+
TEST(ExpectCallSyntaxTest, InSequenceMustBeBeforeWillOnce) {
|
438
|
+
MockA a;
|
439
|
+
Sequence s;
|
440
|
+
|
441
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
442
|
+
EXPECT_CALL(a, DoA(1))
|
443
|
+
.WillOnce(Return())
|
444
|
+
.InSequence(s);
|
445
|
+
}, ".InSequence() cannot appear after ");
|
446
|
+
|
447
|
+
a.DoA(1);
|
448
|
+
}
|
449
|
+
|
450
|
+
TEST(ExpectCallSyntaxTest, AfterMustBeBeforeWillOnce) {
|
451
|
+
MockA a;
|
452
|
+
|
453
|
+
Expectation e = EXPECT_CALL(a, DoA(1));
|
454
|
+
EXPECT_NONFATAL_FAILURE({
|
455
|
+
EXPECT_CALL(a, DoA(2))
|
456
|
+
.WillOnce(Return())
|
457
|
+
.After(e);
|
458
|
+
}, ".After() cannot appear after ");
|
459
|
+
|
460
|
+
a.DoA(1);
|
461
|
+
a.DoA(2);
|
462
|
+
}
|
463
|
+
|
464
|
+
TEST(ExpectCallSyntaxTest, WillIsOptional) {
|
465
|
+
MockA a;
|
466
|
+
|
467
|
+
EXPECT_CALL(a, DoA(1));
|
468
|
+
EXPECT_CALL(a, DoA(2))
|
469
|
+
.WillOnce(Return());
|
470
|
+
|
471
|
+
a.DoA(1);
|
472
|
+
a.DoA(2);
|
473
|
+
}
|
474
|
+
|
475
|
+
TEST(ExpectCallSyntaxTest, WillCanAppearMultipleTimes) {
|
476
|
+
MockA a;
|
477
|
+
|
478
|
+
EXPECT_CALL(a, DoA(1))
|
479
|
+
.Times(AnyNumber())
|
480
|
+
.WillOnce(Return())
|
481
|
+
.WillOnce(Return())
|
482
|
+
.WillOnce(Return());
|
483
|
+
}
|
484
|
+
|
485
|
+
TEST(ExpectCallSyntaxTest, WillMustBeBeforeWillRepeatedly) {
|
486
|
+
MockA a;
|
487
|
+
|
488
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
489
|
+
EXPECT_CALL(a, DoA(1))
|
490
|
+
.WillRepeatedly(Return())
|
491
|
+
.WillOnce(Return());
|
492
|
+
}, ".WillOnce() cannot appear after ");
|
493
|
+
|
494
|
+
a.DoA(1);
|
495
|
+
}
|
496
|
+
|
497
|
+
TEST(ExpectCallSyntaxTest, WillRepeatedlyIsOptional) {
|
498
|
+
MockA a;
|
499
|
+
|
500
|
+
EXPECT_CALL(a, DoA(1))
|
501
|
+
.WillOnce(Return());
|
502
|
+
EXPECT_CALL(a, DoA(2))
|
503
|
+
.WillOnce(Return())
|
504
|
+
.WillRepeatedly(Return());
|
505
|
+
|
506
|
+
a.DoA(1);
|
507
|
+
a.DoA(2);
|
508
|
+
a.DoA(2);
|
509
|
+
}
|
510
|
+
|
511
|
+
TEST(ExpectCallSyntaxTest, WillRepeatedlyCannotAppearMultipleTimes) {
|
512
|
+
MockA a;
|
513
|
+
|
514
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
515
|
+
EXPECT_CALL(a, DoA(1))
|
516
|
+
.WillRepeatedly(Return())
|
517
|
+
.WillRepeatedly(Return());
|
518
|
+
}, ".WillRepeatedly() cannot appear more than once in an "
|
519
|
+
"EXPECT_CALL()");
|
520
|
+
}
|
521
|
+
|
522
|
+
TEST(ExpectCallSyntaxTest, WillRepeatedlyMustBeBeforeRetiresOnSaturation) {
|
523
|
+
MockA a;
|
524
|
+
|
525
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
526
|
+
EXPECT_CALL(a, DoA(1))
|
527
|
+
.RetiresOnSaturation()
|
528
|
+
.WillRepeatedly(Return());
|
529
|
+
}, ".WillRepeatedly() cannot appear after ");
|
530
|
+
}
|
531
|
+
|
532
|
+
TEST(ExpectCallSyntaxTest, RetiresOnSaturationIsOptional) {
|
533
|
+
MockA a;
|
534
|
+
|
535
|
+
EXPECT_CALL(a, DoA(1));
|
536
|
+
EXPECT_CALL(a, DoA(1))
|
537
|
+
.RetiresOnSaturation();
|
538
|
+
|
539
|
+
a.DoA(1);
|
540
|
+
a.DoA(1);
|
541
|
+
}
|
542
|
+
|
543
|
+
TEST(ExpectCallSyntaxTest, RetiresOnSaturationCannotAppearMultipleTimes) {
|
544
|
+
MockA a;
|
545
|
+
|
546
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
547
|
+
EXPECT_CALL(a, DoA(1))
|
548
|
+
.RetiresOnSaturation()
|
549
|
+
.RetiresOnSaturation();
|
550
|
+
}, ".RetiresOnSaturation() cannot appear more than once");
|
551
|
+
|
552
|
+
a.DoA(1);
|
553
|
+
}
|
554
|
+
|
555
|
+
TEST(ExpectCallSyntaxTest, DefaultCardinalityIsOnce) {
|
556
|
+
{
|
557
|
+
MockA a;
|
558
|
+
EXPECT_CALL(a, DoA(1));
|
559
|
+
a.DoA(1);
|
560
|
+
}
|
561
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
562
|
+
MockA a;
|
563
|
+
EXPECT_CALL(a, DoA(1));
|
564
|
+
}, "to be called once");
|
565
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
566
|
+
MockA a;
|
567
|
+
EXPECT_CALL(a, DoA(1));
|
568
|
+
a.DoA(1);
|
569
|
+
a.DoA(1);
|
570
|
+
}, "to be called once");
|
571
|
+
}
|
572
|
+
|
573
|
+
#if GTEST_HAS_STREAM_REDIRECTION
|
574
|
+
|
575
|
+
// Tests that Google Mock doesn't print a warning when the number of
|
576
|
+
// WillOnce() is adequate.
|
577
|
+
TEST(ExpectCallSyntaxTest, DoesNotWarnOnAdequateActionCount) {
|
578
|
+
CaptureStdout();
|
579
|
+
{
|
580
|
+
MockB b;
|
581
|
+
|
582
|
+
// It's always fine to omit WillOnce() entirely.
|
583
|
+
EXPECT_CALL(b, DoB())
|
584
|
+
.Times(0);
|
585
|
+
EXPECT_CALL(b, DoB(1))
|
586
|
+
.Times(AtMost(1));
|
587
|
+
EXPECT_CALL(b, DoB(2))
|
588
|
+
.Times(1)
|
589
|
+
.WillRepeatedly(Return(1));
|
590
|
+
|
591
|
+
// It's fine for the number of WillOnce()s to equal the upper bound.
|
592
|
+
EXPECT_CALL(b, DoB(3))
|
593
|
+
.Times(Between(1, 2))
|
594
|
+
.WillOnce(Return(1))
|
595
|
+
.WillOnce(Return(2));
|
596
|
+
|
597
|
+
// It's fine for the number of WillOnce()s to be smaller than the
|
598
|
+
// upper bound when there is a WillRepeatedly().
|
599
|
+
EXPECT_CALL(b, DoB(4))
|
600
|
+
.Times(AtMost(3))
|
601
|
+
.WillOnce(Return(1))
|
602
|
+
.WillRepeatedly(Return(2));
|
603
|
+
|
604
|
+
// Satisfies the above expectations.
|
605
|
+
b.DoB(2);
|
606
|
+
b.DoB(3);
|
607
|
+
}
|
608
|
+
EXPECT_STREQ("", GetCapturedStdout().c_str());
|
609
|
+
}
|
610
|
+
|
611
|
+
// Tests that Google Mock warns on having too many actions in an
|
612
|
+
// expectation compared to its cardinality.
|
613
|
+
TEST(ExpectCallSyntaxTest, WarnsOnTooManyActions) {
|
614
|
+
CaptureStdout();
|
615
|
+
{
|
616
|
+
MockB b;
|
617
|
+
|
618
|
+
// Warns when the number of WillOnce()s is larger than the upper bound.
|
619
|
+
EXPECT_CALL(b, DoB())
|
620
|
+
.Times(0)
|
621
|
+
.WillOnce(Return(1)); // #1
|
622
|
+
EXPECT_CALL(b, DoB())
|
623
|
+
.Times(AtMost(1))
|
624
|
+
.WillOnce(Return(1))
|
625
|
+
.WillOnce(Return(2)); // #2
|
626
|
+
EXPECT_CALL(b, DoB(1))
|
627
|
+
.Times(1)
|
628
|
+
.WillOnce(Return(1))
|
629
|
+
.WillOnce(Return(2))
|
630
|
+
.RetiresOnSaturation(); // #3
|
631
|
+
|
632
|
+
// Warns when the number of WillOnce()s equals the upper bound and
|
633
|
+
// there is a WillRepeatedly().
|
634
|
+
EXPECT_CALL(b, DoB())
|
635
|
+
.Times(0)
|
636
|
+
.WillRepeatedly(Return(1)); // #4
|
637
|
+
EXPECT_CALL(b, DoB(2))
|
638
|
+
.Times(1)
|
639
|
+
.WillOnce(Return(1))
|
640
|
+
.WillRepeatedly(Return(2)); // #5
|
641
|
+
|
642
|
+
// Satisfies the above expectations.
|
643
|
+
b.DoB(1);
|
644
|
+
b.DoB(2);
|
645
|
+
}
|
646
|
+
const std::string output = GetCapturedStdout();
|
647
|
+
EXPECT_PRED_FORMAT2(
|
648
|
+
IsSubstring,
|
649
|
+
"Too many actions specified in EXPECT_CALL(b, DoB())...\n"
|
650
|
+
"Expected to be never called, but has 1 WillOnce().",
|
651
|
+
output); // #1
|
652
|
+
EXPECT_PRED_FORMAT2(
|
653
|
+
IsSubstring,
|
654
|
+
"Too many actions specified in EXPECT_CALL(b, DoB())...\n"
|
655
|
+
"Expected to be called at most once, "
|
656
|
+
"but has 2 WillOnce()s.",
|
657
|
+
output); // #2
|
658
|
+
EXPECT_PRED_FORMAT2(
|
659
|
+
IsSubstring,
|
660
|
+
"Too many actions specified in EXPECT_CALL(b, DoB(1))...\n"
|
661
|
+
"Expected to be called once, but has 2 WillOnce()s.",
|
662
|
+
output); // #3
|
663
|
+
EXPECT_PRED_FORMAT2(
|
664
|
+
IsSubstring,
|
665
|
+
"Too many actions specified in EXPECT_CALL(b, DoB())...\n"
|
666
|
+
"Expected to be never called, but has 0 WillOnce()s "
|
667
|
+
"and a WillRepeatedly().",
|
668
|
+
output); // #4
|
669
|
+
EXPECT_PRED_FORMAT2(
|
670
|
+
IsSubstring,
|
671
|
+
"Too many actions specified in EXPECT_CALL(b, DoB(2))...\n"
|
672
|
+
"Expected to be called once, but has 1 WillOnce() "
|
673
|
+
"and a WillRepeatedly().",
|
674
|
+
output); // #5
|
675
|
+
}
|
676
|
+
|
677
|
+
// Tests that Google Mock warns on having too few actions in an
|
678
|
+
// expectation compared to its cardinality.
|
679
|
+
TEST(ExpectCallSyntaxTest, WarnsOnTooFewActions) {
|
680
|
+
MockB b;
|
681
|
+
|
682
|
+
EXPECT_CALL(b, DoB())
|
683
|
+
.Times(Between(2, 3))
|
684
|
+
.WillOnce(Return(1));
|
685
|
+
|
686
|
+
CaptureStdout();
|
687
|
+
b.DoB();
|
688
|
+
const std::string output = GetCapturedStdout();
|
689
|
+
EXPECT_PRED_FORMAT2(
|
690
|
+
IsSubstring,
|
691
|
+
"Too few actions specified in EXPECT_CALL(b, DoB())...\n"
|
692
|
+
"Expected to be called between 2 and 3 times, "
|
693
|
+
"but has only 1 WillOnce().",
|
694
|
+
output);
|
695
|
+
b.DoB();
|
696
|
+
}
|
697
|
+
|
698
|
+
TEST(ExpectCallSyntaxTest, WarningIsErrorWithFlag) {
|
699
|
+
int original_behavior = testing::GMOCK_FLAG(default_mock_behavior);
|
700
|
+
|
701
|
+
testing::GMOCK_FLAG(default_mock_behavior) = kAllow;
|
702
|
+
CaptureStdout();
|
703
|
+
{
|
704
|
+
MockA a;
|
705
|
+
a.DoA(0);
|
706
|
+
}
|
707
|
+
std::string output = GetCapturedStdout();
|
708
|
+
EXPECT_TRUE(output.empty()) << output;
|
709
|
+
|
710
|
+
testing::GMOCK_FLAG(default_mock_behavior) = kWarn;
|
711
|
+
CaptureStdout();
|
712
|
+
{
|
713
|
+
MockA a;
|
714
|
+
a.DoA(0);
|
715
|
+
}
|
716
|
+
std::string warning_output = GetCapturedStdout();
|
717
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output);
|
718
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call",
|
719
|
+
warning_output);
|
720
|
+
|
721
|
+
testing::GMOCK_FLAG(default_mock_behavior) = kFail;
|
722
|
+
EXPECT_NONFATAL_FAILURE({
|
723
|
+
MockA a;
|
724
|
+
a.DoA(0);
|
725
|
+
}, "Uninteresting mock function call");
|
726
|
+
|
727
|
+
// Out of bounds values are converted to kWarn
|
728
|
+
testing::GMOCK_FLAG(default_mock_behavior) = -1;
|
729
|
+
CaptureStdout();
|
730
|
+
{
|
731
|
+
MockA a;
|
732
|
+
a.DoA(0);
|
733
|
+
}
|
734
|
+
warning_output = GetCapturedStdout();
|
735
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output);
|
736
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call",
|
737
|
+
warning_output);
|
738
|
+
testing::GMOCK_FLAG(default_mock_behavior) = 3;
|
739
|
+
CaptureStdout();
|
740
|
+
{
|
741
|
+
MockA a;
|
742
|
+
a.DoA(0);
|
743
|
+
}
|
744
|
+
warning_output = GetCapturedStdout();
|
745
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", warning_output);
|
746
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "Uninteresting mock function call",
|
747
|
+
warning_output);
|
748
|
+
|
749
|
+
testing::GMOCK_FLAG(default_mock_behavior) = original_behavior;
|
750
|
+
}
|
751
|
+
|
752
|
+
#endif // GTEST_HAS_STREAM_REDIRECTION
|
753
|
+
|
754
|
+
// Tests the semantics of ON_CALL().
|
755
|
+
|
756
|
+
// Tests that the built-in default action is taken when no ON_CALL()
|
757
|
+
// is specified.
|
758
|
+
TEST(OnCallTest, TakesBuiltInDefaultActionWhenNoOnCall) {
|
759
|
+
MockB b;
|
760
|
+
EXPECT_CALL(b, DoB());
|
761
|
+
|
762
|
+
EXPECT_EQ(0, b.DoB());
|
763
|
+
}
|
764
|
+
|
765
|
+
// Tests that the built-in default action is taken when no ON_CALL()
|
766
|
+
// matches the invocation.
|
767
|
+
TEST(OnCallTest, TakesBuiltInDefaultActionWhenNoOnCallMatches) {
|
768
|
+
MockB b;
|
769
|
+
ON_CALL(b, DoB(1))
|
770
|
+
.WillByDefault(Return(1));
|
771
|
+
EXPECT_CALL(b, DoB(_));
|
772
|
+
|
773
|
+
EXPECT_EQ(0, b.DoB(2));
|
774
|
+
}
|
775
|
+
|
776
|
+
// Tests that the last matching ON_CALL() action is taken.
|
777
|
+
TEST(OnCallTest, PicksLastMatchingOnCall) {
|
778
|
+
MockB b;
|
779
|
+
ON_CALL(b, DoB(_))
|
780
|
+
.WillByDefault(Return(3));
|
781
|
+
ON_CALL(b, DoB(2))
|
782
|
+
.WillByDefault(Return(2));
|
783
|
+
ON_CALL(b, DoB(1))
|
784
|
+
.WillByDefault(Return(1));
|
785
|
+
EXPECT_CALL(b, DoB(_));
|
786
|
+
|
787
|
+
EXPECT_EQ(2, b.DoB(2));
|
788
|
+
}
|
789
|
+
|
790
|
+
// Tests the semantics of EXPECT_CALL().
|
791
|
+
|
792
|
+
// Tests that any call is allowed when no EXPECT_CALL() is specified.
|
793
|
+
TEST(ExpectCallTest, AllowsAnyCallWhenNoSpec) {
|
794
|
+
MockB b;
|
795
|
+
EXPECT_CALL(b, DoB());
|
796
|
+
// There is no expectation on DoB(int).
|
797
|
+
|
798
|
+
b.DoB();
|
799
|
+
|
800
|
+
// DoB(int) can be called any number of times.
|
801
|
+
b.DoB(1);
|
802
|
+
b.DoB(2);
|
803
|
+
}
|
804
|
+
|
805
|
+
// Tests that the last matching EXPECT_CALL() fires.
|
806
|
+
TEST(ExpectCallTest, PicksLastMatchingExpectCall) {
|
807
|
+
MockB b;
|
808
|
+
EXPECT_CALL(b, DoB(_))
|
809
|
+
.WillRepeatedly(Return(2));
|
810
|
+
EXPECT_CALL(b, DoB(1))
|
811
|
+
.WillRepeatedly(Return(1));
|
812
|
+
|
813
|
+
EXPECT_EQ(1, b.DoB(1));
|
814
|
+
}
|
815
|
+
|
816
|
+
// Tests lower-bound violation.
|
817
|
+
TEST(ExpectCallTest, CatchesTooFewCalls) {
|
818
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
819
|
+
MockB b;
|
820
|
+
EXPECT_CALL(b, DoB(5))
|
821
|
+
.Times(AtLeast(2));
|
822
|
+
|
823
|
+
b.DoB(5);
|
824
|
+
}, "Actual function call count doesn't match EXPECT_CALL(b, DoB(5))...\n"
|
825
|
+
" Expected: to be called at least twice\n"
|
826
|
+
" Actual: called once - unsatisfied and active");
|
827
|
+
}
|
828
|
+
|
829
|
+
// Tests that the cardinality can be inferred when no Times(...) is
|
830
|
+
// specified.
|
831
|
+
TEST(ExpectCallTest, InfersCardinalityWhenThereIsNoWillRepeatedly) {
|
832
|
+
{
|
833
|
+
MockB b;
|
834
|
+
EXPECT_CALL(b, DoB())
|
835
|
+
.WillOnce(Return(1))
|
836
|
+
.WillOnce(Return(2));
|
837
|
+
|
838
|
+
EXPECT_EQ(1, b.DoB());
|
839
|
+
EXPECT_EQ(2, b.DoB());
|
840
|
+
}
|
841
|
+
|
842
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
843
|
+
MockB b;
|
844
|
+
EXPECT_CALL(b, DoB())
|
845
|
+
.WillOnce(Return(1))
|
846
|
+
.WillOnce(Return(2));
|
847
|
+
|
848
|
+
EXPECT_EQ(1, b.DoB());
|
849
|
+
}, "to be called twice");
|
850
|
+
|
851
|
+
{ // NOLINT
|
852
|
+
MockB b;
|
853
|
+
EXPECT_CALL(b, DoB())
|
854
|
+
.WillOnce(Return(1))
|
855
|
+
.WillOnce(Return(2));
|
856
|
+
|
857
|
+
EXPECT_EQ(1, b.DoB());
|
858
|
+
EXPECT_EQ(2, b.DoB());
|
859
|
+
EXPECT_NONFATAL_FAILURE(b.DoB(), "to be called twice");
|
860
|
+
}
|
861
|
+
}
|
862
|
+
|
863
|
+
TEST(ExpectCallTest, InfersCardinality1WhenThereIsWillRepeatedly) {
|
864
|
+
{
|
865
|
+
MockB b;
|
866
|
+
EXPECT_CALL(b, DoB())
|
867
|
+
.WillOnce(Return(1))
|
868
|
+
.WillRepeatedly(Return(2));
|
869
|
+
|
870
|
+
EXPECT_EQ(1, b.DoB());
|
871
|
+
}
|
872
|
+
|
873
|
+
{ // NOLINT
|
874
|
+
MockB b;
|
875
|
+
EXPECT_CALL(b, DoB())
|
876
|
+
.WillOnce(Return(1))
|
877
|
+
.WillRepeatedly(Return(2));
|
878
|
+
|
879
|
+
EXPECT_EQ(1, b.DoB());
|
880
|
+
EXPECT_EQ(2, b.DoB());
|
881
|
+
EXPECT_EQ(2, b.DoB());
|
882
|
+
}
|
883
|
+
|
884
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
885
|
+
MockB b;
|
886
|
+
EXPECT_CALL(b, DoB())
|
887
|
+
.WillOnce(Return(1))
|
888
|
+
.WillRepeatedly(Return(2));
|
889
|
+
}, "to be called at least once");
|
890
|
+
}
|
891
|
+
|
892
|
+
// Tests that the n-th action is taken for the n-th matching
|
893
|
+
// invocation.
|
894
|
+
TEST(ExpectCallTest, NthMatchTakesNthAction) {
|
895
|
+
MockB b;
|
896
|
+
EXPECT_CALL(b, DoB())
|
897
|
+
.WillOnce(Return(1))
|
898
|
+
.WillOnce(Return(2))
|
899
|
+
.WillOnce(Return(3));
|
900
|
+
|
901
|
+
EXPECT_EQ(1, b.DoB());
|
902
|
+
EXPECT_EQ(2, b.DoB());
|
903
|
+
EXPECT_EQ(3, b.DoB());
|
904
|
+
}
|
905
|
+
|
906
|
+
// Tests that the WillRepeatedly() action is taken when the WillOnce(...)
|
907
|
+
// list is exhausted.
|
908
|
+
TEST(ExpectCallTest, TakesRepeatedActionWhenWillListIsExhausted) {
|
909
|
+
MockB b;
|
910
|
+
EXPECT_CALL(b, DoB())
|
911
|
+
.WillOnce(Return(1))
|
912
|
+
.WillRepeatedly(Return(2));
|
913
|
+
|
914
|
+
EXPECT_EQ(1, b.DoB());
|
915
|
+
EXPECT_EQ(2, b.DoB());
|
916
|
+
EXPECT_EQ(2, b.DoB());
|
917
|
+
}
|
918
|
+
|
919
|
+
#if GTEST_HAS_STREAM_REDIRECTION
|
920
|
+
|
921
|
+
// Tests that the default action is taken when the WillOnce(...) list is
|
922
|
+
// exhausted and there is no WillRepeatedly().
|
923
|
+
TEST(ExpectCallTest, TakesDefaultActionWhenWillListIsExhausted) {
|
924
|
+
MockB b;
|
925
|
+
EXPECT_CALL(b, DoB(_))
|
926
|
+
.Times(1);
|
927
|
+
EXPECT_CALL(b, DoB())
|
928
|
+
.Times(AnyNumber())
|
929
|
+
.WillOnce(Return(1))
|
930
|
+
.WillOnce(Return(2));
|
931
|
+
|
932
|
+
CaptureStdout();
|
933
|
+
EXPECT_EQ(0, b.DoB(1)); // Shouldn't generate a warning as the
|
934
|
+
// expectation has no action clause at all.
|
935
|
+
EXPECT_EQ(1, b.DoB());
|
936
|
+
EXPECT_EQ(2, b.DoB());
|
937
|
+
const std::string output1 = GetCapturedStdout();
|
938
|
+
EXPECT_STREQ("", output1.c_str());
|
939
|
+
|
940
|
+
CaptureStdout();
|
941
|
+
EXPECT_EQ(0, b.DoB());
|
942
|
+
EXPECT_EQ(0, b.DoB());
|
943
|
+
const std::string output2 = GetCapturedStdout();
|
944
|
+
EXPECT_THAT(output2.c_str(),
|
945
|
+
HasSubstr("Actions ran out in EXPECT_CALL(b, DoB())...\n"
|
946
|
+
"Called 3 times, but only 2 WillOnce()s are specified"
|
947
|
+
" - returning default value."));
|
948
|
+
EXPECT_THAT(output2.c_str(),
|
949
|
+
HasSubstr("Actions ran out in EXPECT_CALL(b, DoB())...\n"
|
950
|
+
"Called 4 times, but only 2 WillOnce()s are specified"
|
951
|
+
" - returning default value."));
|
952
|
+
}
|
953
|
+
|
954
|
+
TEST(FunctionMockerMessageTest, ReportsExpectCallLocationForExhausedActions) {
|
955
|
+
MockB b;
|
956
|
+
std::string expect_call_location = FormatFileLocation(__FILE__, __LINE__ + 1);
|
957
|
+
EXPECT_CALL(b, DoB()).Times(AnyNumber()).WillOnce(Return(1));
|
958
|
+
|
959
|
+
EXPECT_EQ(1, b.DoB());
|
960
|
+
|
961
|
+
CaptureStdout();
|
962
|
+
EXPECT_EQ(0, b.DoB());
|
963
|
+
const std::string output = GetCapturedStdout();
|
964
|
+
// The warning message should contain the call location.
|
965
|
+
EXPECT_PRED_FORMAT2(IsSubstring, expect_call_location, output);
|
966
|
+
}
|
967
|
+
|
968
|
+
TEST(FunctionMockerMessageTest,
|
969
|
+
ReportsDefaultActionLocationOfUninterestingCallsForNaggyMock) {
|
970
|
+
std::string on_call_location;
|
971
|
+
CaptureStdout();
|
972
|
+
{
|
973
|
+
NaggyMock<MockB> b;
|
974
|
+
on_call_location = FormatFileLocation(__FILE__, __LINE__ + 1);
|
975
|
+
ON_CALL(b, DoB(_)).WillByDefault(Return(0));
|
976
|
+
b.DoB(0);
|
977
|
+
}
|
978
|
+
EXPECT_PRED_FORMAT2(IsSubstring, on_call_location, GetCapturedStdout());
|
979
|
+
}
|
980
|
+
|
981
|
+
#endif // GTEST_HAS_STREAM_REDIRECTION
|
982
|
+
|
983
|
+
// Tests that an uninteresting call performs the default action.
|
984
|
+
TEST(UninterestingCallTest, DoesDefaultAction) {
|
985
|
+
// When there is an ON_CALL() statement, the action specified by it
|
986
|
+
// should be taken.
|
987
|
+
MockA a;
|
988
|
+
ON_CALL(a, Binary(_, _))
|
989
|
+
.WillByDefault(Return(true));
|
990
|
+
EXPECT_TRUE(a.Binary(1, 2));
|
991
|
+
|
992
|
+
// When there is no ON_CALL(), the default value for the return type
|
993
|
+
// should be returned.
|
994
|
+
MockB b;
|
995
|
+
EXPECT_EQ(0, b.DoB());
|
996
|
+
}
|
997
|
+
|
998
|
+
// Tests that an unexpected call performs the default action.
|
999
|
+
TEST(UnexpectedCallTest, DoesDefaultAction) {
|
1000
|
+
// When there is an ON_CALL() statement, the action specified by it
|
1001
|
+
// should be taken.
|
1002
|
+
MockA a;
|
1003
|
+
ON_CALL(a, Binary(_, _))
|
1004
|
+
.WillByDefault(Return(true));
|
1005
|
+
EXPECT_CALL(a, Binary(0, 0));
|
1006
|
+
a.Binary(0, 0);
|
1007
|
+
bool result = false;
|
1008
|
+
EXPECT_NONFATAL_FAILURE(result = a.Binary(1, 2),
|
1009
|
+
"Unexpected mock function call");
|
1010
|
+
EXPECT_TRUE(result);
|
1011
|
+
|
1012
|
+
// When there is no ON_CALL(), the default value for the return type
|
1013
|
+
// should be returned.
|
1014
|
+
MockB b;
|
1015
|
+
EXPECT_CALL(b, DoB(0))
|
1016
|
+
.Times(0);
|
1017
|
+
int n = -1;
|
1018
|
+
EXPECT_NONFATAL_FAILURE(n = b.DoB(1),
|
1019
|
+
"Unexpected mock function call");
|
1020
|
+
EXPECT_EQ(0, n);
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
// Tests that when an unexpected void function generates the right
|
1024
|
+
// failure message.
|
1025
|
+
TEST(UnexpectedCallTest, GeneratesFailureForVoidFunction) {
|
1026
|
+
// First, tests the message when there is only one EXPECT_CALL().
|
1027
|
+
MockA a1;
|
1028
|
+
EXPECT_CALL(a1, DoA(1));
|
1029
|
+
a1.DoA(1);
|
1030
|
+
// Ideally we should match the failure message against a regex, but
|
1031
|
+
// EXPECT_NONFATAL_FAILURE doesn't support that, so we test for
|
1032
|
+
// multiple sub-strings instead.
|
1033
|
+
EXPECT_NONFATAL_FAILURE(
|
1034
|
+
a1.DoA(9),
|
1035
|
+
"Unexpected mock function call - returning directly.\n"
|
1036
|
+
" Function call: DoA(9)\n"
|
1037
|
+
"Google Mock tried the following 1 expectation, but it didn't match:");
|
1038
|
+
EXPECT_NONFATAL_FAILURE(
|
1039
|
+
a1.DoA(9),
|
1040
|
+
" Expected arg #0: is equal to 1\n"
|
1041
|
+
" Actual: 9\n"
|
1042
|
+
" Expected: to be called once\n"
|
1043
|
+
" Actual: called once - saturated and active");
|
1044
|
+
|
1045
|
+
// Next, tests the message when there are more than one EXPECT_CALL().
|
1046
|
+
MockA a2;
|
1047
|
+
EXPECT_CALL(a2, DoA(1));
|
1048
|
+
EXPECT_CALL(a2, DoA(3));
|
1049
|
+
a2.DoA(1);
|
1050
|
+
EXPECT_NONFATAL_FAILURE(
|
1051
|
+
a2.DoA(2),
|
1052
|
+
"Unexpected mock function call - returning directly.\n"
|
1053
|
+
" Function call: DoA(2)\n"
|
1054
|
+
"Google Mock tried the following 2 expectations, but none matched:");
|
1055
|
+
EXPECT_NONFATAL_FAILURE(
|
1056
|
+
a2.DoA(2),
|
1057
|
+
"tried expectation #0: EXPECT_CALL(a2, DoA(1))...\n"
|
1058
|
+
" Expected arg #0: is equal to 1\n"
|
1059
|
+
" Actual: 2\n"
|
1060
|
+
" Expected: to be called once\n"
|
1061
|
+
" Actual: called once - saturated and active");
|
1062
|
+
EXPECT_NONFATAL_FAILURE(
|
1063
|
+
a2.DoA(2),
|
1064
|
+
"tried expectation #1: EXPECT_CALL(a2, DoA(3))...\n"
|
1065
|
+
" Expected arg #0: is equal to 3\n"
|
1066
|
+
" Actual: 2\n"
|
1067
|
+
" Expected: to be called once\n"
|
1068
|
+
" Actual: never called - unsatisfied and active");
|
1069
|
+
a2.DoA(3);
|
1070
|
+
}
|
1071
|
+
|
1072
|
+
// Tests that an unexpected non-void function generates the right
|
1073
|
+
// failure message.
|
1074
|
+
TEST(UnexpectedCallTest, GeneartesFailureForNonVoidFunction) {
|
1075
|
+
MockB b1;
|
1076
|
+
EXPECT_CALL(b1, DoB(1));
|
1077
|
+
b1.DoB(1);
|
1078
|
+
EXPECT_NONFATAL_FAILURE(
|
1079
|
+
b1.DoB(2),
|
1080
|
+
"Unexpected mock function call - returning default value.\n"
|
1081
|
+
" Function call: DoB(2)\n"
|
1082
|
+
" Returns: 0\n"
|
1083
|
+
"Google Mock tried the following 1 expectation, but it didn't match:");
|
1084
|
+
EXPECT_NONFATAL_FAILURE(
|
1085
|
+
b1.DoB(2),
|
1086
|
+
" Expected arg #0: is equal to 1\n"
|
1087
|
+
" Actual: 2\n"
|
1088
|
+
" Expected: to be called once\n"
|
1089
|
+
" Actual: called once - saturated and active");
|
1090
|
+
}
|
1091
|
+
|
1092
|
+
// Tests that Google Mock explains that an retired expectation doesn't
|
1093
|
+
// match the call.
|
1094
|
+
TEST(UnexpectedCallTest, RetiredExpectation) {
|
1095
|
+
MockB b;
|
1096
|
+
EXPECT_CALL(b, DoB(1))
|
1097
|
+
.RetiresOnSaturation();
|
1098
|
+
|
1099
|
+
b.DoB(1);
|
1100
|
+
EXPECT_NONFATAL_FAILURE(
|
1101
|
+
b.DoB(1),
|
1102
|
+
" Expected: the expectation is active\n"
|
1103
|
+
" Actual: it is retired");
|
1104
|
+
}
|
1105
|
+
|
1106
|
+
// Tests that Google Mock explains that an expectation that doesn't
|
1107
|
+
// match the arguments doesn't match the call.
|
1108
|
+
TEST(UnexpectedCallTest, UnmatchedArguments) {
|
1109
|
+
MockB b;
|
1110
|
+
EXPECT_CALL(b, DoB(1));
|
1111
|
+
|
1112
|
+
EXPECT_NONFATAL_FAILURE(
|
1113
|
+
b.DoB(2),
|
1114
|
+
" Expected arg #0: is equal to 1\n"
|
1115
|
+
" Actual: 2\n");
|
1116
|
+
b.DoB(1);
|
1117
|
+
}
|
1118
|
+
|
1119
|
+
// Tests that Google Mock explains that an expectation with
|
1120
|
+
// unsatisfied pre-requisites doesn't match the call.
|
1121
|
+
TEST(UnexpectedCallTest, UnsatisifiedPrerequisites) {
|
1122
|
+
Sequence s1, s2;
|
1123
|
+
MockB b;
|
1124
|
+
EXPECT_CALL(b, DoB(1))
|
1125
|
+
.InSequence(s1);
|
1126
|
+
EXPECT_CALL(b, DoB(2))
|
1127
|
+
.Times(AnyNumber())
|
1128
|
+
.InSequence(s1);
|
1129
|
+
EXPECT_CALL(b, DoB(3))
|
1130
|
+
.InSequence(s2);
|
1131
|
+
EXPECT_CALL(b, DoB(4))
|
1132
|
+
.InSequence(s1, s2);
|
1133
|
+
|
1134
|
+
::testing::TestPartResultArray failures;
|
1135
|
+
{
|
1136
|
+
::testing::ScopedFakeTestPartResultReporter reporter(&failures);
|
1137
|
+
b.DoB(4);
|
1138
|
+
// Now 'failures' contains the Google Test failures generated by
|
1139
|
+
// the above statement.
|
1140
|
+
}
|
1141
|
+
|
1142
|
+
// There should be one non-fatal failure.
|
1143
|
+
ASSERT_EQ(1, failures.size());
|
1144
|
+
const ::testing::TestPartResult& r = failures.GetTestPartResult(0);
|
1145
|
+
EXPECT_EQ(::testing::TestPartResult::kNonFatalFailure, r.type());
|
1146
|
+
|
1147
|
+
// Verifies that the failure message contains the two unsatisfied
|
1148
|
+
// pre-requisites but not the satisfied one.
|
1149
|
+
#if GTEST_USES_PCRE
|
1150
|
+
EXPECT_THAT(r.message(), ContainsRegex(
|
1151
|
+
// PCRE has trouble using (.|\n) to match any character, but
|
1152
|
+
// supports the (?s) prefix for using . to match any character.
|
1153
|
+
"(?s)the following immediate pre-requisites are not satisfied:\n"
|
1154
|
+
".*: pre-requisite #0\n"
|
1155
|
+
".*: pre-requisite #1"));
|
1156
|
+
#elif GTEST_USES_POSIX_RE
|
1157
|
+
EXPECT_THAT(r.message(), ContainsRegex(
|
1158
|
+
// POSIX RE doesn't understand the (?s) prefix, but has no trouble
|
1159
|
+
// with (.|\n).
|
1160
|
+
"the following immediate pre-requisites are not satisfied:\n"
|
1161
|
+
"(.|\n)*: pre-requisite #0\n"
|
1162
|
+
"(.|\n)*: pre-requisite #1"));
|
1163
|
+
#else
|
1164
|
+
// We can only use Google Test's own simple regex.
|
1165
|
+
EXPECT_THAT(r.message(), ContainsRegex(
|
1166
|
+
"the following immediate pre-requisites are not satisfied:"));
|
1167
|
+
EXPECT_THAT(r.message(), ContainsRegex(": pre-requisite #0"));
|
1168
|
+
EXPECT_THAT(r.message(), ContainsRegex(": pre-requisite #1"));
|
1169
|
+
#endif // GTEST_USES_PCRE
|
1170
|
+
|
1171
|
+
b.DoB(1);
|
1172
|
+
b.DoB(3);
|
1173
|
+
b.DoB(4);
|
1174
|
+
}
|
1175
|
+
|
1176
|
+
TEST(UndefinedReturnValueTest,
|
1177
|
+
ReturnValueIsMandatoryWhenNotDefaultConstructible) {
|
1178
|
+
MockA a;
|
1179
|
+
// FIXME: We should really verify the output message,
|
1180
|
+
// but we cannot yet due to that EXPECT_DEATH only captures stderr
|
1181
|
+
// while Google Mock logs to stdout.
|
1182
|
+
#if GTEST_HAS_EXCEPTIONS
|
1183
|
+
EXPECT_ANY_THROW(a.ReturnNonDefaultConstructible());
|
1184
|
+
#else
|
1185
|
+
EXPECT_DEATH_IF_SUPPORTED(a.ReturnNonDefaultConstructible(), "");
|
1186
|
+
#endif
|
1187
|
+
}
|
1188
|
+
|
1189
|
+
// Tests that an excessive call (one whose arguments match the
|
1190
|
+
// matchers but is called too many times) performs the default action.
|
1191
|
+
TEST(ExcessiveCallTest, DoesDefaultAction) {
|
1192
|
+
// When there is an ON_CALL() statement, the action specified by it
|
1193
|
+
// should be taken.
|
1194
|
+
MockA a;
|
1195
|
+
ON_CALL(a, Binary(_, _))
|
1196
|
+
.WillByDefault(Return(true));
|
1197
|
+
EXPECT_CALL(a, Binary(0, 0));
|
1198
|
+
a.Binary(0, 0);
|
1199
|
+
bool result = false;
|
1200
|
+
EXPECT_NONFATAL_FAILURE(result = a.Binary(0, 0),
|
1201
|
+
"Mock function called more times than expected");
|
1202
|
+
EXPECT_TRUE(result);
|
1203
|
+
|
1204
|
+
// When there is no ON_CALL(), the default value for the return type
|
1205
|
+
// should be returned.
|
1206
|
+
MockB b;
|
1207
|
+
EXPECT_CALL(b, DoB(0))
|
1208
|
+
.Times(0);
|
1209
|
+
int n = -1;
|
1210
|
+
EXPECT_NONFATAL_FAILURE(n = b.DoB(0),
|
1211
|
+
"Mock function called more times than expected");
|
1212
|
+
EXPECT_EQ(0, n);
|
1213
|
+
}
|
1214
|
+
|
1215
|
+
// Tests that when a void function is called too many times,
|
1216
|
+
// the failure message contains the argument values.
|
1217
|
+
TEST(ExcessiveCallTest, GeneratesFailureForVoidFunction) {
|
1218
|
+
MockA a;
|
1219
|
+
EXPECT_CALL(a, DoA(_))
|
1220
|
+
.Times(0);
|
1221
|
+
EXPECT_NONFATAL_FAILURE(
|
1222
|
+
a.DoA(9),
|
1223
|
+
"Mock function called more times than expected - returning directly.\n"
|
1224
|
+
" Function call: DoA(9)\n"
|
1225
|
+
" Expected: to be never called\n"
|
1226
|
+
" Actual: called once - over-saturated and active");
|
1227
|
+
}
|
1228
|
+
|
1229
|
+
// Tests that when a non-void function is called too many times, the
|
1230
|
+
// failure message contains the argument values and the return value.
|
1231
|
+
TEST(ExcessiveCallTest, GeneratesFailureForNonVoidFunction) {
|
1232
|
+
MockB b;
|
1233
|
+
EXPECT_CALL(b, DoB(_));
|
1234
|
+
b.DoB(1);
|
1235
|
+
EXPECT_NONFATAL_FAILURE(
|
1236
|
+
b.DoB(2),
|
1237
|
+
"Mock function called more times than expected - "
|
1238
|
+
"returning default value.\n"
|
1239
|
+
" Function call: DoB(2)\n"
|
1240
|
+
" Returns: 0\n"
|
1241
|
+
" Expected: to be called once\n"
|
1242
|
+
" Actual: called twice - over-saturated and active");
|
1243
|
+
}
|
1244
|
+
|
1245
|
+
// Tests using sequences.
|
1246
|
+
|
1247
|
+
TEST(InSequenceTest, AllExpectationInScopeAreInSequence) {
|
1248
|
+
MockA a;
|
1249
|
+
{
|
1250
|
+
InSequence dummy;
|
1251
|
+
|
1252
|
+
EXPECT_CALL(a, DoA(1));
|
1253
|
+
EXPECT_CALL(a, DoA(2));
|
1254
|
+
}
|
1255
|
+
|
1256
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
1257
|
+
a.DoA(2);
|
1258
|
+
}, "Unexpected mock function call");
|
1259
|
+
|
1260
|
+
a.DoA(1);
|
1261
|
+
a.DoA(2);
|
1262
|
+
}
|
1263
|
+
|
1264
|
+
TEST(InSequenceTest, NestedInSequence) {
|
1265
|
+
MockA a;
|
1266
|
+
{
|
1267
|
+
InSequence dummy;
|
1268
|
+
|
1269
|
+
EXPECT_CALL(a, DoA(1));
|
1270
|
+
{
|
1271
|
+
InSequence dummy2;
|
1272
|
+
|
1273
|
+
EXPECT_CALL(a, DoA(2));
|
1274
|
+
EXPECT_CALL(a, DoA(3));
|
1275
|
+
}
|
1276
|
+
}
|
1277
|
+
|
1278
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
1279
|
+
a.DoA(1);
|
1280
|
+
a.DoA(3);
|
1281
|
+
}, "Unexpected mock function call");
|
1282
|
+
|
1283
|
+
a.DoA(2);
|
1284
|
+
a.DoA(3);
|
1285
|
+
}
|
1286
|
+
|
1287
|
+
TEST(InSequenceTest, ExpectationsOutOfScopeAreNotAffected) {
|
1288
|
+
MockA a;
|
1289
|
+
{
|
1290
|
+
InSequence dummy;
|
1291
|
+
|
1292
|
+
EXPECT_CALL(a, DoA(1));
|
1293
|
+
EXPECT_CALL(a, DoA(2));
|
1294
|
+
}
|
1295
|
+
EXPECT_CALL(a, DoA(3));
|
1296
|
+
|
1297
|
+
EXPECT_NONFATAL_FAILURE({ // NOLINT
|
1298
|
+
a.DoA(2);
|
1299
|
+
}, "Unexpected mock function call");
|
1300
|
+
|
1301
|
+
a.DoA(3);
|
1302
|
+
a.DoA(1);
|
1303
|
+
a.DoA(2);
|
1304
|
+
}
|
1305
|
+
|
1306
|
+
// Tests that any order is allowed when no sequence is used.
|
1307
|
+
TEST(SequenceTest, AnyOrderIsOkByDefault) {
|
1308
|
+
{
|
1309
|
+
MockA a;
|
1310
|
+
MockB b;
|
1311
|
+
|
1312
|
+
EXPECT_CALL(a, DoA(1));
|
1313
|
+
EXPECT_CALL(b, DoB())
|
1314
|
+
.Times(AnyNumber());
|
1315
|
+
|
1316
|
+
a.DoA(1);
|
1317
|
+
b.DoB();
|
1318
|
+
}
|
1319
|
+
|
1320
|
+
{ // NOLINT
|
1321
|
+
MockA a;
|
1322
|
+
MockB b;
|
1323
|
+
|
1324
|
+
EXPECT_CALL(a, DoA(1));
|
1325
|
+
EXPECT_CALL(b, DoB())
|
1326
|
+
.Times(AnyNumber());
|
1327
|
+
|
1328
|
+
b.DoB();
|
1329
|
+
a.DoA(1);
|
1330
|
+
}
|
1331
|
+
}
|
1332
|
+
|
1333
|
+
// Tests that the calls must be in strict order when a complete order
|
1334
|
+
// is specified.
|
1335
|
+
TEST(SequenceTest, CallsMustBeInStrictOrderWhenSaidSo1) {
|
1336
|
+
MockA a;
|
1337
|
+
ON_CALL(a, ReturnResult(_))
|
1338
|
+
.WillByDefault(Return(Result()));
|
1339
|
+
|
1340
|
+
Sequence s;
|
1341
|
+
EXPECT_CALL(a, ReturnResult(1))
|
1342
|
+
.InSequence(s);
|
1343
|
+
EXPECT_CALL(a, ReturnResult(2))
|
1344
|
+
.InSequence(s);
|
1345
|
+
EXPECT_CALL(a, ReturnResult(3))
|
1346
|
+
.InSequence(s);
|
1347
|
+
|
1348
|
+
a.ReturnResult(1);
|
1349
|
+
|
1350
|
+
// May only be called after a.ReturnResult(2).
|
1351
|
+
EXPECT_NONFATAL_FAILURE(a.ReturnResult(3), "Unexpected mock function call");
|
1352
|
+
|
1353
|
+
a.ReturnResult(2);
|
1354
|
+
a.ReturnResult(3);
|
1355
|
+
}
|
1356
|
+
|
1357
|
+
// Tests that the calls must be in strict order when a complete order
|
1358
|
+
// is specified.
|
1359
|
+
TEST(SequenceTest, CallsMustBeInStrictOrderWhenSaidSo2) {
|
1360
|
+
MockA a;
|
1361
|
+
ON_CALL(a, ReturnResult(_))
|
1362
|
+
.WillByDefault(Return(Result()));
|
1363
|
+
|
1364
|
+
Sequence s;
|
1365
|
+
EXPECT_CALL(a, ReturnResult(1))
|
1366
|
+
.InSequence(s);
|
1367
|
+
EXPECT_CALL(a, ReturnResult(2))
|
1368
|
+
.InSequence(s);
|
1369
|
+
|
1370
|
+
// May only be called after a.ReturnResult(1).
|
1371
|
+
EXPECT_NONFATAL_FAILURE(a.ReturnResult(2), "Unexpected mock function call");
|
1372
|
+
|
1373
|
+
a.ReturnResult(1);
|
1374
|
+
a.ReturnResult(2);
|
1375
|
+
}
|
1376
|
+
|
1377
|
+
// Tests specifying a DAG using multiple sequences.
|
1378
|
+
class PartialOrderTest : public testing::Test {
|
1379
|
+
protected:
|
1380
|
+
PartialOrderTest() {
|
1381
|
+
ON_CALL(a_, ReturnResult(_))
|
1382
|
+
.WillByDefault(Return(Result()));
|
1383
|
+
|
1384
|
+
// Specifies this partial ordering:
|
1385
|
+
//
|
1386
|
+
// a.ReturnResult(1) ==>
|
1387
|
+
// a.ReturnResult(2) * n ==> a.ReturnResult(3)
|
1388
|
+
// b.DoB() * 2 ==>
|
1389
|
+
Sequence x, y;
|
1390
|
+
EXPECT_CALL(a_, ReturnResult(1))
|
1391
|
+
.InSequence(x);
|
1392
|
+
EXPECT_CALL(b_, DoB())
|
1393
|
+
.Times(2)
|
1394
|
+
.InSequence(y);
|
1395
|
+
EXPECT_CALL(a_, ReturnResult(2))
|
1396
|
+
.Times(AnyNumber())
|
1397
|
+
.InSequence(x, y);
|
1398
|
+
EXPECT_CALL(a_, ReturnResult(3))
|
1399
|
+
.InSequence(x);
|
1400
|
+
}
|
1401
|
+
|
1402
|
+
MockA a_;
|
1403
|
+
MockB b_;
|
1404
|
+
};
|
1405
|
+
|
1406
|
+
TEST_F(PartialOrderTest, CallsMustConformToSpecifiedDag1) {
|
1407
|
+
a_.ReturnResult(1);
|
1408
|
+
b_.DoB();
|
1409
|
+
|
1410
|
+
// May only be called after the second DoB().
|
1411
|
+
EXPECT_NONFATAL_FAILURE(a_.ReturnResult(2), "Unexpected mock function call");
|
1412
|
+
|
1413
|
+
b_.DoB();
|
1414
|
+
a_.ReturnResult(3);
|
1415
|
+
}
|
1416
|
+
|
1417
|
+
TEST_F(PartialOrderTest, CallsMustConformToSpecifiedDag2) {
|
1418
|
+
// May only be called after ReturnResult(1).
|
1419
|
+
EXPECT_NONFATAL_FAILURE(a_.ReturnResult(2), "Unexpected mock function call");
|
1420
|
+
|
1421
|
+
a_.ReturnResult(1);
|
1422
|
+
b_.DoB();
|
1423
|
+
b_.DoB();
|
1424
|
+
a_.ReturnResult(3);
|
1425
|
+
}
|
1426
|
+
|
1427
|
+
TEST_F(PartialOrderTest, CallsMustConformToSpecifiedDag3) {
|
1428
|
+
// May only be called last.
|
1429
|
+
EXPECT_NONFATAL_FAILURE(a_.ReturnResult(3), "Unexpected mock function call");
|
1430
|
+
|
1431
|
+
a_.ReturnResult(1);
|
1432
|
+
b_.DoB();
|
1433
|
+
b_.DoB();
|
1434
|
+
a_.ReturnResult(3);
|
1435
|
+
}
|
1436
|
+
|
1437
|
+
TEST_F(PartialOrderTest, CallsMustConformToSpecifiedDag4) {
|
1438
|
+
a_.ReturnResult(1);
|
1439
|
+
b_.DoB();
|
1440
|
+
b_.DoB();
|
1441
|
+
a_.ReturnResult(3);
|
1442
|
+
|
1443
|
+
// May only be called before ReturnResult(3).
|
1444
|
+
EXPECT_NONFATAL_FAILURE(a_.ReturnResult(2), "Unexpected mock function call");
|
1445
|
+
}
|
1446
|
+
|
1447
|
+
TEST(SequenceTest, Retirement) {
|
1448
|
+
MockA a;
|
1449
|
+
Sequence s;
|
1450
|
+
|
1451
|
+
EXPECT_CALL(a, DoA(1))
|
1452
|
+
.InSequence(s);
|
1453
|
+
EXPECT_CALL(a, DoA(_))
|
1454
|
+
.InSequence(s)
|
1455
|
+
.RetiresOnSaturation();
|
1456
|
+
EXPECT_CALL(a, DoA(1))
|
1457
|
+
.InSequence(s);
|
1458
|
+
|
1459
|
+
a.DoA(1);
|
1460
|
+
a.DoA(2);
|
1461
|
+
a.DoA(1);
|
1462
|
+
}
|
1463
|
+
|
1464
|
+
// Tests Expectation.
|
1465
|
+
|
1466
|
+
TEST(ExpectationTest, ConstrutorsWork) {
|
1467
|
+
MockA a;
|
1468
|
+
Expectation e1; // Default ctor.
|
1469
|
+
|
1470
|
+
// Ctor from various forms of EXPECT_CALL.
|
1471
|
+
Expectation e2 = EXPECT_CALL(a, DoA(2));
|
1472
|
+
Expectation e3 = EXPECT_CALL(a, DoA(3)).With(_);
|
1473
|
+
{
|
1474
|
+
Sequence s;
|
1475
|
+
Expectation e4 = EXPECT_CALL(a, DoA(4)).Times(1);
|
1476
|
+
Expectation e5 = EXPECT_CALL(a, DoA(5)).InSequence(s);
|
1477
|
+
}
|
1478
|
+
Expectation e6 = EXPECT_CALL(a, DoA(6)).After(e2);
|
1479
|
+
Expectation e7 = EXPECT_CALL(a, DoA(7)).WillOnce(Return());
|
1480
|
+
Expectation e8 = EXPECT_CALL(a, DoA(8)).WillRepeatedly(Return());
|
1481
|
+
Expectation e9 = EXPECT_CALL(a, DoA(9)).RetiresOnSaturation();
|
1482
|
+
|
1483
|
+
Expectation e10 = e2; // Copy ctor.
|
1484
|
+
|
1485
|
+
EXPECT_THAT(e1, Ne(e2));
|
1486
|
+
EXPECT_THAT(e2, Eq(e10));
|
1487
|
+
|
1488
|
+
a.DoA(2);
|
1489
|
+
a.DoA(3);
|
1490
|
+
a.DoA(4);
|
1491
|
+
a.DoA(5);
|
1492
|
+
a.DoA(6);
|
1493
|
+
a.DoA(7);
|
1494
|
+
a.DoA(8);
|
1495
|
+
a.DoA(9);
|
1496
|
+
}
|
1497
|
+
|
1498
|
+
TEST(ExpectationTest, AssignmentWorks) {
|
1499
|
+
MockA a;
|
1500
|
+
Expectation e1;
|
1501
|
+
Expectation e2 = EXPECT_CALL(a, DoA(1));
|
1502
|
+
|
1503
|
+
EXPECT_THAT(e1, Ne(e2));
|
1504
|
+
|
1505
|
+
e1 = e2;
|
1506
|
+
EXPECT_THAT(e1, Eq(e2));
|
1507
|
+
|
1508
|
+
a.DoA(1);
|
1509
|
+
}
|
1510
|
+
|
1511
|
+
// Tests ExpectationSet.
|
1512
|
+
|
1513
|
+
TEST(ExpectationSetTest, MemberTypesAreCorrect) {
|
1514
|
+
::testing::StaticAssertTypeEq<Expectation, ExpectationSet::value_type>();
|
1515
|
+
}
|
1516
|
+
|
1517
|
+
TEST(ExpectationSetTest, ConstructorsWork) {
|
1518
|
+
MockA a;
|
1519
|
+
|
1520
|
+
Expectation e1;
|
1521
|
+
const Expectation e2;
|
1522
|
+
ExpectationSet es1; // Default ctor.
|
1523
|
+
ExpectationSet es2 = EXPECT_CALL(a, DoA(1)); // Ctor from EXPECT_CALL.
|
1524
|
+
ExpectationSet es3 = e1; // Ctor from Expectation.
|
1525
|
+
ExpectationSet es4(e1); // Ctor from Expectation; alternative syntax.
|
1526
|
+
ExpectationSet es5 = e2; // Ctor from const Expectation.
|
1527
|
+
ExpectationSet es6(e2); // Ctor from const Expectation; alternative syntax.
|
1528
|
+
ExpectationSet es7 = es2; // Copy ctor.
|
1529
|
+
|
1530
|
+
EXPECT_EQ(0, es1.size());
|
1531
|
+
EXPECT_EQ(1, es2.size());
|
1532
|
+
EXPECT_EQ(1, es3.size());
|
1533
|
+
EXPECT_EQ(1, es4.size());
|
1534
|
+
EXPECT_EQ(1, es5.size());
|
1535
|
+
EXPECT_EQ(1, es6.size());
|
1536
|
+
EXPECT_EQ(1, es7.size());
|
1537
|
+
|
1538
|
+
EXPECT_THAT(es3, Ne(es2));
|
1539
|
+
EXPECT_THAT(es4, Eq(es3));
|
1540
|
+
EXPECT_THAT(es5, Eq(es4));
|
1541
|
+
EXPECT_THAT(es6, Eq(es5));
|
1542
|
+
EXPECT_THAT(es7, Eq(es2));
|
1543
|
+
a.DoA(1);
|
1544
|
+
}
|
1545
|
+
|
1546
|
+
TEST(ExpectationSetTest, AssignmentWorks) {
|
1547
|
+
ExpectationSet es1;
|
1548
|
+
ExpectationSet es2 = Expectation();
|
1549
|
+
|
1550
|
+
es1 = es2;
|
1551
|
+
EXPECT_EQ(1, es1.size());
|
1552
|
+
EXPECT_THAT(*(es1.begin()), Eq(Expectation()));
|
1553
|
+
EXPECT_THAT(es1, Eq(es2));
|
1554
|
+
}
|
1555
|
+
|
1556
|
+
TEST(ExpectationSetTest, InsertionWorks) {
|
1557
|
+
ExpectationSet es1;
|
1558
|
+
Expectation e1;
|
1559
|
+
es1 += e1;
|
1560
|
+
EXPECT_EQ(1, es1.size());
|
1561
|
+
EXPECT_THAT(*(es1.begin()), Eq(e1));
|
1562
|
+
|
1563
|
+
MockA a;
|
1564
|
+
Expectation e2 = EXPECT_CALL(a, DoA(1));
|
1565
|
+
es1 += e2;
|
1566
|
+
EXPECT_EQ(2, es1.size());
|
1567
|
+
|
1568
|
+
ExpectationSet::const_iterator it1 = es1.begin();
|
1569
|
+
ExpectationSet::const_iterator it2 = it1;
|
1570
|
+
++it2;
|
1571
|
+
EXPECT_TRUE(*it1 == e1 || *it2 == e1); // e1 must be in the set.
|
1572
|
+
EXPECT_TRUE(*it1 == e2 || *it2 == e2); // e2 must be in the set too.
|
1573
|
+
a.DoA(1);
|
1574
|
+
}
|
1575
|
+
|
1576
|
+
TEST(ExpectationSetTest, SizeWorks) {
|
1577
|
+
ExpectationSet es;
|
1578
|
+
EXPECT_EQ(0, es.size());
|
1579
|
+
|
1580
|
+
es += Expectation();
|
1581
|
+
EXPECT_EQ(1, es.size());
|
1582
|
+
|
1583
|
+
MockA a;
|
1584
|
+
es += EXPECT_CALL(a, DoA(1));
|
1585
|
+
EXPECT_EQ(2, es.size());
|
1586
|
+
|
1587
|
+
a.DoA(1);
|
1588
|
+
}
|
1589
|
+
|
1590
|
+
TEST(ExpectationSetTest, IsEnumerable) {
|
1591
|
+
ExpectationSet es;
|
1592
|
+
EXPECT_TRUE(es.begin() == es.end());
|
1593
|
+
|
1594
|
+
es += Expectation();
|
1595
|
+
ExpectationSet::const_iterator it = es.begin();
|
1596
|
+
EXPECT_TRUE(it != es.end());
|
1597
|
+
EXPECT_THAT(*it, Eq(Expectation()));
|
1598
|
+
++it;
|
1599
|
+
EXPECT_TRUE(it== es.end());
|
1600
|
+
}
|
1601
|
+
|
1602
|
+
// Tests the .After() clause.
|
1603
|
+
|
1604
|
+
TEST(AfterTest, SucceedsWhenPartialOrderIsSatisfied) {
|
1605
|
+
MockA a;
|
1606
|
+
ExpectationSet es;
|
1607
|
+
es += EXPECT_CALL(a, DoA(1));
|
1608
|
+
es += EXPECT_CALL(a, DoA(2));
|
1609
|
+
EXPECT_CALL(a, DoA(3))
|
1610
|
+
.After(es);
|
1611
|
+
|
1612
|
+
a.DoA(1);
|
1613
|
+
a.DoA(2);
|
1614
|
+
a.DoA(3);
|
1615
|
+
}
|
1616
|
+
|
1617
|
+
TEST(AfterTest, SucceedsWhenTotalOrderIsSatisfied) {
|
1618
|
+
MockA a;
|
1619
|
+
MockB b;
|
1620
|
+
// The following also verifies that const Expectation objects work
|
1621
|
+
// too. Do not remove the const modifiers.
|
1622
|
+
const Expectation e1 = EXPECT_CALL(a, DoA(1));
|
1623
|
+
const Expectation e2 = EXPECT_CALL(b, DoB())
|
1624
|
+
.Times(2)
|
1625
|
+
.After(e1);
|
1626
|
+
EXPECT_CALL(a, DoA(2)).After(e2);
|
1627
|
+
|
1628
|
+
a.DoA(1);
|
1629
|
+
b.DoB();
|
1630
|
+
b.DoB();
|
1631
|
+
a.DoA(2);
|
1632
|
+
}
|
1633
|
+
|
1634
|
+
// Calls must be in strict order when specified so using .After().
|
1635
|
+
TEST(AfterTest, CallsMustBeInStrictOrderWhenSpecifiedSo1) {
|
1636
|
+
MockA a;
|
1637
|
+
MockB b;
|
1638
|
+
|
1639
|
+
// Define ordering:
|
1640
|
+
// a.DoA(1) ==> b.DoB() ==> a.DoA(2)
|
1641
|
+
Expectation e1 = EXPECT_CALL(a, DoA(1));
|
1642
|
+
Expectation e2 = EXPECT_CALL(b, DoB())
|
1643
|
+
.After(e1);
|
1644
|
+
EXPECT_CALL(a, DoA(2))
|
1645
|
+
.After(e2);
|
1646
|
+
|
1647
|
+
a.DoA(1);
|
1648
|
+
|
1649
|
+
// May only be called after DoB().
|
1650
|
+
EXPECT_NONFATAL_FAILURE(a.DoA(2), "Unexpected mock function call");
|
1651
|
+
|
1652
|
+
b.DoB();
|
1653
|
+
a.DoA(2);
|
1654
|
+
}
|
1655
|
+
|
1656
|
+
// Calls must be in strict order when specified so using .After().
|
1657
|
+
TEST(AfterTest, CallsMustBeInStrictOrderWhenSpecifiedSo2) {
|
1658
|
+
MockA a;
|
1659
|
+
MockB b;
|
1660
|
+
|
1661
|
+
// Define ordering:
|
1662
|
+
// a.DoA(1) ==> b.DoB() * 2 ==> a.DoA(2)
|
1663
|
+
Expectation e1 = EXPECT_CALL(a, DoA(1));
|
1664
|
+
Expectation e2 = EXPECT_CALL(b, DoB())
|
1665
|
+
.Times(2)
|
1666
|
+
.After(e1);
|
1667
|
+
EXPECT_CALL(a, DoA(2))
|
1668
|
+
.After(e2);
|
1669
|
+
|
1670
|
+
a.DoA(1);
|
1671
|
+
b.DoB();
|
1672
|
+
|
1673
|
+
// May only be called after the second DoB().
|
1674
|
+
EXPECT_NONFATAL_FAILURE(a.DoA(2), "Unexpected mock function call");
|
1675
|
+
|
1676
|
+
b.DoB();
|
1677
|
+
a.DoA(2);
|
1678
|
+
}
|
1679
|
+
|
1680
|
+
// Calls must satisfy the partial order when specified so.
|
1681
|
+
TEST(AfterTest, CallsMustSatisfyPartialOrderWhenSpecifiedSo) {
|
1682
|
+
MockA a;
|
1683
|
+
ON_CALL(a, ReturnResult(_))
|
1684
|
+
.WillByDefault(Return(Result()));
|
1685
|
+
|
1686
|
+
// Define ordering:
|
1687
|
+
// a.DoA(1) ==>
|
1688
|
+
// a.DoA(2) ==> a.ReturnResult(3)
|
1689
|
+
Expectation e = EXPECT_CALL(a, DoA(1));
|
1690
|
+
const ExpectationSet es = EXPECT_CALL(a, DoA(2));
|
1691
|
+
EXPECT_CALL(a, ReturnResult(3))
|
1692
|
+
.After(e, es);
|
1693
|
+
|
1694
|
+
// May only be called last.
|
1695
|
+
EXPECT_NONFATAL_FAILURE(a.ReturnResult(3), "Unexpected mock function call");
|
1696
|
+
|
1697
|
+
a.DoA(2);
|
1698
|
+
a.DoA(1);
|
1699
|
+
a.ReturnResult(3);
|
1700
|
+
}
|
1701
|
+
|
1702
|
+
// Calls must satisfy the partial order when specified so.
|
1703
|
+
TEST(AfterTest, CallsMustSatisfyPartialOrderWhenSpecifiedSo2) {
|
1704
|
+
MockA a;
|
1705
|
+
|
1706
|
+
// Define ordering:
|
1707
|
+
// a.DoA(1) ==>
|
1708
|
+
// a.DoA(2) ==> a.DoA(3)
|
1709
|
+
Expectation e = EXPECT_CALL(a, DoA(1));
|
1710
|
+
const ExpectationSet es = EXPECT_CALL(a, DoA(2));
|
1711
|
+
EXPECT_CALL(a, DoA(3))
|
1712
|
+
.After(e, es);
|
1713
|
+
|
1714
|
+
a.DoA(2);
|
1715
|
+
|
1716
|
+
// May only be called last.
|
1717
|
+
EXPECT_NONFATAL_FAILURE(a.DoA(3), "Unexpected mock function call");
|
1718
|
+
|
1719
|
+
a.DoA(1);
|
1720
|
+
a.DoA(3);
|
1721
|
+
}
|
1722
|
+
|
1723
|
+
// .After() can be combined with .InSequence().
|
1724
|
+
TEST(AfterTest, CanBeUsedWithInSequence) {
|
1725
|
+
MockA a;
|
1726
|
+
Sequence s;
|
1727
|
+
Expectation e = EXPECT_CALL(a, DoA(1));
|
1728
|
+
EXPECT_CALL(a, DoA(2)).InSequence(s);
|
1729
|
+
EXPECT_CALL(a, DoA(3))
|
1730
|
+
.InSequence(s)
|
1731
|
+
.After(e);
|
1732
|
+
|
1733
|
+
a.DoA(1);
|
1734
|
+
|
1735
|
+
// May only be after DoA(2).
|
1736
|
+
EXPECT_NONFATAL_FAILURE(a.DoA(3), "Unexpected mock function call");
|
1737
|
+
|
1738
|
+
a.DoA(2);
|
1739
|
+
a.DoA(3);
|
1740
|
+
}
|
1741
|
+
|
1742
|
+
// .After() can be called multiple times.
|
1743
|
+
TEST(AfterTest, CanBeCalledManyTimes) {
|
1744
|
+
MockA a;
|
1745
|
+
Expectation e1 = EXPECT_CALL(a, DoA(1));
|
1746
|
+
Expectation e2 = EXPECT_CALL(a, DoA(2));
|
1747
|
+
Expectation e3 = EXPECT_CALL(a, DoA(3));
|
1748
|
+
EXPECT_CALL(a, DoA(4))
|
1749
|
+
.After(e1)
|
1750
|
+
.After(e2)
|
1751
|
+
.After(e3);
|
1752
|
+
|
1753
|
+
a.DoA(3);
|
1754
|
+
a.DoA(1);
|
1755
|
+
a.DoA(2);
|
1756
|
+
a.DoA(4);
|
1757
|
+
}
|
1758
|
+
|
1759
|
+
// .After() accepts up to 5 arguments.
|
1760
|
+
TEST(AfterTest, AcceptsUpToFiveArguments) {
|
1761
|
+
MockA a;
|
1762
|
+
Expectation e1 = EXPECT_CALL(a, DoA(1));
|
1763
|
+
Expectation e2 = EXPECT_CALL(a, DoA(2));
|
1764
|
+
Expectation e3 = EXPECT_CALL(a, DoA(3));
|
1765
|
+
ExpectationSet es1 = EXPECT_CALL(a, DoA(4));
|
1766
|
+
ExpectationSet es2 = EXPECT_CALL(a, DoA(5));
|
1767
|
+
EXPECT_CALL(a, DoA(6))
|
1768
|
+
.After(e1, e2, e3, es1, es2);
|
1769
|
+
|
1770
|
+
a.DoA(5);
|
1771
|
+
a.DoA(2);
|
1772
|
+
a.DoA(4);
|
1773
|
+
a.DoA(1);
|
1774
|
+
a.DoA(3);
|
1775
|
+
a.DoA(6);
|
1776
|
+
}
|
1777
|
+
|
1778
|
+
// .After() allows input to contain duplicated Expectations.
|
1779
|
+
TEST(AfterTest, AcceptsDuplicatedInput) {
|
1780
|
+
MockA a;
|
1781
|
+
ON_CALL(a, ReturnResult(_))
|
1782
|
+
.WillByDefault(Return(Result()));
|
1783
|
+
|
1784
|
+
// Define ordering:
|
1785
|
+
// DoA(1) ==>
|
1786
|
+
// DoA(2) ==> ReturnResult(3)
|
1787
|
+
Expectation e1 = EXPECT_CALL(a, DoA(1));
|
1788
|
+
Expectation e2 = EXPECT_CALL(a, DoA(2));
|
1789
|
+
ExpectationSet es;
|
1790
|
+
es += e1;
|
1791
|
+
es += e2;
|
1792
|
+
EXPECT_CALL(a, ReturnResult(3))
|
1793
|
+
.After(e1, e2, es, e1);
|
1794
|
+
|
1795
|
+
a.DoA(1);
|
1796
|
+
|
1797
|
+
// May only be after DoA(2).
|
1798
|
+
EXPECT_NONFATAL_FAILURE(a.ReturnResult(3), "Unexpected mock function call");
|
1799
|
+
|
1800
|
+
a.DoA(2);
|
1801
|
+
a.ReturnResult(3);
|
1802
|
+
}
|
1803
|
+
|
1804
|
+
// An Expectation added to an ExpectationSet after it has been used in
|
1805
|
+
// an .After() has no effect.
|
1806
|
+
TEST(AfterTest, ChangesToExpectationSetHaveNoEffectAfterwards) {
|
1807
|
+
MockA a;
|
1808
|
+
ExpectationSet es1 = EXPECT_CALL(a, DoA(1));
|
1809
|
+
Expectation e2 = EXPECT_CALL(a, DoA(2));
|
1810
|
+
EXPECT_CALL(a, DoA(3))
|
1811
|
+
.After(es1);
|
1812
|
+
es1 += e2;
|
1813
|
+
|
1814
|
+
a.DoA(1);
|
1815
|
+
a.DoA(3);
|
1816
|
+
a.DoA(2);
|
1817
|
+
}
|
1818
|
+
|
1819
|
+
// Tests that Google Mock correctly handles calls to mock functions
|
1820
|
+
// after a mock object owning one of their pre-requisites has died.
|
1821
|
+
|
1822
|
+
// Tests that calls that satisfy the original spec are successful.
|
1823
|
+
TEST(DeletingMockEarlyTest, Success1) {
|
1824
|
+
MockB* const b1 = new MockB;
|
1825
|
+
MockA* const a = new MockA;
|
1826
|
+
MockB* const b2 = new MockB;
|
1827
|
+
|
1828
|
+
{
|
1829
|
+
InSequence dummy;
|
1830
|
+
EXPECT_CALL(*b1, DoB(_))
|
1831
|
+
.WillOnce(Return(1));
|
1832
|
+
EXPECT_CALL(*a, Binary(_, _))
|
1833
|
+
.Times(AnyNumber())
|
1834
|
+
.WillRepeatedly(Return(true));
|
1835
|
+
EXPECT_CALL(*b2, DoB(_))
|
1836
|
+
.Times(AnyNumber())
|
1837
|
+
.WillRepeatedly(Return(2));
|
1838
|
+
}
|
1839
|
+
|
1840
|
+
EXPECT_EQ(1, b1->DoB(1));
|
1841
|
+
delete b1;
|
1842
|
+
// a's pre-requisite has died.
|
1843
|
+
EXPECT_TRUE(a->Binary(0, 1));
|
1844
|
+
delete b2;
|
1845
|
+
// a's successor has died.
|
1846
|
+
EXPECT_TRUE(a->Binary(1, 2));
|
1847
|
+
delete a;
|
1848
|
+
}
|
1849
|
+
|
1850
|
+
// Tests that calls that satisfy the original spec are successful.
|
1851
|
+
TEST(DeletingMockEarlyTest, Success2) {
|
1852
|
+
MockB* const b1 = new MockB;
|
1853
|
+
MockA* const a = new MockA;
|
1854
|
+
MockB* const b2 = new MockB;
|
1855
|
+
|
1856
|
+
{
|
1857
|
+
InSequence dummy;
|
1858
|
+
EXPECT_CALL(*b1, DoB(_))
|
1859
|
+
.WillOnce(Return(1));
|
1860
|
+
EXPECT_CALL(*a, Binary(_, _))
|
1861
|
+
.Times(AnyNumber());
|
1862
|
+
EXPECT_CALL(*b2, DoB(_))
|
1863
|
+
.Times(AnyNumber())
|
1864
|
+
.WillRepeatedly(Return(2));
|
1865
|
+
}
|
1866
|
+
|
1867
|
+
delete a; // a is trivially satisfied.
|
1868
|
+
EXPECT_EQ(1, b1->DoB(1));
|
1869
|
+
EXPECT_EQ(2, b2->DoB(2));
|
1870
|
+
delete b1;
|
1871
|
+
delete b2;
|
1872
|
+
}
|
1873
|
+
|
1874
|
+
// Tests that it's OK to delete a mock object itself in its action.
|
1875
|
+
|
1876
|
+
// Suppresses warning on unreferenced formal parameter in MSVC with
|
1877
|
+
// -W4.
|
1878
|
+
#ifdef _MSC_VER
|
1879
|
+
# pragma warning(push)
|
1880
|
+
# pragma warning(disable:4100)
|
1881
|
+
#endif
|
1882
|
+
|
1883
|
+
ACTION_P(Delete, ptr) { delete ptr; }
|
1884
|
+
|
1885
|
+
#ifdef _MSC_VER
|
1886
|
+
# pragma warning(pop)
|
1887
|
+
#endif
|
1888
|
+
|
1889
|
+
TEST(DeletingMockEarlyTest, CanDeleteSelfInActionReturningVoid) {
|
1890
|
+
MockA* const a = new MockA;
|
1891
|
+
EXPECT_CALL(*a, DoA(_)).WillOnce(Delete(a));
|
1892
|
+
a->DoA(42); // This will cause a to be deleted.
|
1893
|
+
}
|
1894
|
+
|
1895
|
+
TEST(DeletingMockEarlyTest, CanDeleteSelfInActionReturningValue) {
|
1896
|
+
MockA* const a = new MockA;
|
1897
|
+
EXPECT_CALL(*a, ReturnResult(_))
|
1898
|
+
.WillOnce(DoAll(Delete(a), Return(Result())));
|
1899
|
+
a->ReturnResult(42); // This will cause a to be deleted.
|
1900
|
+
}
|
1901
|
+
|
1902
|
+
// Tests that calls that violate the original spec yield failures.
|
1903
|
+
TEST(DeletingMockEarlyTest, Failure1) {
|
1904
|
+
MockB* const b1 = new MockB;
|
1905
|
+
MockA* const a = new MockA;
|
1906
|
+
MockB* const b2 = new MockB;
|
1907
|
+
|
1908
|
+
{
|
1909
|
+
InSequence dummy;
|
1910
|
+
EXPECT_CALL(*b1, DoB(_))
|
1911
|
+
.WillOnce(Return(1));
|
1912
|
+
EXPECT_CALL(*a, Binary(_, _))
|
1913
|
+
.Times(AnyNumber());
|
1914
|
+
EXPECT_CALL(*b2, DoB(_))
|
1915
|
+
.Times(AnyNumber())
|
1916
|
+
.WillRepeatedly(Return(2));
|
1917
|
+
}
|
1918
|
+
|
1919
|
+
delete a; // a is trivially satisfied.
|
1920
|
+
EXPECT_NONFATAL_FAILURE({
|
1921
|
+
b2->DoB(2);
|
1922
|
+
}, "Unexpected mock function call");
|
1923
|
+
EXPECT_EQ(1, b1->DoB(1));
|
1924
|
+
delete b1;
|
1925
|
+
delete b2;
|
1926
|
+
}
|
1927
|
+
|
1928
|
+
// Tests that calls that violate the original spec yield failures.
|
1929
|
+
TEST(DeletingMockEarlyTest, Failure2) {
|
1930
|
+
MockB* const b1 = new MockB;
|
1931
|
+
MockA* const a = new MockA;
|
1932
|
+
MockB* const b2 = new MockB;
|
1933
|
+
|
1934
|
+
{
|
1935
|
+
InSequence dummy;
|
1936
|
+
EXPECT_CALL(*b1, DoB(_));
|
1937
|
+
EXPECT_CALL(*a, Binary(_, _))
|
1938
|
+
.Times(AnyNumber());
|
1939
|
+
EXPECT_CALL(*b2, DoB(_))
|
1940
|
+
.Times(AnyNumber());
|
1941
|
+
}
|
1942
|
+
|
1943
|
+
EXPECT_NONFATAL_FAILURE(delete b1,
|
1944
|
+
"Actual: never called");
|
1945
|
+
EXPECT_NONFATAL_FAILURE(a->Binary(0, 1),
|
1946
|
+
"Unexpected mock function call");
|
1947
|
+
EXPECT_NONFATAL_FAILURE(b2->DoB(1),
|
1948
|
+
"Unexpected mock function call");
|
1949
|
+
delete a;
|
1950
|
+
delete b2;
|
1951
|
+
}
|
1952
|
+
|
1953
|
+
class EvenNumberCardinality : public CardinalityInterface {
|
1954
|
+
public:
|
1955
|
+
// Returns true if and only if call_count calls will satisfy this
|
1956
|
+
// cardinality.
|
1957
|
+
bool IsSatisfiedByCallCount(int call_count) const override {
|
1958
|
+
return call_count % 2 == 0;
|
1959
|
+
}
|
1960
|
+
|
1961
|
+
// Returns true if and only if call_count calls will saturate this
|
1962
|
+
// cardinality.
|
1963
|
+
bool IsSaturatedByCallCount(int /* call_count */) const override {
|
1964
|
+
return false;
|
1965
|
+
}
|
1966
|
+
|
1967
|
+
// Describes self to an ostream.
|
1968
|
+
void DescribeTo(::std::ostream* os) const override {
|
1969
|
+
*os << "called even number of times";
|
1970
|
+
}
|
1971
|
+
};
|
1972
|
+
|
1973
|
+
Cardinality EvenNumber() {
|
1974
|
+
return Cardinality(new EvenNumberCardinality);
|
1975
|
+
}
|
1976
|
+
|
1977
|
+
TEST(ExpectationBaseTest,
|
1978
|
+
AllPrerequisitesAreSatisfiedWorksForNonMonotonicCardinality) {
|
1979
|
+
MockA* a = new MockA;
|
1980
|
+
Sequence s;
|
1981
|
+
|
1982
|
+
EXPECT_CALL(*a, DoA(1))
|
1983
|
+
.Times(EvenNumber())
|
1984
|
+
.InSequence(s);
|
1985
|
+
EXPECT_CALL(*a, DoA(2))
|
1986
|
+
.Times(AnyNumber())
|
1987
|
+
.InSequence(s);
|
1988
|
+
EXPECT_CALL(*a, DoA(3))
|
1989
|
+
.Times(AnyNumber());
|
1990
|
+
|
1991
|
+
a->DoA(3);
|
1992
|
+
a->DoA(1);
|
1993
|
+
EXPECT_NONFATAL_FAILURE(a->DoA(2), "Unexpected mock function call");
|
1994
|
+
EXPECT_NONFATAL_FAILURE(delete a, "to be called even number of times");
|
1995
|
+
}
|
1996
|
+
|
1997
|
+
// The following tests verify the message generated when a mock
|
1998
|
+
// function is called.
|
1999
|
+
|
2000
|
+
struct Printable {
|
2001
|
+
};
|
2002
|
+
|
2003
|
+
inline void operator<<(::std::ostream& os, const Printable&) {
|
2004
|
+
os << "Printable";
|
2005
|
+
}
|
2006
|
+
|
2007
|
+
struct Unprintable {
|
2008
|
+
Unprintable() : value(0) {}
|
2009
|
+
int value;
|
2010
|
+
};
|
2011
|
+
|
2012
|
+
class MockC {
|
2013
|
+
public:
|
2014
|
+
MockC() {}
|
2015
|
+
|
2016
|
+
MOCK_METHOD6(VoidMethod, void(bool cond, int n, std::string s, void* p,
|
2017
|
+
const Printable& x, Unprintable y));
|
2018
|
+
MOCK_METHOD0(NonVoidMethod, int()); // NOLINT
|
2019
|
+
|
2020
|
+
private:
|
2021
|
+
GTEST_DISALLOW_COPY_AND_ASSIGN_(MockC);
|
2022
|
+
};
|
2023
|
+
|
2024
|
+
class VerboseFlagPreservingFixture : public testing::Test {
|
2025
|
+
protected:
|
2026
|
+
VerboseFlagPreservingFixture()
|
2027
|
+
: saved_verbose_flag_(GMOCK_FLAG(verbose)) {}
|
2028
|
+
|
2029
|
+
~VerboseFlagPreservingFixture() override {
|
2030
|
+
GMOCK_FLAG(verbose) = saved_verbose_flag_;
|
2031
|
+
}
|
2032
|
+
|
2033
|
+
private:
|
2034
|
+
const std::string saved_verbose_flag_;
|
2035
|
+
|
2036
|
+
GTEST_DISALLOW_COPY_AND_ASSIGN_(VerboseFlagPreservingFixture);
|
2037
|
+
};
|
2038
|
+
|
2039
|
+
#if GTEST_HAS_STREAM_REDIRECTION
|
2040
|
+
|
2041
|
+
// Tests that an uninteresting mock function call on a naggy mock
|
2042
|
+
// generates a warning without the stack trace when
|
2043
|
+
// --gmock_verbose=warning is specified.
|
2044
|
+
TEST(FunctionCallMessageTest,
|
2045
|
+
UninterestingCallOnNaggyMockGeneratesNoStackTraceWhenVerboseWarning) {
|
2046
|
+
GMOCK_FLAG(verbose) = kWarningVerbosity;
|
2047
|
+
NaggyMock<MockC> c;
|
2048
|
+
CaptureStdout();
|
2049
|
+
c.VoidMethod(false, 5, "Hi", nullptr, Printable(), Unprintable());
|
2050
|
+
const std::string output = GetCapturedStdout();
|
2051
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", output);
|
2052
|
+
EXPECT_PRED_FORMAT2(IsNotSubstring, "Stack trace:", output);
|
2053
|
+
}
|
2054
|
+
|
2055
|
+
// Tests that an uninteresting mock function call on a naggy mock
|
2056
|
+
// generates a warning containing the stack trace when
|
2057
|
+
// --gmock_verbose=info is specified.
|
2058
|
+
TEST(FunctionCallMessageTest,
|
2059
|
+
UninterestingCallOnNaggyMockGeneratesFyiWithStackTraceWhenVerboseInfo) {
|
2060
|
+
GMOCK_FLAG(verbose) = kInfoVerbosity;
|
2061
|
+
NaggyMock<MockC> c;
|
2062
|
+
CaptureStdout();
|
2063
|
+
c.VoidMethod(false, 5, "Hi", nullptr, Printable(), Unprintable());
|
2064
|
+
const std::string output = GetCapturedStdout();
|
2065
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "GMOCK WARNING", output);
|
2066
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "Stack trace:", output);
|
2067
|
+
|
2068
|
+
# ifndef NDEBUG
|
2069
|
+
|
2070
|
+
// We check the stack trace content in dbg-mode only, as opt-mode
|
2071
|
+
// may inline the call we are interested in seeing.
|
2072
|
+
|
2073
|
+
// Verifies that a void mock function's name appears in the stack
|
2074
|
+
// trace.
|
2075
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "VoidMethod(", output);
|
2076
|
+
|
2077
|
+
// Verifies that a non-void mock function's name appears in the
|
2078
|
+
// stack trace.
|
2079
|
+
CaptureStdout();
|
2080
|
+
c.NonVoidMethod();
|
2081
|
+
const std::string output2 = GetCapturedStdout();
|
2082
|
+
EXPECT_PRED_FORMAT2(IsSubstring, "NonVoidMethod(", output2);
|
2083
|
+
|
2084
|
+
# endif // NDEBUG
|
2085
|
+
}
|
2086
|
+
|
2087
|
+
// Tests that an uninteresting mock function call on a naggy mock
|
2088
|
+
// causes the function arguments and return value to be printed.
|
2089
|
+
TEST(FunctionCallMessageTest,
|
2090
|
+
UninterestingCallOnNaggyMockPrintsArgumentsAndReturnValue) {
|
2091
|
+
// A non-void mock function.
|
2092
|
+
NaggyMock<MockB> b;
|
2093
|
+
CaptureStdout();
|
2094
|
+
b.DoB();
|
2095
|
+
const std::string output1 = GetCapturedStdout();
|
2096
|
+
EXPECT_PRED_FORMAT2(
|
2097
|
+
IsSubstring,
|
2098
|
+
"Uninteresting mock function call - returning default value.\n"
|
2099
|
+
" Function call: DoB()\n"
|
2100
|
+
" Returns: 0\n", output1.c_str());
|
2101
|
+
// Makes sure the return value is printed.
|
2102
|
+
|
2103
|
+
// A void mock function.
|
2104
|
+
NaggyMock<MockC> c;
|
2105
|
+
CaptureStdout();
|
2106
|
+
c.VoidMethod(false, 5, "Hi", nullptr, Printable(), Unprintable());
|
2107
|
+
const std::string output2 = GetCapturedStdout();
|
2108
|
+
EXPECT_THAT(output2.c_str(),
|
2109
|
+
ContainsRegex(
|
2110
|
+
"Uninteresting mock function call - returning directly\\.\n"
|
2111
|
+
" Function call: VoidMethod"
|
2112
|
+
"\\(false, 5, \"Hi\", NULL, @.+ "
|
2113
|
+
"Printable, 4-byte object <00-00 00-00>\\)"));
|
2114
|
+
// A void function has no return value to print.
|
2115
|
+
}
|
2116
|
+
|
2117
|
+
// Tests how the --gmock_verbose flag affects Google Mock's output.
|
2118
|
+
|
2119
|
+
class GMockVerboseFlagTest : public VerboseFlagPreservingFixture {
|
2120
|
+
public:
|
2121
|
+
// Verifies that the given Google Mock output is correct. (When
|
2122
|
+
// should_print is true, the output should match the given regex and
|
2123
|
+
// contain the given function name in the stack trace. When it's
|
2124
|
+
// false, the output should be empty.)
|
2125
|
+
void VerifyOutput(const std::string& output, bool should_print,
|
2126
|
+
const std::string& expected_substring,
|
2127
|
+
const std::string& function_name) {
|
2128
|
+
if (should_print) {
|
2129
|
+
EXPECT_THAT(output.c_str(), HasSubstr(expected_substring));
|
2130
|
+
# ifndef NDEBUG
|
2131
|
+
// We check the stack trace content in dbg-mode only, as opt-mode
|
2132
|
+
// may inline the call we are interested in seeing.
|
2133
|
+
EXPECT_THAT(output.c_str(), HasSubstr(function_name));
|
2134
|
+
# else
|
2135
|
+
// Suppresses 'unused function parameter' warnings.
|
2136
|
+
static_cast<void>(function_name);
|
2137
|
+
# endif // NDEBUG
|
2138
|
+
} else {
|
2139
|
+
EXPECT_STREQ("", output.c_str());
|
2140
|
+
}
|
2141
|
+
}
|
2142
|
+
|
2143
|
+
// Tests how the flag affects expected calls.
|
2144
|
+
void TestExpectedCall(bool should_print) {
|
2145
|
+
MockA a;
|
2146
|
+
EXPECT_CALL(a, DoA(5));
|
2147
|
+
EXPECT_CALL(a, Binary(_, 1))
|
2148
|
+
.WillOnce(Return(true));
|
2149
|
+
|
2150
|
+
// A void-returning function.
|
2151
|
+
CaptureStdout();
|
2152
|
+
a.DoA(5);
|
2153
|
+
VerifyOutput(
|
2154
|
+
GetCapturedStdout(),
|
2155
|
+
should_print,
|
2156
|
+
"Mock function call matches EXPECT_CALL(a, DoA(5))...\n"
|
2157
|
+
" Function call: DoA(5)\n"
|
2158
|
+
"Stack trace:\n",
|
2159
|
+
"DoA");
|
2160
|
+
|
2161
|
+
// A non-void-returning function.
|
2162
|
+
CaptureStdout();
|
2163
|
+
a.Binary(2, 1);
|
2164
|
+
VerifyOutput(
|
2165
|
+
GetCapturedStdout(),
|
2166
|
+
should_print,
|
2167
|
+
"Mock function call matches EXPECT_CALL(a, Binary(_, 1))...\n"
|
2168
|
+
" Function call: Binary(2, 1)\n"
|
2169
|
+
" Returns: true\n"
|
2170
|
+
"Stack trace:\n",
|
2171
|
+
"Binary");
|
2172
|
+
}
|
2173
|
+
|
2174
|
+
// Tests how the flag affects uninteresting calls on a naggy mock.
|
2175
|
+
void TestUninterestingCallOnNaggyMock(bool should_print) {
|
2176
|
+
NaggyMock<MockA> a;
|
2177
|
+
const std::string note =
|
2178
|
+
"NOTE: You can safely ignore the above warning unless this "
|
2179
|
+
"call should not happen. Do not suppress it by blindly adding "
|
2180
|
+
"an EXPECT_CALL() if you don't mean to enforce the call. "
|
2181
|
+
"See "
|
2182
|
+
"https://github.com/google/googletest/blob/master/googlemock/docs/"
|
2183
|
+
"cook_book.md#"
|
2184
|
+
"knowing-when-to-expect for details.";
|
2185
|
+
|
2186
|
+
// A void-returning function.
|
2187
|
+
CaptureStdout();
|
2188
|
+
a.DoA(5);
|
2189
|
+
VerifyOutput(
|
2190
|
+
GetCapturedStdout(),
|
2191
|
+
should_print,
|
2192
|
+
"\nGMOCK WARNING:\n"
|
2193
|
+
"Uninteresting mock function call - returning directly.\n"
|
2194
|
+
" Function call: DoA(5)\n" +
|
2195
|
+
note,
|
2196
|
+
"DoA");
|
2197
|
+
|
2198
|
+
// A non-void-returning function.
|
2199
|
+
CaptureStdout();
|
2200
|
+
a.Binary(2, 1);
|
2201
|
+
VerifyOutput(
|
2202
|
+
GetCapturedStdout(),
|
2203
|
+
should_print,
|
2204
|
+
"\nGMOCK WARNING:\n"
|
2205
|
+
"Uninteresting mock function call - returning default value.\n"
|
2206
|
+
" Function call: Binary(2, 1)\n"
|
2207
|
+
" Returns: false\n" +
|
2208
|
+
note,
|
2209
|
+
"Binary");
|
2210
|
+
}
|
2211
|
+
};
|
2212
|
+
|
2213
|
+
// Tests that --gmock_verbose=info causes both expected and
|
2214
|
+
// uninteresting calls to be reported.
|
2215
|
+
TEST_F(GMockVerboseFlagTest, Info) {
|
2216
|
+
GMOCK_FLAG(verbose) = kInfoVerbosity;
|
2217
|
+
TestExpectedCall(true);
|
2218
|
+
TestUninterestingCallOnNaggyMock(true);
|
2219
|
+
}
|
2220
|
+
|
2221
|
+
// Tests that --gmock_verbose=warning causes uninteresting calls to be
|
2222
|
+
// reported.
|
2223
|
+
TEST_F(GMockVerboseFlagTest, Warning) {
|
2224
|
+
GMOCK_FLAG(verbose) = kWarningVerbosity;
|
2225
|
+
TestExpectedCall(false);
|
2226
|
+
TestUninterestingCallOnNaggyMock(true);
|
2227
|
+
}
|
2228
|
+
|
2229
|
+
// Tests that --gmock_verbose=warning causes neither expected nor
|
2230
|
+
// uninteresting calls to be reported.
|
2231
|
+
TEST_F(GMockVerboseFlagTest, Error) {
|
2232
|
+
GMOCK_FLAG(verbose) = kErrorVerbosity;
|
2233
|
+
TestExpectedCall(false);
|
2234
|
+
TestUninterestingCallOnNaggyMock(false);
|
2235
|
+
}
|
2236
|
+
|
2237
|
+
// Tests that --gmock_verbose=SOME_INVALID_VALUE has the same effect
|
2238
|
+
// as --gmock_verbose=warning.
|
2239
|
+
TEST_F(GMockVerboseFlagTest, InvalidFlagIsTreatedAsWarning) {
|
2240
|
+
GMOCK_FLAG(verbose) = "invalid"; // Treated as "warning".
|
2241
|
+
TestExpectedCall(false);
|
2242
|
+
TestUninterestingCallOnNaggyMock(true);
|
2243
|
+
}
|
2244
|
+
|
2245
|
+
#endif // GTEST_HAS_STREAM_REDIRECTION
|
2246
|
+
|
2247
|
+
// A helper class that generates a failure when printed. We use it to
|
2248
|
+
// ensure that Google Mock doesn't print a value (even to an internal
|
2249
|
+
// buffer) when it is not supposed to do so.
|
2250
|
+
class PrintMeNot {};
|
2251
|
+
|
2252
|
+
void PrintTo(PrintMeNot /* dummy */, ::std::ostream* /* os */) {
|
2253
|
+
ADD_FAILURE() << "Google Mock is printing a value that shouldn't be "
|
2254
|
+
<< "printed even to an internal buffer.";
|
2255
|
+
}
|
2256
|
+
|
2257
|
+
class LogTestHelper {
|
2258
|
+
public:
|
2259
|
+
LogTestHelper() {}
|
2260
|
+
|
2261
|
+
MOCK_METHOD1(Foo, PrintMeNot(PrintMeNot));
|
2262
|
+
|
2263
|
+
private:
|
2264
|
+
GTEST_DISALLOW_COPY_AND_ASSIGN_(LogTestHelper);
|
2265
|
+
};
|
2266
|
+
|
2267
|
+
class GMockLogTest : public VerboseFlagPreservingFixture {
|
2268
|
+
protected:
|
2269
|
+
LogTestHelper helper_;
|
2270
|
+
};
|
2271
|
+
|
2272
|
+
TEST_F(GMockLogTest, DoesNotPrintGoodCallInternallyIfVerbosityIsWarning) {
|
2273
|
+
GMOCK_FLAG(verbose) = kWarningVerbosity;
|
2274
|
+
EXPECT_CALL(helper_, Foo(_))
|
2275
|
+
.WillOnce(Return(PrintMeNot()));
|
2276
|
+
helper_.Foo(PrintMeNot()); // This is an expected call.
|
2277
|
+
}
|
2278
|
+
|
2279
|
+
TEST_F(GMockLogTest, DoesNotPrintGoodCallInternallyIfVerbosityIsError) {
|
2280
|
+
GMOCK_FLAG(verbose) = kErrorVerbosity;
|
2281
|
+
EXPECT_CALL(helper_, Foo(_))
|
2282
|
+
.WillOnce(Return(PrintMeNot()));
|
2283
|
+
helper_.Foo(PrintMeNot()); // This is an expected call.
|
2284
|
+
}
|
2285
|
+
|
2286
|
+
TEST_F(GMockLogTest, DoesNotPrintWarningInternallyIfVerbosityIsError) {
|
2287
|
+
GMOCK_FLAG(verbose) = kErrorVerbosity;
|
2288
|
+
ON_CALL(helper_, Foo(_))
|
2289
|
+
.WillByDefault(Return(PrintMeNot()));
|
2290
|
+
helper_.Foo(PrintMeNot()); // This should generate a warning.
|
2291
|
+
}
|
2292
|
+
|
2293
|
+
// Tests Mock::AllowLeak().
|
2294
|
+
|
2295
|
+
TEST(AllowLeakTest, AllowsLeakingUnusedMockObject) {
|
2296
|
+
MockA* a = new MockA;
|
2297
|
+
Mock::AllowLeak(a);
|
2298
|
+
}
|
2299
|
+
|
2300
|
+
TEST(AllowLeakTest, CanBeCalledBeforeOnCall) {
|
2301
|
+
MockA* a = new MockA;
|
2302
|
+
Mock::AllowLeak(a);
|
2303
|
+
ON_CALL(*a, DoA(_)).WillByDefault(Return());
|
2304
|
+
a->DoA(0);
|
2305
|
+
}
|
2306
|
+
|
2307
|
+
TEST(AllowLeakTest, CanBeCalledAfterOnCall) {
|
2308
|
+
MockA* a = new MockA;
|
2309
|
+
ON_CALL(*a, DoA(_)).WillByDefault(Return());
|
2310
|
+
Mock::AllowLeak(a);
|
2311
|
+
}
|
2312
|
+
|
2313
|
+
TEST(AllowLeakTest, CanBeCalledBeforeExpectCall) {
|
2314
|
+
MockA* a = new MockA;
|
2315
|
+
Mock::AllowLeak(a);
|
2316
|
+
EXPECT_CALL(*a, DoA(_));
|
2317
|
+
a->DoA(0);
|
2318
|
+
}
|
2319
|
+
|
2320
|
+
TEST(AllowLeakTest, CanBeCalledAfterExpectCall) {
|
2321
|
+
MockA* a = new MockA;
|
2322
|
+
EXPECT_CALL(*a, DoA(_)).Times(AnyNumber());
|
2323
|
+
Mock::AllowLeak(a);
|
2324
|
+
}
|
2325
|
+
|
2326
|
+
TEST(AllowLeakTest, WorksWhenBothOnCallAndExpectCallArePresent) {
|
2327
|
+
MockA* a = new MockA;
|
2328
|
+
ON_CALL(*a, DoA(_)).WillByDefault(Return());
|
2329
|
+
EXPECT_CALL(*a, DoA(_)).Times(AnyNumber());
|
2330
|
+
Mock::AllowLeak(a);
|
2331
|
+
}
|
2332
|
+
|
2333
|
+
// Tests that we can verify and clear a mock object's expectations
|
2334
|
+
// when none of its methods has expectations.
|
2335
|
+
TEST(VerifyAndClearExpectationsTest, NoMethodHasExpectations) {
|
2336
|
+
MockB b;
|
2337
|
+
ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b));
|
2338
|
+
|
2339
|
+
// There should be no expectations on the methods now, so we can
|
2340
|
+
// freely call them.
|
2341
|
+
EXPECT_EQ(0, b.DoB());
|
2342
|
+
EXPECT_EQ(0, b.DoB(1));
|
2343
|
+
}
|
2344
|
+
|
2345
|
+
// Tests that we can verify and clear a mock object's expectations
|
2346
|
+
// when some, but not all, of its methods have expectations *and* the
|
2347
|
+
// verification succeeds.
|
2348
|
+
TEST(VerifyAndClearExpectationsTest, SomeMethodsHaveExpectationsAndSucceed) {
|
2349
|
+
MockB b;
|
2350
|
+
EXPECT_CALL(b, DoB())
|
2351
|
+
.WillOnce(Return(1));
|
2352
|
+
b.DoB();
|
2353
|
+
ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b));
|
2354
|
+
|
2355
|
+
// There should be no expectations on the methods now, so we can
|
2356
|
+
// freely call them.
|
2357
|
+
EXPECT_EQ(0, b.DoB());
|
2358
|
+
EXPECT_EQ(0, b.DoB(1));
|
2359
|
+
}
|
2360
|
+
|
2361
|
+
// Tests that we can verify and clear a mock object's expectations
|
2362
|
+
// when some, but not all, of its methods have expectations *and* the
|
2363
|
+
// verification fails.
|
2364
|
+
TEST(VerifyAndClearExpectationsTest, SomeMethodsHaveExpectationsAndFail) {
|
2365
|
+
MockB b;
|
2366
|
+
EXPECT_CALL(b, DoB())
|
2367
|
+
.WillOnce(Return(1));
|
2368
|
+
bool result = true;
|
2369
|
+
EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClearExpectations(&b),
|
2370
|
+
"Actual: never called");
|
2371
|
+
ASSERT_FALSE(result);
|
2372
|
+
|
2373
|
+
// There should be no expectations on the methods now, so we can
|
2374
|
+
// freely call them.
|
2375
|
+
EXPECT_EQ(0, b.DoB());
|
2376
|
+
EXPECT_EQ(0, b.DoB(1));
|
2377
|
+
}
|
2378
|
+
|
2379
|
+
// Tests that we can verify and clear a mock object's expectations
|
2380
|
+
// when all of its methods have expectations.
|
2381
|
+
TEST(VerifyAndClearExpectationsTest, AllMethodsHaveExpectations) {
|
2382
|
+
MockB b;
|
2383
|
+
EXPECT_CALL(b, DoB())
|
2384
|
+
.WillOnce(Return(1));
|
2385
|
+
EXPECT_CALL(b, DoB(_))
|
2386
|
+
.WillOnce(Return(2));
|
2387
|
+
b.DoB();
|
2388
|
+
b.DoB(1);
|
2389
|
+
ASSERT_TRUE(Mock::VerifyAndClearExpectations(&b));
|
2390
|
+
|
2391
|
+
// There should be no expectations on the methods now, so we can
|
2392
|
+
// freely call them.
|
2393
|
+
EXPECT_EQ(0, b.DoB());
|
2394
|
+
EXPECT_EQ(0, b.DoB(1));
|
2395
|
+
}
|
2396
|
+
|
2397
|
+
// Tests that we can verify and clear a mock object's expectations
|
2398
|
+
// when a method has more than one expectation.
|
2399
|
+
TEST(VerifyAndClearExpectationsTest, AMethodHasManyExpectations) {
|
2400
|
+
MockB b;
|
2401
|
+
EXPECT_CALL(b, DoB(0))
|
2402
|
+
.WillOnce(Return(1));
|
2403
|
+
EXPECT_CALL(b, DoB(_))
|
2404
|
+
.WillOnce(Return(2));
|
2405
|
+
b.DoB(1);
|
2406
|
+
bool result = true;
|
2407
|
+
EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClearExpectations(&b),
|
2408
|
+
"Actual: never called");
|
2409
|
+
ASSERT_FALSE(result);
|
2410
|
+
|
2411
|
+
// There should be no expectations on the methods now, so we can
|
2412
|
+
// freely call them.
|
2413
|
+
EXPECT_EQ(0, b.DoB());
|
2414
|
+
EXPECT_EQ(0, b.DoB(1));
|
2415
|
+
}
|
2416
|
+
|
2417
|
+
// Tests that we can call VerifyAndClearExpectations() on the same
|
2418
|
+
// mock object multiple times.
|
2419
|
+
TEST(VerifyAndClearExpectationsTest, CanCallManyTimes) {
|
2420
|
+
MockB b;
|
2421
|
+
EXPECT_CALL(b, DoB());
|
2422
|
+
b.DoB();
|
2423
|
+
Mock::VerifyAndClearExpectations(&b);
|
2424
|
+
|
2425
|
+
EXPECT_CALL(b, DoB(_))
|
2426
|
+
.WillOnce(Return(1));
|
2427
|
+
b.DoB(1);
|
2428
|
+
Mock::VerifyAndClearExpectations(&b);
|
2429
|
+
Mock::VerifyAndClearExpectations(&b);
|
2430
|
+
|
2431
|
+
// There should be no expectations on the methods now, so we can
|
2432
|
+
// freely call them.
|
2433
|
+
EXPECT_EQ(0, b.DoB());
|
2434
|
+
EXPECT_EQ(0, b.DoB(1));
|
2435
|
+
}
|
2436
|
+
|
2437
|
+
// Tests that we can clear a mock object's default actions when none
|
2438
|
+
// of its methods has default actions.
|
2439
|
+
TEST(VerifyAndClearTest, NoMethodHasDefaultActions) {
|
2440
|
+
MockB b;
|
2441
|
+
// If this crashes or generates a failure, the test will catch it.
|
2442
|
+
Mock::VerifyAndClear(&b);
|
2443
|
+
EXPECT_EQ(0, b.DoB());
|
2444
|
+
}
|
2445
|
+
|
2446
|
+
// Tests that we can clear a mock object's default actions when some,
|
2447
|
+
// but not all of its methods have default actions.
|
2448
|
+
TEST(VerifyAndClearTest, SomeMethodsHaveDefaultActions) {
|
2449
|
+
MockB b;
|
2450
|
+
ON_CALL(b, DoB())
|
2451
|
+
.WillByDefault(Return(1));
|
2452
|
+
|
2453
|
+
Mock::VerifyAndClear(&b);
|
2454
|
+
|
2455
|
+
// Verifies that the default action of int DoB() was removed.
|
2456
|
+
EXPECT_EQ(0, b.DoB());
|
2457
|
+
}
|
2458
|
+
|
2459
|
+
// Tests that we can clear a mock object's default actions when all of
|
2460
|
+
// its methods have default actions.
|
2461
|
+
TEST(VerifyAndClearTest, AllMethodsHaveDefaultActions) {
|
2462
|
+
MockB b;
|
2463
|
+
ON_CALL(b, DoB())
|
2464
|
+
.WillByDefault(Return(1));
|
2465
|
+
ON_CALL(b, DoB(_))
|
2466
|
+
.WillByDefault(Return(2));
|
2467
|
+
|
2468
|
+
Mock::VerifyAndClear(&b);
|
2469
|
+
|
2470
|
+
// Verifies that the default action of int DoB() was removed.
|
2471
|
+
EXPECT_EQ(0, b.DoB());
|
2472
|
+
|
2473
|
+
// Verifies that the default action of int DoB(int) was removed.
|
2474
|
+
EXPECT_EQ(0, b.DoB(0));
|
2475
|
+
}
|
2476
|
+
|
2477
|
+
// Tests that we can clear a mock object's default actions when a
|
2478
|
+
// method has more than one ON_CALL() set on it.
|
2479
|
+
TEST(VerifyAndClearTest, AMethodHasManyDefaultActions) {
|
2480
|
+
MockB b;
|
2481
|
+
ON_CALL(b, DoB(0))
|
2482
|
+
.WillByDefault(Return(1));
|
2483
|
+
ON_CALL(b, DoB(_))
|
2484
|
+
.WillByDefault(Return(2));
|
2485
|
+
|
2486
|
+
Mock::VerifyAndClear(&b);
|
2487
|
+
|
2488
|
+
// Verifies that the default actions (there are two) of int DoB(int)
|
2489
|
+
// were removed.
|
2490
|
+
EXPECT_EQ(0, b.DoB(0));
|
2491
|
+
EXPECT_EQ(0, b.DoB(1));
|
2492
|
+
}
|
2493
|
+
|
2494
|
+
// Tests that we can call VerifyAndClear() on a mock object multiple
|
2495
|
+
// times.
|
2496
|
+
TEST(VerifyAndClearTest, CanCallManyTimes) {
|
2497
|
+
MockB b;
|
2498
|
+
ON_CALL(b, DoB())
|
2499
|
+
.WillByDefault(Return(1));
|
2500
|
+
Mock::VerifyAndClear(&b);
|
2501
|
+
Mock::VerifyAndClear(&b);
|
2502
|
+
|
2503
|
+
ON_CALL(b, DoB(_))
|
2504
|
+
.WillByDefault(Return(1));
|
2505
|
+
Mock::VerifyAndClear(&b);
|
2506
|
+
|
2507
|
+
EXPECT_EQ(0, b.DoB());
|
2508
|
+
EXPECT_EQ(0, b.DoB(1));
|
2509
|
+
}
|
2510
|
+
|
2511
|
+
// Tests that VerifyAndClear() works when the verification succeeds.
|
2512
|
+
TEST(VerifyAndClearTest, Success) {
|
2513
|
+
MockB b;
|
2514
|
+
ON_CALL(b, DoB())
|
2515
|
+
.WillByDefault(Return(1));
|
2516
|
+
EXPECT_CALL(b, DoB(1))
|
2517
|
+
.WillOnce(Return(2));
|
2518
|
+
|
2519
|
+
b.DoB();
|
2520
|
+
b.DoB(1);
|
2521
|
+
ASSERT_TRUE(Mock::VerifyAndClear(&b));
|
2522
|
+
|
2523
|
+
// There should be no expectations on the methods now, so we can
|
2524
|
+
// freely call them.
|
2525
|
+
EXPECT_EQ(0, b.DoB());
|
2526
|
+
EXPECT_EQ(0, b.DoB(1));
|
2527
|
+
}
|
2528
|
+
|
2529
|
+
// Tests that VerifyAndClear() works when the verification fails.
|
2530
|
+
TEST(VerifyAndClearTest, Failure) {
|
2531
|
+
MockB b;
|
2532
|
+
ON_CALL(b, DoB(_))
|
2533
|
+
.WillByDefault(Return(1));
|
2534
|
+
EXPECT_CALL(b, DoB())
|
2535
|
+
.WillOnce(Return(2));
|
2536
|
+
|
2537
|
+
b.DoB(1);
|
2538
|
+
bool result = true;
|
2539
|
+
EXPECT_NONFATAL_FAILURE(result = Mock::VerifyAndClear(&b),
|
2540
|
+
"Actual: never called");
|
2541
|
+
ASSERT_FALSE(result);
|
2542
|
+
|
2543
|
+
// There should be no expectations on the methods now, so we can
|
2544
|
+
// freely call them.
|
2545
|
+
EXPECT_EQ(0, b.DoB());
|
2546
|
+
EXPECT_EQ(0, b.DoB(1));
|
2547
|
+
}
|
2548
|
+
|
2549
|
+
// Tests that VerifyAndClear() works when the default actions and
|
2550
|
+
// expectations are set on a const mock object.
|
2551
|
+
TEST(VerifyAndClearTest, Const) {
|
2552
|
+
MockB b;
|
2553
|
+
ON_CALL(Const(b), DoB())
|
2554
|
+
.WillByDefault(Return(1));
|
2555
|
+
|
2556
|
+
EXPECT_CALL(Const(b), DoB())
|
2557
|
+
.WillOnce(DoDefault())
|
2558
|
+
.WillOnce(Return(2));
|
2559
|
+
|
2560
|
+
b.DoB();
|
2561
|
+
b.DoB();
|
2562
|
+
ASSERT_TRUE(Mock::VerifyAndClear(&b));
|
2563
|
+
|
2564
|
+
// There should be no expectations on the methods now, so we can
|
2565
|
+
// freely call them.
|
2566
|
+
EXPECT_EQ(0, b.DoB());
|
2567
|
+
EXPECT_EQ(0, b.DoB(1));
|
2568
|
+
}
|
2569
|
+
|
2570
|
+
// Tests that we can set default actions and expectations on a mock
|
2571
|
+
// object after VerifyAndClear() has been called on it.
|
2572
|
+
TEST(VerifyAndClearTest, CanSetDefaultActionsAndExpectationsAfterwards) {
|
2573
|
+
MockB b;
|
2574
|
+
ON_CALL(b, DoB())
|
2575
|
+
.WillByDefault(Return(1));
|
2576
|
+
EXPECT_CALL(b, DoB(_))
|
2577
|
+
.WillOnce(Return(2));
|
2578
|
+
b.DoB(1);
|
2579
|
+
|
2580
|
+
Mock::VerifyAndClear(&b);
|
2581
|
+
|
2582
|
+
EXPECT_CALL(b, DoB())
|
2583
|
+
.WillOnce(Return(3));
|
2584
|
+
ON_CALL(b, DoB(_))
|
2585
|
+
.WillByDefault(Return(4));
|
2586
|
+
|
2587
|
+
EXPECT_EQ(3, b.DoB());
|
2588
|
+
EXPECT_EQ(4, b.DoB(1));
|
2589
|
+
}
|
2590
|
+
|
2591
|
+
// Tests that calling VerifyAndClear() on one mock object does not
|
2592
|
+
// affect other mock objects (either of the same type or not).
|
2593
|
+
TEST(VerifyAndClearTest, DoesNotAffectOtherMockObjects) {
|
2594
|
+
MockA a;
|
2595
|
+
MockB b1;
|
2596
|
+
MockB b2;
|
2597
|
+
|
2598
|
+
ON_CALL(a, Binary(_, _))
|
2599
|
+
.WillByDefault(Return(true));
|
2600
|
+
EXPECT_CALL(a, Binary(_, _))
|
2601
|
+
.WillOnce(DoDefault())
|
2602
|
+
.WillOnce(Return(false));
|
2603
|
+
|
2604
|
+
ON_CALL(b1, DoB())
|
2605
|
+
.WillByDefault(Return(1));
|
2606
|
+
EXPECT_CALL(b1, DoB(_))
|
2607
|
+
.WillOnce(Return(2));
|
2608
|
+
|
2609
|
+
ON_CALL(b2, DoB())
|
2610
|
+
.WillByDefault(Return(3));
|
2611
|
+
EXPECT_CALL(b2, DoB(_));
|
2612
|
+
|
2613
|
+
b2.DoB(0);
|
2614
|
+
Mock::VerifyAndClear(&b2);
|
2615
|
+
|
2616
|
+
// Verifies that the default actions and expectations of a and b1
|
2617
|
+
// are still in effect.
|
2618
|
+
EXPECT_TRUE(a.Binary(0, 0));
|
2619
|
+
EXPECT_FALSE(a.Binary(0, 0));
|
2620
|
+
|
2621
|
+
EXPECT_EQ(1, b1.DoB());
|
2622
|
+
EXPECT_EQ(2, b1.DoB(0));
|
2623
|
+
}
|
2624
|
+
|
2625
|
+
TEST(VerifyAndClearTest,
|
2626
|
+
DestroyingChainedMocksDoesNotDeadlockThroughExpectations) {
|
2627
|
+
std::shared_ptr<MockA> a(new MockA);
|
2628
|
+
ReferenceHoldingMock test_mock;
|
2629
|
+
|
2630
|
+
// EXPECT_CALL stores a reference to a inside test_mock.
|
2631
|
+
EXPECT_CALL(test_mock, AcceptReference(_))
|
2632
|
+
.WillRepeatedly(SetArgPointee<0>(a));
|
2633
|
+
|
2634
|
+
// Throw away the reference to the mock that we have in a. After this, the
|
2635
|
+
// only reference to it is stored by test_mock.
|
2636
|
+
a.reset();
|
2637
|
+
|
2638
|
+
// When test_mock goes out of scope, it destroys the last remaining reference
|
2639
|
+
// to the mock object originally pointed to by a. This will cause the MockA
|
2640
|
+
// destructor to be called from inside the ReferenceHoldingMock destructor.
|
2641
|
+
// The state of all mocks is protected by a single global lock, but there
|
2642
|
+
// should be no deadlock.
|
2643
|
+
}
|
2644
|
+
|
2645
|
+
TEST(VerifyAndClearTest,
|
2646
|
+
DestroyingChainedMocksDoesNotDeadlockThroughDefaultAction) {
|
2647
|
+
std::shared_ptr<MockA> a(new MockA);
|
2648
|
+
ReferenceHoldingMock test_mock;
|
2649
|
+
|
2650
|
+
// ON_CALL stores a reference to a inside test_mock.
|
2651
|
+
ON_CALL(test_mock, AcceptReference(_))
|
2652
|
+
.WillByDefault(SetArgPointee<0>(a));
|
2653
|
+
|
2654
|
+
// Throw away the reference to the mock that we have in a. After this, the
|
2655
|
+
// only reference to it is stored by test_mock.
|
2656
|
+
a.reset();
|
2657
|
+
|
2658
|
+
// When test_mock goes out of scope, it destroys the last remaining reference
|
2659
|
+
// to the mock object originally pointed to by a. This will cause the MockA
|
2660
|
+
// destructor to be called from inside the ReferenceHoldingMock destructor.
|
2661
|
+
// The state of all mocks is protected by a single global lock, but there
|
2662
|
+
// should be no deadlock.
|
2663
|
+
}
|
2664
|
+
|
2665
|
+
// Tests that a mock function's action can call a mock function
|
2666
|
+
// (either the same function or a different one) either as an explicit
|
2667
|
+
// action or as a default action without causing a dead lock. It
|
2668
|
+
// verifies that the action is not performed inside the critical
|
2669
|
+
// section.
|
2670
|
+
TEST(SynchronizationTest, CanCallMockMethodInAction) {
|
2671
|
+
MockA a;
|
2672
|
+
MockC c;
|
2673
|
+
ON_CALL(a, DoA(_))
|
2674
|
+
.WillByDefault(IgnoreResult(InvokeWithoutArgs(&c,
|
2675
|
+
&MockC::NonVoidMethod)));
|
2676
|
+
EXPECT_CALL(a, DoA(1));
|
2677
|
+
EXPECT_CALL(a, DoA(1))
|
2678
|
+
.WillOnce(Invoke(&a, &MockA::DoA))
|
2679
|
+
.RetiresOnSaturation();
|
2680
|
+
EXPECT_CALL(c, NonVoidMethod());
|
2681
|
+
|
2682
|
+
a.DoA(1);
|
2683
|
+
// This will match the second EXPECT_CALL() and trigger another a.DoA(1),
|
2684
|
+
// which will in turn match the first EXPECT_CALL() and trigger a call to
|
2685
|
+
// c.NonVoidMethod() that was specified by the ON_CALL() since the first
|
2686
|
+
// EXPECT_CALL() did not specify an action.
|
2687
|
+
}
|
2688
|
+
|
2689
|
+
TEST(ParameterlessExpectationsTest, CanSetExpectationsWithoutMatchers) {
|
2690
|
+
MockA a;
|
2691
|
+
int do_a_arg0 = 0;
|
2692
|
+
ON_CALL(a, DoA).WillByDefault(SaveArg<0>(&do_a_arg0));
|
2693
|
+
int do_a_47_arg0 = 0;
|
2694
|
+
ON_CALL(a, DoA(47)).WillByDefault(SaveArg<0>(&do_a_47_arg0));
|
2695
|
+
|
2696
|
+
a.DoA(17);
|
2697
|
+
EXPECT_THAT(do_a_arg0, 17);
|
2698
|
+
EXPECT_THAT(do_a_47_arg0, 0);
|
2699
|
+
a.DoA(47);
|
2700
|
+
EXPECT_THAT(do_a_arg0, 17);
|
2701
|
+
EXPECT_THAT(do_a_47_arg0, 47);
|
2702
|
+
|
2703
|
+
ON_CALL(a, Binary).WillByDefault(Return(true));
|
2704
|
+
ON_CALL(a, Binary(_, 14)).WillByDefault(Return(false));
|
2705
|
+
EXPECT_THAT(a.Binary(14, 17), true);
|
2706
|
+
EXPECT_THAT(a.Binary(17, 14), false);
|
2707
|
+
}
|
2708
|
+
|
2709
|
+
TEST(ParameterlessExpectationsTest, CanSetExpectationsForOverloadedMethods) {
|
2710
|
+
MockB b;
|
2711
|
+
ON_CALL(b, DoB()).WillByDefault(Return(9));
|
2712
|
+
ON_CALL(b, DoB(5)).WillByDefault(Return(11));
|
2713
|
+
|
2714
|
+
EXPECT_THAT(b.DoB(), 9);
|
2715
|
+
EXPECT_THAT(b.DoB(1), 0); // default value
|
2716
|
+
EXPECT_THAT(b.DoB(5), 11);
|
2717
|
+
}
|
2718
|
+
|
2719
|
+
struct MockWithConstMethods {
|
2720
|
+
public:
|
2721
|
+
MOCK_CONST_METHOD1(Foo, int(int));
|
2722
|
+
MOCK_CONST_METHOD2(Bar, int(int, const char*));
|
2723
|
+
};
|
2724
|
+
|
2725
|
+
TEST(ParameterlessExpectationsTest, CanSetExpectationsForConstMethods) {
|
2726
|
+
MockWithConstMethods mock;
|
2727
|
+
ON_CALL(mock, Foo).WillByDefault(Return(7));
|
2728
|
+
ON_CALL(mock, Bar).WillByDefault(Return(33));
|
2729
|
+
|
2730
|
+
EXPECT_THAT(mock.Foo(17), 7);
|
2731
|
+
EXPECT_THAT(mock.Bar(27, "purple"), 33);
|
2732
|
+
}
|
2733
|
+
|
2734
|
+
class MockConstOverload {
|
2735
|
+
public:
|
2736
|
+
MOCK_METHOD1(Overloaded, int(int));
|
2737
|
+
MOCK_CONST_METHOD1(Overloaded, int(int));
|
2738
|
+
};
|
2739
|
+
|
2740
|
+
TEST(ParameterlessExpectationsTest,
|
2741
|
+
CanSetExpectationsForConstOverloadedMethods) {
|
2742
|
+
MockConstOverload mock;
|
2743
|
+
ON_CALL(mock, Overloaded(_)).WillByDefault(Return(7));
|
2744
|
+
ON_CALL(mock, Overloaded(5)).WillByDefault(Return(9));
|
2745
|
+
ON_CALL(Const(mock), Overloaded(5)).WillByDefault(Return(11));
|
2746
|
+
ON_CALL(Const(mock), Overloaded(7)).WillByDefault(Return(13));
|
2747
|
+
|
2748
|
+
EXPECT_THAT(mock.Overloaded(1), 7);
|
2749
|
+
EXPECT_THAT(mock.Overloaded(5), 9);
|
2750
|
+
EXPECT_THAT(mock.Overloaded(7), 7);
|
2751
|
+
|
2752
|
+
const MockConstOverload& const_mock = mock;
|
2753
|
+
EXPECT_THAT(const_mock.Overloaded(1), 0);
|
2754
|
+
EXPECT_THAT(const_mock.Overloaded(5), 11);
|
2755
|
+
EXPECT_THAT(const_mock.Overloaded(7), 13);
|
2756
|
+
}
|
2757
|
+
|
2758
|
+
} // namespace
|
2759
|
+
|
2760
|
+
// Allows the user to define their own main and then invoke gmock_main
|
2761
|
+
// from it. This might be necessary on some platforms which require
|
2762
|
+
// specific setup and teardown.
|
2763
|
+
#if GMOCK_RENAME_MAIN
|
2764
|
+
int gmock_main(int argc, char **argv) {
|
2765
|
+
#else
|
2766
|
+
int main(int argc, char **argv) {
|
2767
|
+
#endif // GMOCK_RENAME_MAIN
|
2768
|
+
testing::InitGoogleMock(&argc, argv);
|
2769
|
+
// Ensures that the tests pass no matter what value of
|
2770
|
+
// --gmock_catch_leaked_mocks and --gmock_verbose the user specifies.
|
2771
|
+
testing::GMOCK_FLAG(catch_leaked_mocks) = true;
|
2772
|
+
testing::GMOCK_FLAG(verbose) = testing::internal::kWarningVerbosity;
|
2773
|
+
|
2774
|
+
return RUN_ALL_TESTS();
|
2775
|
+
}
|