re2 1.22.2 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -4
- package/binding.gyp +5 -1
- package/lib/addon.cc +4 -0
- package/lib/new.cc +1 -246
- package/lib/pattern.cc +252 -0
- package/lib/pattern.h +10 -0
- package/lib/set.cc +777 -0
- package/lib/wrapped_re2_set.h +42 -0
- package/package.json +21 -9
- package/re2.d.ts +46 -9
- package/vendor/abseil-cpp/CMake/AbseilDll.cmake +14 -24
- package/vendor/abseil-cpp/CMake/AbseilHelpers.cmake +3 -3
- package/vendor/abseil-cpp/CMake/README.md +2 -2
- package/vendor/abseil-cpp/CMakeLists.txt +3 -3
- package/vendor/abseil-cpp/MODULE.bazel +6 -9
- package/vendor/abseil-cpp/README.md +6 -8
- package/vendor/abseil-cpp/absl/abseil.podspec.gen.py +6 -4
- package/vendor/abseil-cpp/absl/algorithm/BUILD.bazel +3 -0
- package/vendor/abseil-cpp/absl/algorithm/CMakeLists.txt +1 -0
- package/vendor/abseil-cpp/absl/algorithm/container.h +2 -19
- package/vendor/abseil-cpp/absl/algorithm/container_test.cc +4 -11
- package/vendor/abseil-cpp/absl/base/BUILD.bazel +60 -45
- package/vendor/abseil-cpp/absl/base/CMakeLists.txt +57 -38
- package/vendor/abseil-cpp/absl/base/attributes.h +76 -7
- package/vendor/abseil-cpp/absl/base/attributes_test.cc +43 -0
- package/vendor/abseil-cpp/absl/base/call_once.h +11 -12
- package/vendor/abseil-cpp/absl/base/config.h +22 -129
- package/vendor/abseil-cpp/absl/base/exception_safety_testing_test.cc +0 -4
- package/vendor/abseil-cpp/absl/base/{internal/fast_type_id.h → fast_type_id.h} +11 -16
- package/vendor/abseil-cpp/absl/base/{internal/fast_type_id_test.cc → fast_type_id_test.cc} +34 -30
- package/vendor/abseil-cpp/absl/base/internal/cycleclock.cc +0 -5
- package/vendor/abseil-cpp/absl/base/internal/cycleclock_config.h +7 -7
- package/vendor/abseil-cpp/absl/base/internal/endian.h +34 -38
- package/vendor/abseil-cpp/absl/base/internal/iterator_traits.h +71 -0
- package/vendor/abseil-cpp/absl/base/internal/iterator_traits_test.cc +85 -0
- package/vendor/abseil-cpp/absl/base/internal/iterator_traits_test_helper.h +97 -0
- package/vendor/abseil-cpp/absl/base/internal/low_level_alloc.cc +39 -9
- package/vendor/abseil-cpp/absl/base/internal/low_level_alloc.h +6 -0
- package/vendor/abseil-cpp/absl/base/internal/poison.cc +7 -6
- package/vendor/abseil-cpp/absl/base/internal/spinlock.cc +15 -28
- package/vendor/abseil-cpp/absl/base/internal/spinlock.h +65 -35
- package/vendor/abseil-cpp/absl/base/internal/spinlock_benchmark.cc +2 -2
- package/vendor/abseil-cpp/absl/base/internal/sysinfo_test.cc +2 -2
- package/vendor/abseil-cpp/absl/base/internal/thread_identity_benchmark.cc +1 -1
- package/vendor/abseil-cpp/absl/base/internal/thread_identity_test.cc +4 -4
- package/vendor/abseil-cpp/absl/base/internal/unaligned_access.h +6 -6
- package/vendor/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +4 -0
- package/vendor/abseil-cpp/absl/base/internal/unscaledcycleclock.h +8 -3
- package/vendor/abseil-cpp/absl/base/no_destructor.h +11 -32
- package/vendor/abseil-cpp/absl/base/no_destructor_test.cc +0 -4
- package/vendor/abseil-cpp/absl/base/nullability.h +83 -72
- package/vendor/abseil-cpp/absl/base/nullability_test.cc +25 -64
- package/vendor/abseil-cpp/absl/base/options.h +3 -80
- package/vendor/abseil-cpp/absl/base/policy_checks.h +7 -7
- package/vendor/abseil-cpp/absl/base/raw_logging_test.cc +15 -0
- package/vendor/abseil-cpp/absl/base/spinlock_test_common.cc +50 -30
- package/vendor/abseil-cpp/absl/cleanup/BUILD.bazel +2 -1
- package/vendor/abseil-cpp/absl/cleanup/CMakeLists.txt +0 -1
- package/vendor/abseil-cpp/absl/cleanup/cleanup.h +1 -3
- package/vendor/abseil-cpp/absl/cleanup/cleanup_test.cc +0 -2
- package/vendor/abseil-cpp/absl/cleanup/internal/cleanup.h +3 -4
- package/vendor/abseil-cpp/absl/container/BUILD.bazel +74 -1
- package/vendor/abseil-cpp/absl/container/CMakeLists.txt +73 -0
- package/vendor/abseil-cpp/absl/container/btree_benchmark.cc +51 -9
- package/vendor/abseil-cpp/absl/container/btree_map.h +8 -6
- package/vendor/abseil-cpp/absl/container/btree_set.h +8 -6
- package/vendor/abseil-cpp/absl/container/btree_test.cc +89 -4
- package/vendor/abseil-cpp/absl/container/fixed_array.h +7 -15
- package/vendor/abseil-cpp/absl/container/fixed_array_test.cc +17 -0
- package/vendor/abseil-cpp/absl/container/flat_hash_map.h +20 -15
- package/vendor/abseil-cpp/absl/container/flat_hash_map_test.cc +8 -14
- package/vendor/abseil-cpp/absl/container/flat_hash_set.h +19 -14
- package/vendor/abseil-cpp/absl/container/flat_hash_set_test.cc +46 -0
- package/vendor/abseil-cpp/absl/container/inlined_vector.h +7 -6
- package/vendor/abseil-cpp/absl/container/inlined_vector_test.cc +28 -0
- package/vendor/abseil-cpp/absl/container/internal/btree.h +132 -29
- package/vendor/abseil-cpp/absl/container/internal/btree_container.h +175 -71
- package/vendor/abseil-cpp/absl/container/internal/common.h +43 -0
- package/vendor/abseil-cpp/absl/container/internal/common_policy_traits.h +1 -2
- package/vendor/abseil-cpp/absl/container/internal/compressed_tuple.h +28 -24
- package/vendor/abseil-cpp/absl/container/internal/compressed_tuple_test.cc +4 -17
- package/vendor/abseil-cpp/absl/container/internal/container_memory.h +80 -17
- package/vendor/abseil-cpp/absl/container/internal/container_memory_test.cc +32 -2
- package/vendor/abseil-cpp/absl/container/internal/hash_function_defaults.h +13 -8
- package/vendor/abseil-cpp/absl/container/internal/hash_function_defaults_test.cc +1 -52
- package/vendor/abseil-cpp/absl/container/internal/hash_generator_testing.cc +9 -31
- package/vendor/abseil-cpp/absl/container/internal/hash_generator_testing.h +23 -32
- package/vendor/abseil-cpp/absl/container/internal/hash_policy_testing.h +5 -1
- package/vendor/abseil-cpp/absl/container/internal/hash_policy_traits.h +11 -23
- package/vendor/abseil-cpp/absl/container/internal/hash_policy_traits_test.cc +14 -9
- package/vendor/abseil-cpp/absl/container/internal/hashtable_control_bytes.h +516 -0
- package/vendor/abseil-cpp/absl/container/internal/hashtable_control_bytes_test.cc +259 -0
- package/vendor/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +23 -6
- package/vendor/abseil-cpp/absl/container/internal/hashtablez_sampler.h +32 -13
- package/vendor/abseil-cpp/absl/container/internal/hashtablez_sampler_test.cc +8 -8
- package/vendor/abseil-cpp/absl/container/internal/inlined_vector.h +2 -7
- package/vendor/abseil-cpp/absl/container/internal/layout.h +26 -42
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_map.h +199 -68
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set.cc +1506 -213
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set.h +1095 -1658
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_allocator_test.cc +3 -2
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_benchmark.cc +31 -29
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_probe_benchmark.cc +51 -20
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl.h +79 -0
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl_test.cc +66 -0
- package/vendor/abseil-cpp/absl/container/internal/raw_hash_set_test.cc +707 -363
- package/vendor/abseil-cpp/absl/container/node_hash_map.h +20 -15
- package/vendor/abseil-cpp/absl/container/node_hash_map_test.cc +0 -3
- package/vendor/abseil-cpp/absl/container/node_hash_set.h +18 -13
- package/vendor/abseil-cpp/absl/container/sample_element_size_test.cc +3 -8
- package/vendor/abseil-cpp/absl/copts/AbseilConfigureCopts.cmake +1 -1
- package/vendor/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake +9 -20
- package/vendor/abseil-cpp/absl/copts/GENERATED_copts.bzl +9 -20
- package/vendor/abseil-cpp/absl/copts/copts.py +24 -15
- package/vendor/abseil-cpp/absl/crc/BUILD.bazel +3 -0
- package/vendor/abseil-cpp/absl/crc/crc32c.cc +0 -4
- package/vendor/abseil-cpp/absl/crc/crc32c.h +7 -5
- package/vendor/abseil-cpp/absl/crc/crc32c_benchmark.cc +17 -4
- package/vendor/abseil-cpp/absl/crc/crc32c_test.cc +30 -0
- package/vendor/abseil-cpp/absl/crc/internal/cpu_detect.cc +17 -0
- package/vendor/abseil-cpp/absl/crc/internal/cpu_detect.h +7 -1
- package/vendor/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +0 -22
- package/vendor/abseil-cpp/absl/crc/internal/crc_memcpy_x86_arm_combined.cc +5 -0
- package/vendor/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +136 -165
- package/vendor/abseil-cpp/absl/crc/internal/gen_crc32c_consts.py +90 -0
- package/vendor/abseil-cpp/absl/debugging/BUILD.bazel +7 -0
- package/vendor/abseil-cpp/absl/debugging/CMakeLists.txt +4 -0
- package/vendor/abseil-cpp/absl/debugging/internal/addresses.h +57 -0
- package/vendor/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc +1 -1
- package/vendor/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h +5 -5
- package/vendor/abseil-cpp/absl/debugging/internal/demangle.cc +8 -35
- package/vendor/abseil-cpp/absl/debugging/internal/demangle_rust.cc +16 -16
- package/vendor/abseil-cpp/absl/debugging/internal/demangle_test.cc +11 -10
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +40 -37
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +16 -7
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_config.h +6 -5
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +14 -5
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +10 -4
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +27 -16
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +13 -4
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +4 -3
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +15 -28
- package/vendor/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +25 -14
- package/vendor/abseil-cpp/absl/debugging/internal/vdso_support.cc +4 -0
- package/vendor/abseil-cpp/absl/debugging/stacktrace.cc +161 -27
- package/vendor/abseil-cpp/absl/debugging/stacktrace.h +73 -5
- package/vendor/abseil-cpp/absl/debugging/stacktrace_test.cc +435 -1
- package/vendor/abseil-cpp/absl/debugging/symbolize_elf.inc +55 -63
- package/vendor/abseil-cpp/absl/debugging/symbolize_emscripten.inc +3 -2
- package/vendor/abseil-cpp/absl/debugging/symbolize_win32.inc +25 -6
- package/vendor/abseil-cpp/absl/flags/BUILD.bazel +6 -0
- package/vendor/abseil-cpp/absl/flags/CMakeLists.txt +3 -0
- package/vendor/abseil-cpp/absl/flags/commandlineflag.h +2 -2
- package/vendor/abseil-cpp/absl/flags/flag.h +4 -3
- package/vendor/abseil-cpp/absl/flags/internal/commandlineflag.h +2 -2
- package/vendor/abseil-cpp/absl/flags/internal/flag.cc +14 -13
- package/vendor/abseil-cpp/absl/flags/internal/flag.h +34 -34
- package/vendor/abseil-cpp/absl/flags/internal/program_name.cc +2 -2
- package/vendor/abseil-cpp/absl/flags/internal/registry.h +4 -3
- package/vendor/abseil-cpp/absl/flags/internal/usage.cc +2 -2
- package/vendor/abseil-cpp/absl/flags/parse.cc +10 -6
- package/vendor/abseil-cpp/absl/flags/reflection.cc +9 -7
- package/vendor/abseil-cpp/absl/flags/usage.cc +2 -2
- package/vendor/abseil-cpp/absl/flags/usage_config.cc +2 -2
- package/vendor/abseil-cpp/absl/functional/BUILD.bazel +7 -6
- package/vendor/abseil-cpp/absl/functional/CMakeLists.txt +2 -4
- package/vendor/abseil-cpp/absl/functional/any_invocable.h +15 -15
- package/vendor/abseil-cpp/absl/functional/any_invocable_test.cc +10 -42
- package/vendor/abseil-cpp/absl/functional/function_ref.h +2 -9
- package/vendor/abseil-cpp/absl/functional/function_ref_test.cc +10 -0
- package/vendor/abseil-cpp/absl/functional/function_type_benchmark.cc +1 -1
- package/vendor/abseil-cpp/absl/functional/internal/any_invocable.h +112 -227
- package/vendor/abseil-cpp/absl/functional/internal/front_binder.h +10 -12
- package/vendor/abseil-cpp/absl/functional/internal/function_ref.h +2 -5
- package/vendor/abseil-cpp/absl/functional/overload.h +0 -20
- package/vendor/abseil-cpp/absl/functional/overload_test.cc +1 -7
- package/vendor/abseil-cpp/absl/hash/BUILD.bazel +16 -9
- package/vendor/abseil-cpp/absl/hash/CMakeLists.txt +6 -9
- package/vendor/abseil-cpp/absl/hash/hash.h +18 -0
- package/vendor/abseil-cpp/absl/hash/hash_benchmark.cc +3 -0
- package/vendor/abseil-cpp/absl/hash/hash_instantiated_test.cc +1 -1
- package/vendor/abseil-cpp/absl/hash/hash_test.cc +131 -30
- package/vendor/abseil-cpp/absl/hash/hash_testing.h +20 -20
- package/vendor/abseil-cpp/absl/hash/internal/hash.cc +129 -17
- package/vendor/abseil-cpp/absl/hash/internal/hash.h +326 -362
- package/vendor/abseil-cpp/absl/hash/internal/low_level_hash_test.cc +54 -151
- package/vendor/abseil-cpp/absl/hash/internal/spy_hash_state.h +14 -2
- package/vendor/abseil-cpp/absl/{strings/cord_buffer.cc → hash/internal/weakly_mixed_integer.h} +14 -6
- package/vendor/abseil-cpp/absl/log/BUILD.bazel +4 -0
- package/vendor/abseil-cpp/absl/log/CMakeLists.txt +7 -0
- package/vendor/abseil-cpp/absl/log/check.h +2 -1
- package/vendor/abseil-cpp/absl/log/check_test_impl.inc +308 -14
- package/vendor/abseil-cpp/absl/log/die_if_null.h +2 -2
- package/vendor/abseil-cpp/absl/log/flags_test.cc +7 -0
- package/vendor/abseil-cpp/absl/log/globals.h +4 -5
- package/vendor/abseil-cpp/absl/log/internal/BUILD.bazel +13 -9
- package/vendor/abseil-cpp/absl/log/internal/append_truncated.h +28 -0
- package/vendor/abseil-cpp/absl/log/internal/check_op.cc +24 -22
- package/vendor/abseil-cpp/absl/log/internal/check_op.h +149 -94
- package/vendor/abseil-cpp/absl/log/internal/conditions.cc +5 -3
- package/vendor/abseil-cpp/absl/log/internal/conditions.h +7 -2
- package/vendor/abseil-cpp/absl/log/internal/fnmatch_test.cc +1 -0
- package/vendor/abseil-cpp/absl/log/internal/log_message.cc +85 -43
- package/vendor/abseil-cpp/absl/log/internal/log_message.h +84 -59
- package/vendor/abseil-cpp/absl/log/internal/log_sink_set.cc +4 -4
- package/vendor/abseil-cpp/absl/log/internal/nullstream.h +1 -0
- package/vendor/abseil-cpp/absl/log/internal/proto.cc +3 -2
- package/vendor/abseil-cpp/absl/log/internal/proto.h +3 -3
- package/vendor/abseil-cpp/absl/log/internal/strip.h +4 -12
- package/vendor/abseil-cpp/absl/log/internal/structured.h +3 -7
- package/vendor/abseil-cpp/absl/log/internal/vlog_config.cc +9 -9
- package/vendor/abseil-cpp/absl/log/internal/vlog_config.h +8 -6
- package/vendor/abseil-cpp/absl/log/internal/voidify.h +10 -4
- package/vendor/abseil-cpp/absl/log/log.h +48 -35
- package/vendor/abseil-cpp/absl/log/log_basic_test_impl.inc +45 -0
- package/vendor/abseil-cpp/absl/log/log_entry.cc +241 -19
- package/vendor/abseil-cpp/absl/log/log_entry.h +2 -0
- package/vendor/abseil-cpp/absl/log/log_format_test.cc +412 -6
- package/vendor/abseil-cpp/absl/log/log_modifier_methods_test.cc +20 -0
- package/vendor/abseil-cpp/absl/log/log_sink_registry.h +2 -2
- package/vendor/abseil-cpp/absl/log/log_streamer_test.cc +15 -2
- package/vendor/abseil-cpp/absl/log/scoped_mock_log.h +7 -1
- package/vendor/abseil-cpp/absl/log/structured_test.cc +1 -0
- package/vendor/abseil-cpp/absl/memory/BUILD.bazel +2 -0
- package/vendor/abseil-cpp/absl/meta/BUILD.bazel +2 -0
- package/vendor/abseil-cpp/absl/meta/type_traits.h +46 -175
- package/vendor/abseil-cpp/absl/meta/type_traits_test.cc +1 -478
- package/vendor/abseil-cpp/absl/numeric/BUILD.bazel +7 -3
- package/vendor/abseil-cpp/absl/numeric/CMakeLists.txt +2 -0
- package/vendor/abseil-cpp/absl/numeric/bits.h +68 -2
- package/vendor/abseil-cpp/absl/numeric/bits_benchmark.cc +1 -1
- package/vendor/abseil-cpp/absl/numeric/bits_test.cc +83 -0
- package/vendor/abseil-cpp/absl/numeric/int128.cc +0 -52
- package/vendor/abseil-cpp/absl/numeric/int128_benchmark.cc +14 -15
- package/vendor/abseil-cpp/absl/numeric/int128_test.cc +13 -8
- package/vendor/abseil-cpp/absl/numeric/internal/bits.h +39 -7
- package/vendor/abseil-cpp/absl/profiling/BUILD.bazel +47 -0
- package/vendor/abseil-cpp/absl/profiling/CMakeLists.txt +38 -0
- package/vendor/abseil-cpp/absl/profiling/hashtable.cc +124 -0
- package/vendor/abseil-cpp/absl/profiling/hashtable.h +40 -0
- package/vendor/abseil-cpp/absl/profiling/internal/exponential_biased.cc +1 -1
- package/vendor/abseil-cpp/absl/profiling/internal/profile_builder.cc +462 -0
- package/vendor/abseil-cpp/absl/profiling/internal/profile_builder.h +138 -0
- package/vendor/abseil-cpp/absl/profiling/internal/sample_recorder.h +9 -9
- package/vendor/abseil-cpp/absl/profiling/internal/sample_recorder_test.cc +7 -3
- package/vendor/abseil-cpp/absl/random/BUILD.bazel +6 -4
- package/vendor/abseil-cpp/absl/random/CMakeLists.txt +20 -19
- package/vendor/abseil-cpp/absl/random/benchmarks.cc +16 -23
- package/vendor/abseil-cpp/absl/random/bit_gen_ref.h +10 -11
- package/vendor/abseil-cpp/absl/random/bit_gen_ref_test.cc +7 -2
- package/vendor/abseil-cpp/absl/random/distributions.h +6 -8
- package/vendor/abseil-cpp/absl/random/gaussian_distribution.h +1 -1
- package/vendor/abseil-cpp/absl/random/internal/BUILD.bazel +19 -20
- package/vendor/abseil-cpp/absl/random/internal/distribution_caller.h +5 -6
- package/vendor/abseil-cpp/absl/random/internal/{pool_urbg.cc → entropy_pool.cc} +24 -92
- package/vendor/abseil-cpp/absl/{base/inline_variable_test_b.cc → random/internal/entropy_pool.h} +14 -6
- package/vendor/abseil-cpp/absl/random/internal/entropy_pool_test.cc +119 -0
- package/vendor/abseil-cpp/absl/random/internal/mock_helpers.h +6 -7
- package/vendor/abseil-cpp/absl/random/internal/nonsecure_base.h +5 -6
- package/vendor/abseil-cpp/absl/random/internal/nonsecure_base_test.cc +39 -0
- package/vendor/abseil-cpp/absl/random/internal/randen_benchmarks.cc +8 -6
- package/vendor/abseil-cpp/absl/random/internal/randen_detect.cc +1 -1
- package/vendor/abseil-cpp/absl/random/internal/seed_material.cc +20 -12
- package/vendor/abseil-cpp/absl/random/internal/seed_material.h +5 -5
- package/vendor/abseil-cpp/absl/random/internal/seed_material_test.cc +3 -0
- package/vendor/abseil-cpp/absl/random/mock_distributions_test.cc +5 -4
- package/vendor/abseil-cpp/absl/random/mocking_bit_gen.h +8 -10
- package/vendor/abseil-cpp/absl/random/random.h +88 -53
- package/vendor/abseil-cpp/absl/random/seed_sequences.cc +6 -2
- package/vendor/abseil-cpp/absl/status/BUILD.bazel +26 -0
- package/vendor/abseil-cpp/absl/status/internal/status_internal.cc +3 -4
- package/vendor/abseil-cpp/absl/status/internal/status_internal.h +3 -4
- package/vendor/abseil-cpp/absl/status/internal/status_matchers.cc +4 -3
- package/vendor/abseil-cpp/absl/status/internal/statusor_internal.h +194 -32
- package/vendor/abseil-cpp/absl/status/status.cc +4 -8
- package/vendor/abseil-cpp/absl/status/status.h +8 -8
- package/vendor/abseil-cpp/absl/{base/inline_variable_test_a.cc → status/status_benchmark.cc} +20 -10
- package/vendor/abseil-cpp/absl/status/status_matchers_test.cc +65 -0
- package/vendor/abseil-cpp/absl/status/status_payload_printer.h +2 -2
- package/vendor/abseil-cpp/absl/status/statusor.cc +2 -2
- package/vendor/abseil-cpp/absl/status/statusor.h +49 -102
- package/vendor/abseil-cpp/absl/status/statusor_benchmark.cc +480 -0
- package/vendor/abseil-cpp/absl/status/statusor_test.cc +323 -1
- package/vendor/abseil-cpp/absl/strings/BUILD.bazel +70 -34
- package/vendor/abseil-cpp/absl/strings/CMakeLists.txt +6 -3
- package/vendor/abseil-cpp/absl/strings/ascii.cc +9 -9
- package/vendor/abseil-cpp/absl/strings/ascii.h +18 -18
- package/vendor/abseil-cpp/absl/strings/ascii_benchmark.cc +5 -8
- package/vendor/abseil-cpp/absl/strings/charconv.cc +21 -22
- package/vendor/abseil-cpp/absl/strings/charconv.h +5 -5
- package/vendor/abseil-cpp/absl/strings/charconv_benchmark.cc +1 -2
- package/vendor/abseil-cpp/absl/strings/charset_benchmark.cc +1 -1
- package/vendor/abseil-cpp/absl/strings/cord.cc +54 -58
- package/vendor/abseil-cpp/absl/strings/cord.h +94 -84
- package/vendor/abseil-cpp/absl/strings/cord_analysis.cc +11 -11
- package/vendor/abseil-cpp/absl/strings/cord_analysis.h +3 -3
- package/vendor/abseil-cpp/absl/strings/cord_test.cc +23 -0
- package/vendor/abseil-cpp/absl/strings/cordz_test_helpers.h +4 -5
- package/vendor/abseil-cpp/absl/strings/escaping.cc +130 -149
- package/vendor/abseil-cpp/absl/strings/escaping.h +9 -10
- package/vendor/abseil-cpp/absl/strings/escaping_benchmark.cc +2 -3
- package/vendor/abseil-cpp/absl/strings/escaping_test.cc +19 -9
- package/vendor/abseil-cpp/absl/strings/internal/charconv_bigint.cc +1 -1
- package/vendor/abseil-cpp/absl/strings/internal/charconv_bigint_test.cc +1 -1
- package/vendor/abseil-cpp/absl/strings/internal/cord_internal.h +6 -10
- package/vendor/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +0 -4
- package/vendor/abseil-cpp/absl/strings/internal/cordz_handle.cc +6 -6
- package/vendor/abseil-cpp/absl/strings/internal/cordz_info.cc +5 -9
- package/vendor/abseil-cpp/absl/strings/internal/cordz_info.h +2 -4
- package/vendor/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance_benchmark.cc +56 -0
- package/vendor/abseil-cpp/absl/strings/internal/memutil_benchmark.cc +2 -3
- package/vendor/abseil-cpp/absl/strings/internal/ostringstream_benchmark.cc +1 -2
- package/vendor/abseil-cpp/absl/strings/internal/str_format/arg.cc +7 -63
- package/vendor/abseil-cpp/absl/strings/internal/str_format/arg.h +1 -11
- package/vendor/abseil-cpp/absl/strings/internal/str_format/convert_test.cc +1 -6
- package/vendor/abseil-cpp/absl/strings/internal/str_format/extension.cc +0 -22
- package/vendor/abseil-cpp/absl/strings/internal/str_format/extension_test.cc +3 -2
- package/vendor/abseil-cpp/absl/strings/internal/str_format/output.cc +5 -3
- package/vendor/abseil-cpp/absl/strings/internal/str_format/parser.h +4 -2
- package/vendor/abseil-cpp/absl/strings/internal/str_join_internal.h +3 -3
- package/vendor/abseil-cpp/absl/strings/internal/str_split_internal.h +7 -2
- package/vendor/abseil-cpp/absl/strings/internal/string_constant.h +0 -5
- package/vendor/abseil-cpp/absl/strings/internal/utf8.cc +96 -1
- package/vendor/abseil-cpp/absl/strings/internal/utf8.h +15 -1
- package/vendor/abseil-cpp/absl/strings/internal/utf8_test.cc +196 -3
- package/vendor/abseil-cpp/absl/strings/numbers.cc +53 -32
- package/vendor/abseil-cpp/absl/strings/numbers.h +87 -58
- package/vendor/abseil-cpp/absl/strings/numbers_benchmark.cc +1 -1
- package/vendor/abseil-cpp/absl/strings/numbers_test.cc +634 -120
- package/vendor/abseil-cpp/absl/strings/str_cat.cc +6 -7
- package/vendor/abseil-cpp/absl/strings/str_cat.h +32 -32
- package/vendor/abseil-cpp/absl/strings/str_cat_benchmark.cc +25 -1
- package/vendor/abseil-cpp/absl/strings/str_cat_test.cc +2 -7
- package/vendor/abseil-cpp/absl/strings/str_format.h +18 -18
- package/vendor/abseil-cpp/absl/strings/str_format_test.cc +8 -14
- package/vendor/abseil-cpp/absl/strings/str_join_benchmark.cc +2 -3
- package/vendor/abseil-cpp/absl/strings/str_replace.cc +3 -3
- package/vendor/abseil-cpp/absl/strings/str_replace.h +6 -6
- package/vendor/abseil-cpp/absl/strings/str_replace_benchmark.cc +2 -3
- package/vendor/abseil-cpp/absl/strings/str_split.h +2 -2
- package/vendor/abseil-cpp/absl/strings/str_split_benchmark.cc +2 -3
- package/vendor/abseil-cpp/absl/strings/string_view.cc +4 -9
- package/vendor/abseil-cpp/absl/strings/string_view.h +38 -39
- package/vendor/abseil-cpp/absl/strings/string_view_benchmark.cc +4 -6
- package/vendor/abseil-cpp/absl/strings/string_view_test.cc +2 -50
- package/vendor/abseil-cpp/absl/strings/strip.h +4 -4
- package/vendor/abseil-cpp/absl/strings/substitute.cc +5 -4
- package/vendor/abseil-cpp/absl/strings/substitute.h +66 -64
- package/vendor/abseil-cpp/absl/strings/substitute_benchmark.cc +158 -0
- package/vendor/abseil-cpp/absl/synchronization/BUILD.bazel +6 -1
- package/vendor/abseil-cpp/absl/synchronization/CMakeLists.txt +2 -1
- package/vendor/abseil-cpp/absl/synchronization/barrier.cc +1 -1
- package/vendor/abseil-cpp/absl/synchronization/barrier_test.cc +3 -3
- package/vendor/abseil-cpp/absl/synchronization/blocking_counter.cc +2 -2
- package/vendor/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +3 -3
- package/vendor/abseil-cpp/absl/synchronization/internal/futex_waiter.cc +0 -4
- package/vendor/abseil-cpp/absl/synchronization/internal/graphcycles.cc +30 -33
- package/vendor/abseil-cpp/absl/synchronization/internal/graphcycles_benchmark.cc +2 -3
- package/vendor/abseil-cpp/absl/synchronization/internal/graphcycles_test.cc +6 -5
- package/vendor/abseil-cpp/absl/synchronization/internal/kernel_timeout.cc +0 -5
- package/vendor/abseil-cpp/absl/synchronization/internal/pthread_waiter.cc +0 -4
- package/vendor/abseil-cpp/absl/synchronization/internal/sem_waiter.cc +0 -4
- package/vendor/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.cc +0 -4
- package/vendor/abseil-cpp/absl/synchronization/internal/thread_pool.h +3 -3
- package/vendor/abseil-cpp/absl/synchronization/internal/waiter_base.cc +0 -4
- package/vendor/abseil-cpp/absl/synchronization/internal/waiter_test.cc +12 -3
- package/vendor/abseil-cpp/absl/synchronization/internal/win32_waiter.cc +0 -4
- package/vendor/abseil-cpp/absl/synchronization/lifetime_test.cc +4 -4
- package/vendor/abseil-cpp/absl/synchronization/mutex.cc +27 -29
- package/vendor/abseil-cpp/absl/synchronization/mutex.h +205 -126
- package/vendor/abseil-cpp/absl/synchronization/mutex_benchmark.cc +13 -31
- package/vendor/abseil-cpp/absl/synchronization/mutex_test.cc +183 -169
- package/vendor/abseil-cpp/absl/synchronization/notification.cc +5 -5
- package/vendor/abseil-cpp/absl/synchronization/notification.h +1 -1
- package/vendor/abseil-cpp/absl/synchronization/notification_test.cc +3 -3
- package/vendor/abseil-cpp/absl/time/BUILD.bazel +9 -1
- package/vendor/abseil-cpp/absl/time/CMakeLists.txt +3 -1
- package/vendor/abseil-cpp/absl/time/civil_time.cc +1 -0
- package/vendor/abseil-cpp/absl/time/civil_time_test.cc +134 -0
- package/vendor/abseil-cpp/absl/time/clock.cc +11 -14
- package/vendor/abseil-cpp/absl/time/duration.cc +14 -9
- package/vendor/abseil-cpp/absl/time/duration_test.cc +6 -7
- package/vendor/abseil-cpp/absl/time/internal/cctz/BUILD.bazel +14 -3
- package/vendor/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +12 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +1 -1
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/cctz_benchmark.cc +4 -490
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/test_time_zone_names.cc +515 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/test_time_zone_names.h +33 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +41 -4
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/time_zone_format_test.cc +22 -23
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +90 -111
- package/vendor/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup_test.cc +1 -488
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/version +1 -1
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/America/Coyhaique +0 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/Asia/Tehran +0 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/Iran +0 -0
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/zone1970.tab +2 -1
- package/vendor/abseil-cpp/absl/time/internal/cctz/testdata/zoneinfo/zonenow.tab +1 -1
- package/vendor/abseil-cpp/absl/time/time.h +24 -18
- package/vendor/abseil-cpp/absl/time/time_test.cc +26 -0
- package/vendor/abseil-cpp/absl/types/BUILD.bazel +11 -164
- package/vendor/abseil-cpp/absl/types/CMakeLists.txt +23 -167
- package/vendor/abseil-cpp/absl/types/any.h +9 -484
- package/vendor/abseil-cpp/absl/types/optional.h +7 -747
- package/vendor/abseil-cpp/absl/types/span.h +46 -19
- package/vendor/abseil-cpp/absl/types/span_test.cc +27 -0
- package/vendor/abseil-cpp/absl/types/variant.h +5 -784
- package/vendor/abseil-cpp/absl/types/variant_test.cc +43 -2597
- package/vendor/abseil-cpp/absl/utility/BUILD.bazel +1 -41
- package/vendor/abseil-cpp/absl/utility/CMakeLists.txt +0 -40
- package/vendor/abseil-cpp/absl/utility/utility.h +10 -185
- package/vendor/abseil-cpp/ci/absl_alternate_options.h +2 -3
- package/vendor/abseil-cpp/ci/cmake_common.sh +2 -2
- package/vendor/abseil-cpp/ci/linux_arm_clang-latest_libcxx_bazel.sh +12 -13
- package/vendor/abseil-cpp/ci/linux_clang-latest_libcxx_asan_bazel.sh +24 -21
- package/vendor/abseil-cpp/ci/linux_clang-latest_libcxx_bazel.sh +12 -12
- package/vendor/abseil-cpp/ci/linux_clang-latest_libcxx_tsan_bazel.sh +23 -22
- package/vendor/abseil-cpp/ci/linux_clang-latest_libstdcxx_bazel.sh +20 -19
- package/vendor/abseil-cpp/ci/linux_docker_containers.sh +4 -4
- package/vendor/abseil-cpp/ci/linux_gcc-floor_libstdcxx_bazel.sh +17 -17
- package/vendor/abseil-cpp/ci/linux_gcc-latest_libstdcxx_bazel.sh +10 -10
- package/vendor/abseil-cpp/ci/linux_gcc-latest_libstdcxx_cmake.sh +1 -1
- package/vendor/abseil-cpp/ci/linux_gcc_alpine_cmake.sh +1 -1
- package/vendor/abseil-cpp/ci/macos_xcode_bazel.sh +9 -10
- package/vendor/abseil-cpp/ci/macos_xcode_cmake.sh +9 -1
- package/vendor/abseil-cpp/ci/windows_clangcl_bazel.bat +14 -6
- package/vendor/abseil-cpp/ci/windows_msvc_bazel.bat +14 -6
- package/vendor/abseil-cpp/ci/windows_msvc_cmake.bat +1 -1
- package/vendor/re2/.bazelrc +4 -4
- package/vendor/re2/.bcr/metadata.template.json +16 -0
- package/vendor/re2/.bcr/presubmit.yml +57 -0
- package/vendor/re2/.bcr/source.template.json +5 -0
- package/vendor/re2/.github/bazel.sh +1 -7
- package/vendor/re2/.github/workflows/ci-bazel.yml +5 -5
- package/vendor/re2/.github/workflows/ci-cmake.yml +4 -4
- package/vendor/re2/.github/workflows/ci.yml +5 -6
- package/vendor/re2/.github/workflows/pages.yml +3 -3
- package/vendor/re2/.github/workflows/python.yml +29 -24
- package/vendor/re2/.github/workflows/release-bazel.yml +42 -0
- package/vendor/re2/.github/workflows/release.yml +15 -4
- package/vendor/re2/BUILD.bazel +25 -0
- package/vendor/re2/CMakeLists.txt +100 -85
- package/vendor/re2/CONTRIBUTING.md +0 -1
- package/vendor/re2/MODULE.bazel +10 -10
- package/vendor/re2/Makefile +1 -1
- package/vendor/re2/README.md +259 -0
- package/vendor/re2/python/BUILD.bazel +8 -0
- package/vendor/re2/python/re2.py +1 -1
- package/vendor/re2/python/re2_test.py +6 -0
- package/vendor/re2/python/setup.py +3 -3
- package/vendor/re2/re2/bitmap256.cc +3 -4
- package/vendor/re2/re2/bitstate.cc +15 -10
- package/vendor/re2/re2/dfa.cc +1 -2
- package/vendor/re2/re2/parse.cc +3 -4
- package/vendor/re2/re2/prog.cc +1 -2
- package/vendor/re2/re2/prog.h +1 -0
- package/vendor/re2/re2/re2.cc +5 -0
- package/vendor/re2/re2/re2.h +9 -9
- package/vendor/re2/re2/set.cc +6 -0
- package/vendor/re2/re2/set.h +5 -0
- package/vendor/re2/re2/testing/re2_arg_test.cc +3 -3
- package/vendor/re2/re2/testing/re2_test.cc +8 -0
- package/vendor/re2/re2/testing/set_test.cc +5 -0
- package/vendor/re2/re2/walker-inl.h +1 -1
- package/vendor/abseil-cpp/WORKSPACE +0 -76
- package/vendor/abseil-cpp/WORKSPACE.bzlmod +0 -19
- package/vendor/abseil-cpp/absl/base/inline_variable_test.cc +0 -64
- package/vendor/abseil-cpp/absl/base/internal/inline_variable.h +0 -108
- package/vendor/abseil-cpp/absl/base/internal/inline_variable_testing.h +0 -46
- package/vendor/abseil-cpp/absl/base/internal/invoke.h +0 -241
- package/vendor/abseil-cpp/absl/base/internal/nullability_impl.h +0 -69
- package/vendor/abseil-cpp/absl/base/invoke_test.cc +0 -331
- package/vendor/abseil-cpp/absl/hash/internal/low_level_hash.cc +0 -148
- package/vendor/abseil-cpp/absl/hash/internal/low_level_hash.h +0 -54
- package/vendor/abseil-cpp/absl/random/internal/pool_urbg.h +0 -131
- package/vendor/abseil-cpp/absl/random/internal/pool_urbg_test.cc +0 -182
- package/vendor/abseil-cpp/absl/types/any_exception_safety_test.cc +0 -173
- package/vendor/abseil-cpp/absl/types/any_test.cc +0 -778
- package/vendor/abseil-cpp/absl/types/bad_any_cast.cc +0 -64
- package/vendor/abseil-cpp/absl/types/bad_any_cast.h +0 -75
- package/vendor/abseil-cpp/absl/types/bad_optional_access.cc +0 -66
- package/vendor/abseil-cpp/absl/types/bad_optional_access.h +0 -78
- package/vendor/abseil-cpp/absl/types/bad_variant_access.cc +0 -82
- package/vendor/abseil-cpp/absl/types/bad_variant_access.h +0 -82
- package/vendor/abseil-cpp/absl/types/internal/optional.h +0 -352
- package/vendor/abseil-cpp/absl/types/internal/variant.h +0 -1622
- package/vendor/abseil-cpp/absl/types/optional_exception_safety_test.cc +0 -292
- package/vendor/abseil-cpp/absl/types/optional_test.cc +0 -1615
- package/vendor/abseil-cpp/absl/types/variant_benchmark.cc +0 -222
- package/vendor/abseil-cpp/absl/types/variant_exception_safety_test.cc +0 -532
- package/vendor/abseil-cpp/absl/utility/internal/if_constexpr.h +0 -70
- package/vendor/abseil-cpp/absl/utility/internal/if_constexpr_test.cc +0 -79
- package/vendor/abseil-cpp/absl/utility/utility_test.cc +0 -239
- package/vendor/re2/.github/workflows/pr.yml +0 -34
- package/vendor/re2/README +0 -47
|
@@ -15,12 +15,14 @@
|
|
|
15
15
|
|
|
16
16
|
#include <math.h>
|
|
17
17
|
|
|
18
|
+
#include <cstring>
|
|
18
19
|
#include <iomanip>
|
|
19
20
|
#include <ios>
|
|
20
21
|
#include <limits>
|
|
21
22
|
#include <ostream>
|
|
22
23
|
#include <sstream>
|
|
23
24
|
#include <string>
|
|
25
|
+
#include <string_view>
|
|
24
26
|
#include <type_traits>
|
|
25
27
|
|
|
26
28
|
#ifdef __ANDROID__
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
#endif
|
|
29
31
|
#include "gmock/gmock.h"
|
|
30
32
|
#include "gtest/gtest.h"
|
|
33
|
+
#include "absl/base/config.h"
|
|
31
34
|
#include "absl/log/check.h"
|
|
32
35
|
#include "absl/log/internal/test_matchers.h"
|
|
33
36
|
#include "absl/log/log.h"
|
|
@@ -44,6 +47,7 @@ using ::absl::log_internal::MatchesOstream;
|
|
|
44
47
|
using ::absl::log_internal::RawEncodedMessage;
|
|
45
48
|
using ::absl::log_internal::TextMessage;
|
|
46
49
|
using ::absl::log_internal::TextPrefix;
|
|
50
|
+
using ::testing::_;
|
|
47
51
|
using ::testing::AllOf;
|
|
48
52
|
using ::testing::AnyOf;
|
|
49
53
|
using ::testing::Each;
|
|
@@ -69,6 +73,7 @@ std::ostringstream ComparisonStream() {
|
|
|
69
73
|
|
|
70
74
|
TEST(LogFormatTest, NoMessage) {
|
|
71
75
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
76
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
72
77
|
|
|
73
78
|
const int log_line = __LINE__ + 1;
|
|
74
79
|
auto do_log = [] { LOG(INFO); };
|
|
@@ -91,6 +96,7 @@ TYPED_TEST_SUITE(CharLogFormatTest, CharTypes);
|
|
|
91
96
|
|
|
92
97
|
TYPED_TEST(CharLogFormatTest, Printable) {
|
|
93
98
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
99
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
94
100
|
|
|
95
101
|
const TypeParam value = 'x';
|
|
96
102
|
auto comparison_stream = ComparisonStream();
|
|
@@ -108,6 +114,7 @@ TYPED_TEST(CharLogFormatTest, Printable) {
|
|
|
108
114
|
|
|
109
115
|
TYPED_TEST(CharLogFormatTest, Unprintable) {
|
|
110
116
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
117
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
111
118
|
|
|
112
119
|
constexpr auto value = static_cast<TypeParam>(0xeeu);
|
|
113
120
|
auto comparison_stream = ComparisonStream();
|
|
@@ -124,6 +131,35 @@ TYPED_TEST(CharLogFormatTest, Unprintable) {
|
|
|
124
131
|
LOG(INFO) << value;
|
|
125
132
|
}
|
|
126
133
|
|
|
134
|
+
TEST(WideCharLogFormatTest, Printable) {
|
|
135
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
136
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
137
|
+
|
|
138
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq("€")),
|
|
139
|
+
ENCODED_MESSAGE(HasValues(
|
|
140
|
+
ElementsAre(ValueWithStr(Eq("€"))))))));
|
|
141
|
+
|
|
142
|
+
test_sink.StartCapturingLogs();
|
|
143
|
+
const wchar_t value = L'\u20AC';
|
|
144
|
+
LOG(INFO) << value;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
TEST(WideCharLogFormatTest, Unprintable) {
|
|
148
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
149
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
150
|
+
|
|
151
|
+
// Using NEL (Next Line) Unicode character (U+0085).
|
|
152
|
+
// It is encoded as "\xC2\x85" in UTF-8.
|
|
153
|
+
constexpr wchar_t wide_value = L'\u0085';
|
|
154
|
+
constexpr char value[] = "\xC2\x85";
|
|
155
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq(value)),
|
|
156
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
157
|
+
ValueWithStr(Eq(value))))))));
|
|
158
|
+
|
|
159
|
+
test_sink.StartCapturingLogs();
|
|
160
|
+
LOG(INFO) << wide_value;
|
|
161
|
+
}
|
|
162
|
+
|
|
127
163
|
template <typename T>
|
|
128
164
|
class UnsignedIntLogFormatTest : public testing::Test {};
|
|
129
165
|
using UnsignedIntTypes = Types<unsigned short, unsigned int, // NOLINT
|
|
@@ -132,6 +168,7 @@ TYPED_TEST_SUITE(UnsignedIntLogFormatTest, UnsignedIntTypes);
|
|
|
132
168
|
|
|
133
169
|
TYPED_TEST(UnsignedIntLogFormatTest, Positive) {
|
|
134
170
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
171
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
135
172
|
|
|
136
173
|
const TypeParam value = 224;
|
|
137
174
|
auto comparison_stream = ComparisonStream();
|
|
@@ -150,6 +187,7 @@ TYPED_TEST(UnsignedIntLogFormatTest, Positive) {
|
|
|
150
187
|
|
|
151
188
|
TYPED_TEST(UnsignedIntLogFormatTest, BitfieldPositive) {
|
|
152
189
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
190
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
153
191
|
|
|
154
192
|
const struct {
|
|
155
193
|
TypeParam bits : 6;
|
|
@@ -175,6 +213,7 @@ TYPED_TEST_SUITE(SignedIntLogFormatTest, SignedIntTypes);
|
|
|
175
213
|
|
|
176
214
|
TYPED_TEST(SignedIntLogFormatTest, Positive) {
|
|
177
215
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
216
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
178
217
|
|
|
179
218
|
const TypeParam value = 224;
|
|
180
219
|
auto comparison_stream = ComparisonStream();
|
|
@@ -193,6 +232,7 @@ TYPED_TEST(SignedIntLogFormatTest, Positive) {
|
|
|
193
232
|
|
|
194
233
|
TYPED_TEST(SignedIntLogFormatTest, Negative) {
|
|
195
234
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
235
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
196
236
|
|
|
197
237
|
const TypeParam value = -112;
|
|
198
238
|
auto comparison_stream = ComparisonStream();
|
|
@@ -211,6 +251,7 @@ TYPED_TEST(SignedIntLogFormatTest, Negative) {
|
|
|
211
251
|
|
|
212
252
|
TYPED_TEST(SignedIntLogFormatTest, BitfieldPositive) {
|
|
213
253
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
254
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
214
255
|
|
|
215
256
|
const struct {
|
|
216
257
|
TypeParam bits : 6;
|
|
@@ -230,6 +271,7 @@ TYPED_TEST(SignedIntLogFormatTest, BitfieldPositive) {
|
|
|
230
271
|
|
|
231
272
|
TYPED_TEST(SignedIntLogFormatTest, BitfieldNegative) {
|
|
232
273
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
274
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
233
275
|
|
|
234
276
|
const struct {
|
|
235
277
|
TypeParam bits : 6;
|
|
@@ -274,6 +316,7 @@ TYPED_TEST_SUITE(UnsignedEnumLogFormatTest, UnsignedEnumTypes);
|
|
|
274
316
|
|
|
275
317
|
TYPED_TEST(UnsignedEnumLogFormatTest, Positive) {
|
|
276
318
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
319
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
277
320
|
|
|
278
321
|
const TypeParam value = static_cast<TypeParam>(224);
|
|
279
322
|
auto comparison_stream = ComparisonStream();
|
|
@@ -292,6 +335,7 @@ TYPED_TEST(UnsignedEnumLogFormatTest, Positive) {
|
|
|
292
335
|
|
|
293
336
|
TYPED_TEST(UnsignedEnumLogFormatTest, BitfieldPositive) {
|
|
294
337
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
338
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
295
339
|
|
|
296
340
|
const struct {
|
|
297
341
|
TypeParam bits : 6;
|
|
@@ -334,6 +378,7 @@ TYPED_TEST_SUITE(SignedEnumLogFormatTest, SignedEnumTypes);
|
|
|
334
378
|
|
|
335
379
|
TYPED_TEST(SignedEnumLogFormatTest, Positive) {
|
|
336
380
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
381
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
337
382
|
|
|
338
383
|
const TypeParam value = static_cast<TypeParam>(224);
|
|
339
384
|
auto comparison_stream = ComparisonStream();
|
|
@@ -352,6 +397,7 @@ TYPED_TEST(SignedEnumLogFormatTest, Positive) {
|
|
|
352
397
|
|
|
353
398
|
TYPED_TEST(SignedEnumLogFormatTest, Negative) {
|
|
354
399
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
400
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
355
401
|
|
|
356
402
|
const TypeParam value = static_cast<TypeParam>(-112);
|
|
357
403
|
auto comparison_stream = ComparisonStream();
|
|
@@ -370,6 +416,7 @@ TYPED_TEST(SignedEnumLogFormatTest, Negative) {
|
|
|
370
416
|
|
|
371
417
|
TYPED_TEST(SignedEnumLogFormatTest, BitfieldPositive) {
|
|
372
418
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
419
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
373
420
|
|
|
374
421
|
const struct {
|
|
375
422
|
TypeParam bits : 6;
|
|
@@ -389,6 +436,7 @@ TYPED_TEST(SignedEnumLogFormatTest, BitfieldPositive) {
|
|
|
389
436
|
|
|
390
437
|
TYPED_TEST(SignedEnumLogFormatTest, BitfieldNegative) {
|
|
391
438
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
439
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
392
440
|
|
|
393
441
|
const struct {
|
|
394
442
|
TypeParam bits : 6;
|
|
@@ -410,6 +458,7 @@ TYPED_TEST(SignedEnumLogFormatTest, BitfieldNegative) {
|
|
|
410
458
|
|
|
411
459
|
TEST(FloatLogFormatTest, Positive) {
|
|
412
460
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
461
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
413
462
|
|
|
414
463
|
const float value = 6.02e23f;
|
|
415
464
|
auto comparison_stream = ComparisonStream();
|
|
@@ -427,6 +476,7 @@ TEST(FloatLogFormatTest, Positive) {
|
|
|
427
476
|
|
|
428
477
|
TEST(FloatLogFormatTest, Negative) {
|
|
429
478
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
479
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
430
480
|
|
|
431
481
|
const float value = -6.02e23f;
|
|
432
482
|
auto comparison_stream = ComparisonStream();
|
|
@@ -444,6 +494,7 @@ TEST(FloatLogFormatTest, Negative) {
|
|
|
444
494
|
|
|
445
495
|
TEST(FloatLogFormatTest, NegativeExponent) {
|
|
446
496
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
497
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
447
498
|
|
|
448
499
|
const float value = 6.02e-23f;
|
|
449
500
|
auto comparison_stream = ComparisonStream();
|
|
@@ -461,6 +512,7 @@ TEST(FloatLogFormatTest, NegativeExponent) {
|
|
|
461
512
|
|
|
462
513
|
TEST(DoubleLogFormatTest, Positive) {
|
|
463
514
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
515
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
464
516
|
|
|
465
517
|
const double value = 6.02e23;
|
|
466
518
|
auto comparison_stream = ComparisonStream();
|
|
@@ -478,6 +530,7 @@ TEST(DoubleLogFormatTest, Positive) {
|
|
|
478
530
|
|
|
479
531
|
TEST(DoubleLogFormatTest, Negative) {
|
|
480
532
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
533
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
481
534
|
|
|
482
535
|
const double value = -6.02e23;
|
|
483
536
|
auto comparison_stream = ComparisonStream();
|
|
@@ -495,6 +548,7 @@ TEST(DoubleLogFormatTest, Negative) {
|
|
|
495
548
|
|
|
496
549
|
TEST(DoubleLogFormatTest, NegativeExponent) {
|
|
497
550
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
551
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
498
552
|
|
|
499
553
|
const double value = 6.02e-23;
|
|
500
554
|
auto comparison_stream = ComparisonStream();
|
|
@@ -517,6 +571,7 @@ TYPED_TEST_SUITE(FloatingPointLogFormatTest, FloatingPointTypes);
|
|
|
517
571
|
|
|
518
572
|
TYPED_TEST(FloatingPointLogFormatTest, Zero) {
|
|
519
573
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
574
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
520
575
|
|
|
521
576
|
const TypeParam value = 0.0;
|
|
522
577
|
auto comparison_stream = ComparisonStream();
|
|
@@ -534,6 +589,7 @@ TYPED_TEST(FloatingPointLogFormatTest, Zero) {
|
|
|
534
589
|
|
|
535
590
|
TYPED_TEST(FloatingPointLogFormatTest, Integer) {
|
|
536
591
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
592
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
537
593
|
|
|
538
594
|
const TypeParam value = 1.0;
|
|
539
595
|
auto comparison_stream = ComparisonStream();
|
|
@@ -551,6 +607,7 @@ TYPED_TEST(FloatingPointLogFormatTest, Integer) {
|
|
|
551
607
|
|
|
552
608
|
TYPED_TEST(FloatingPointLogFormatTest, Infinity) {
|
|
553
609
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
610
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
554
611
|
|
|
555
612
|
const TypeParam value = std::numeric_limits<TypeParam>::infinity();
|
|
556
613
|
auto comparison_stream = ComparisonStream();
|
|
@@ -569,6 +626,7 @@ TYPED_TEST(FloatingPointLogFormatTest, Infinity) {
|
|
|
569
626
|
|
|
570
627
|
TYPED_TEST(FloatingPointLogFormatTest, NegativeInfinity) {
|
|
571
628
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
629
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
572
630
|
|
|
573
631
|
const TypeParam value = -std::numeric_limits<TypeParam>::infinity();
|
|
574
632
|
auto comparison_stream = ComparisonStream();
|
|
@@ -587,6 +645,7 @@ TYPED_TEST(FloatingPointLogFormatTest, NegativeInfinity) {
|
|
|
587
645
|
|
|
588
646
|
TYPED_TEST(FloatingPointLogFormatTest, NaN) {
|
|
589
647
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
648
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
590
649
|
|
|
591
650
|
const TypeParam value = std::numeric_limits<TypeParam>::quiet_NaN();
|
|
592
651
|
auto comparison_stream = ComparisonStream();
|
|
@@ -604,6 +663,7 @@ TYPED_TEST(FloatingPointLogFormatTest, NaN) {
|
|
|
604
663
|
|
|
605
664
|
TYPED_TEST(FloatingPointLogFormatTest, NegativeNaN) {
|
|
606
665
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
666
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
607
667
|
|
|
608
668
|
const TypeParam value =
|
|
609
669
|
std::copysign(std::numeric_limits<TypeParam>::quiet_NaN(), -1.0);
|
|
@@ -635,11 +695,12 @@ TYPED_TEST(FloatingPointLogFormatTest, NegativeNaN) {
|
|
|
635
695
|
|
|
636
696
|
template <typename T>
|
|
637
697
|
class VoidPtrLogFormatTest : public testing::Test {};
|
|
638
|
-
using VoidPtrTypes = Types<void
|
|
698
|
+
using VoidPtrTypes = Types<void*, const void*>;
|
|
639
699
|
TYPED_TEST_SUITE(VoidPtrLogFormatTest, VoidPtrTypes);
|
|
640
700
|
|
|
641
701
|
TYPED_TEST(VoidPtrLogFormatTest, Null) {
|
|
642
702
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
703
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
643
704
|
|
|
644
705
|
const TypeParam value = nullptr;
|
|
645
706
|
auto comparison_stream = ComparisonStream();
|
|
@@ -657,6 +718,7 @@ TYPED_TEST(VoidPtrLogFormatTest, Null) {
|
|
|
657
718
|
|
|
658
719
|
TYPED_TEST(VoidPtrLogFormatTest, NonNull) {
|
|
659
720
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
721
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
660
722
|
|
|
661
723
|
const TypeParam value = reinterpret_cast<TypeParam>(0xdeadbeefULL);
|
|
662
724
|
auto comparison_stream = ComparisonStream();
|
|
@@ -676,26 +738,35 @@ TYPED_TEST(VoidPtrLogFormatTest, NonNull) {
|
|
|
676
738
|
|
|
677
739
|
template <typename T>
|
|
678
740
|
class VolatilePtrLogFormatTest : public testing::Test {};
|
|
679
|
-
using VolatilePtrTypes =
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
const volatile unsigned char*>;
|
|
741
|
+
using VolatilePtrTypes = Types<
|
|
742
|
+
volatile void*, const volatile void*, volatile char*, const volatile char*,
|
|
743
|
+
volatile signed char*, const volatile signed char*, volatile unsigned char*,
|
|
744
|
+
const volatile unsigned char*, volatile wchar_t*, const volatile wchar_t*>;
|
|
684
745
|
TYPED_TEST_SUITE(VolatilePtrLogFormatTest, VolatilePtrTypes);
|
|
685
746
|
|
|
686
747
|
TYPED_TEST(VolatilePtrLogFormatTest, Null) {
|
|
687
748
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
749
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
688
750
|
|
|
689
751
|
const TypeParam value = nullptr;
|
|
690
752
|
auto comparison_stream = ComparisonStream();
|
|
691
753
|
comparison_stream << value;
|
|
692
754
|
|
|
755
|
+
// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1147r1.html
|
|
756
|
+
#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202302L
|
|
757
|
+
EXPECT_CALL(
|
|
758
|
+
test_sink,
|
|
759
|
+
Send(AllOf(TextMessage(MatchesOstream(comparison_stream)),
|
|
760
|
+
TextMessage(AnyOf(Eq("(nil)"), Eq("0"), Eq("0x0"),
|
|
761
|
+
Eq("00000000"), Eq("0000000000000000"))))));
|
|
762
|
+
#else
|
|
693
763
|
EXPECT_CALL(
|
|
694
764
|
test_sink,
|
|
695
765
|
Send(AllOf(
|
|
696
766
|
TextMessage(MatchesOstream(comparison_stream)),
|
|
697
767
|
TextMessage(Eq("false")),
|
|
698
768
|
ENCODED_MESSAGE(HasValues(ElementsAre(ValueWithStr(Eq("false"))))))));
|
|
769
|
+
#endif
|
|
699
770
|
|
|
700
771
|
test_sink.StartCapturingLogs();
|
|
701
772
|
LOG(INFO) << value;
|
|
@@ -703,17 +774,29 @@ TYPED_TEST(VolatilePtrLogFormatTest, Null) {
|
|
|
703
774
|
|
|
704
775
|
TYPED_TEST(VolatilePtrLogFormatTest, NonNull) {
|
|
705
776
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
777
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
706
778
|
|
|
707
779
|
const TypeParam value = reinterpret_cast<TypeParam>(0xdeadbeefLL);
|
|
708
780
|
auto comparison_stream = ComparisonStream();
|
|
709
781
|
comparison_stream << value;
|
|
710
782
|
|
|
783
|
+
// https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1147r1.html
|
|
784
|
+
#if ABSL_INTERNAL_CPLUSPLUS_LANG >= 202302L
|
|
785
|
+
EXPECT_CALL(test_sink,
|
|
786
|
+
Send(AllOf(TextMessage(MatchesOstream(comparison_stream)),
|
|
787
|
+
TextMessage(AnyOf(Eq("0xdeadbeef"), Eq("DEADBEEF"),
|
|
788
|
+
Eq("00000000DEADBEEF"))),
|
|
789
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
790
|
+
AnyOf(ValueWithStr(Eq("0xdeadbeef")),
|
|
791
|
+
ValueWithStr(Eq("00000000DEADBEEF")))))))));
|
|
792
|
+
#else
|
|
711
793
|
EXPECT_CALL(
|
|
712
794
|
test_sink,
|
|
713
795
|
Send(AllOf(
|
|
714
796
|
TextMessage(MatchesOstream(comparison_stream)),
|
|
715
797
|
TextMessage(Eq("true")),
|
|
716
798
|
ENCODED_MESSAGE(HasValues(ElementsAre(ValueWithStr(Eq("true"))))))));
|
|
799
|
+
#endif
|
|
717
800
|
|
|
718
801
|
test_sink.StartCapturingLogs();
|
|
719
802
|
LOG(INFO) << value;
|
|
@@ -727,6 +810,7 @@ TYPED_TEST_SUITE(CharPtrLogFormatTest, CharPtrTypes);
|
|
|
727
810
|
|
|
728
811
|
TYPED_TEST(CharPtrLogFormatTest, Null) {
|
|
729
812
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
813
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
730
814
|
|
|
731
815
|
// Streaming `([cv] char *)nullptr` into a `std::ostream` is UB, and some C++
|
|
732
816
|
// standard library implementations choose to crash. We take measures to log
|
|
@@ -747,6 +831,7 @@ TYPED_TEST(CharPtrLogFormatTest, Null) {
|
|
|
747
831
|
|
|
748
832
|
TYPED_TEST(CharPtrLogFormatTest, NonNull) {
|
|
749
833
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
834
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
750
835
|
|
|
751
836
|
TypeParam data[] = {'v', 'a', 'l', 'u', 'e', '\0'};
|
|
752
837
|
TypeParam* const value = data;
|
|
@@ -764,8 +849,43 @@ TYPED_TEST(CharPtrLogFormatTest, NonNull) {
|
|
|
764
849
|
LOG(INFO) << value;
|
|
765
850
|
}
|
|
766
851
|
|
|
852
|
+
template <typename T>
|
|
853
|
+
class WideCharPtrLogFormatTest : public testing::Test {};
|
|
854
|
+
using WideCharPtrTypes = Types<wchar_t, const wchar_t>;
|
|
855
|
+
TYPED_TEST_SUITE(WideCharPtrLogFormatTest, WideCharPtrTypes);
|
|
856
|
+
|
|
857
|
+
TYPED_TEST(WideCharPtrLogFormatTest, Null) {
|
|
858
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
859
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
860
|
+
|
|
861
|
+
TypeParam* const value = nullptr;
|
|
862
|
+
|
|
863
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq("(null)")),
|
|
864
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
865
|
+
ValueWithStr(Eq("(null)"))))))));
|
|
866
|
+
|
|
867
|
+
test_sink.StartCapturingLogs();
|
|
868
|
+
LOG(INFO) << value;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
TYPED_TEST(WideCharPtrLogFormatTest, NonNull) {
|
|
872
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
873
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
874
|
+
|
|
875
|
+
TypeParam data[] = {'v', 'a', 'l', 'u', 'e', '\0'};
|
|
876
|
+
TypeParam* const value = data;
|
|
877
|
+
|
|
878
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq("value")),
|
|
879
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
880
|
+
ValueWithStr(Eq("value"))))))));
|
|
881
|
+
|
|
882
|
+
test_sink.StartCapturingLogs();
|
|
883
|
+
LOG(INFO) << value;
|
|
884
|
+
}
|
|
885
|
+
|
|
767
886
|
TEST(BoolLogFormatTest, True) {
|
|
768
887
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
888
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
769
889
|
|
|
770
890
|
const bool value = true;
|
|
771
891
|
auto comparison_stream = ComparisonStream();
|
|
@@ -784,6 +904,7 @@ TEST(BoolLogFormatTest, True) {
|
|
|
784
904
|
|
|
785
905
|
TEST(BoolLogFormatTest, False) {
|
|
786
906
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
907
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
787
908
|
|
|
788
909
|
const bool value = false;
|
|
789
910
|
auto comparison_stream = ComparisonStream();
|
|
@@ -802,6 +923,7 @@ TEST(BoolLogFormatTest, False) {
|
|
|
802
923
|
|
|
803
924
|
TEST(LogFormatTest, StringLiteral) {
|
|
804
925
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
926
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
805
927
|
|
|
806
928
|
auto comparison_stream = ComparisonStream();
|
|
807
929
|
comparison_stream << "value";
|
|
@@ -816,8 +938,21 @@ TEST(LogFormatTest, StringLiteral) {
|
|
|
816
938
|
LOG(INFO) << "value";
|
|
817
939
|
}
|
|
818
940
|
|
|
941
|
+
TEST(LogFormatTest, WideStringLiteral) {
|
|
942
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
943
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
944
|
+
|
|
945
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq("value")),
|
|
946
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
947
|
+
ValueWithLiteral(Eq("value"))))))));
|
|
948
|
+
|
|
949
|
+
test_sink.StartCapturingLogs();
|
|
950
|
+
LOG(INFO) << L"value";
|
|
951
|
+
}
|
|
952
|
+
|
|
819
953
|
TEST(LogFormatTest, CharArray) {
|
|
820
954
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
955
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
821
956
|
|
|
822
957
|
char value[] = "value";
|
|
823
958
|
auto comparison_stream = ComparisonStream();
|
|
@@ -834,6 +969,203 @@ TEST(LogFormatTest, CharArray) {
|
|
|
834
969
|
LOG(INFO) << value;
|
|
835
970
|
}
|
|
836
971
|
|
|
972
|
+
TEST(LogFormatTest, WideCharArray) {
|
|
973
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
974
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
975
|
+
|
|
976
|
+
wchar_t value[] = L"value";
|
|
977
|
+
|
|
978
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq("value")),
|
|
979
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
980
|
+
ValueWithStr(Eq("value"))))))));
|
|
981
|
+
|
|
982
|
+
test_sink.StartCapturingLogs();
|
|
983
|
+
LOG(INFO) << value;
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
// Comprehensive test string for validating wchar_t to UTF-8 conversion.
|
|
987
|
+
// See details in absl/strings/internal/utf8_test.cc.
|
|
988
|
+
//
|
|
989
|
+
// clang-format off
|
|
990
|
+
#define ABSL_LOG_INTERNAL_WIDE_LITERAL L"Holá €1 你好 שָׁלוֹם 👍🏻🇺🇸👩❤️💋👨 中"
|
|
991
|
+
#define ABSL_LOG_INTERNAL_UTF8_LITERAL u8"Holá €1 你好 שָׁלוֹם 👍🏻🇺🇸👩❤️💋👨 中"
|
|
992
|
+
// clang-format on
|
|
993
|
+
|
|
994
|
+
absl::string_view GetUtf8TestString() {
|
|
995
|
+
// `u8""` forces UTF-8 encoding; MSVC will default to e.g. CP1252 (and warn)
|
|
996
|
+
// without it. However, the resulting character type differs between pre-C++20
|
|
997
|
+
// (`char`) and C++20 (`char8_t`). So we reinterpret_cast to `char*` and wrap
|
|
998
|
+
// it in a `string_view`.
|
|
999
|
+
static const absl::string_view kUtf8TestString(
|
|
1000
|
+
reinterpret_cast<const char*>(ABSL_LOG_INTERNAL_UTF8_LITERAL),
|
|
1001
|
+
sizeof(ABSL_LOG_INTERNAL_UTF8_LITERAL) - 1);
|
|
1002
|
+
return kUtf8TestString;
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
template <typename T>
|
|
1006
|
+
class WideStringLogFormatTest : public testing::Test {};
|
|
1007
|
+
using StringTypes =
|
|
1008
|
+
Types<std::wstring, const std::wstring, wchar_t[], const wchar_t*>;
|
|
1009
|
+
TYPED_TEST_SUITE(WideStringLogFormatTest, StringTypes);
|
|
1010
|
+
|
|
1011
|
+
TYPED_TEST(WideStringLogFormatTest, NonLiterals) {
|
|
1012
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1013
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1014
|
+
|
|
1015
|
+
TypeParam value = ABSL_LOG_INTERNAL_WIDE_LITERAL;
|
|
1016
|
+
absl::string_view utf8_value = GetUtf8TestString();
|
|
1017
|
+
|
|
1018
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq(utf8_value)),
|
|
1019
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
1020
|
+
ValueWithStr(Eq(utf8_value))))))));
|
|
1021
|
+
|
|
1022
|
+
test_sink.StartCapturingLogs();
|
|
1023
|
+
LOG(INFO) << value;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
TEST(WideStringLogFormatTest, StringView) {
|
|
1027
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1028
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1029
|
+
|
|
1030
|
+
std::wstring_view value = ABSL_LOG_INTERNAL_WIDE_LITERAL;
|
|
1031
|
+
absl::string_view utf8_value = GetUtf8TestString();
|
|
1032
|
+
|
|
1033
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq(utf8_value)),
|
|
1034
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
1035
|
+
ValueWithStr(Eq(utf8_value))))))));
|
|
1036
|
+
|
|
1037
|
+
test_sink.StartCapturingLogs();
|
|
1038
|
+
LOG(INFO) << value;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
TEST(WideStringLogFormatTest, Literal) {
|
|
1042
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1043
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1044
|
+
|
|
1045
|
+
absl::string_view utf8_value = GetUtf8TestString();
|
|
1046
|
+
|
|
1047
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq(utf8_value)),
|
|
1048
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
1049
|
+
ValueWithLiteral(Eq(utf8_value))))))));
|
|
1050
|
+
|
|
1051
|
+
test_sink.StartCapturingLogs();
|
|
1052
|
+
LOG(INFO) << ABSL_LOG_INTERNAL_WIDE_LITERAL;
|
|
1053
|
+
}
|
|
1054
|
+
|
|
1055
|
+
#undef ABSL_LOG_INTERNAL_WIDE_LITERAL
|
|
1056
|
+
#undef ABSL_LOG_INTERNAL_UTF8_LITERAL
|
|
1057
|
+
|
|
1058
|
+
TYPED_TEST(WideStringLogFormatTest, IsolatedLowSurrogatesAreReplaced) {
|
|
1059
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1060
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1061
|
+
|
|
1062
|
+
TypeParam value = L"AAA \xDC00 BBB";
|
|
1063
|
+
// NOLINTNEXTLINE(readability/utf8)
|
|
1064
|
+
absl::string_view utf8_value = "AAA � BBB";
|
|
1065
|
+
|
|
1066
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq(utf8_value)),
|
|
1067
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
1068
|
+
ValueWithStr(Eq(utf8_value))))))));
|
|
1069
|
+
|
|
1070
|
+
test_sink.StartCapturingLogs();
|
|
1071
|
+
LOG(INFO) << value;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
TYPED_TEST(WideStringLogFormatTest,
|
|
1075
|
+
DISABLED_IsolatedHighSurrogatesAreReplaced) {
|
|
1076
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1077
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1078
|
+
|
|
1079
|
+
TypeParam value = L"AAA \xD800 BBB";
|
|
1080
|
+
// NOLINTNEXTLINE(readability/utf8)
|
|
1081
|
+
absl::string_view utf8_value = "AAA � BBB";
|
|
1082
|
+
// Currently, this is "AAA \xF0\x90 BBB".
|
|
1083
|
+
|
|
1084
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq(utf8_value)),
|
|
1085
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
1086
|
+
ValueWithStr(Eq(utf8_value))))))));
|
|
1087
|
+
|
|
1088
|
+
test_sink.StartCapturingLogs();
|
|
1089
|
+
LOG(INFO) << value;
|
|
1090
|
+
}
|
|
1091
|
+
|
|
1092
|
+
TYPED_TEST(WideStringLogFormatTest,
|
|
1093
|
+
DISABLED_ConsecutiveHighSurrogatesAreReplaced) {
|
|
1094
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1095
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1096
|
+
|
|
1097
|
+
TypeParam value = L"AAA \xD800\xD800 BBB";
|
|
1098
|
+
// NOLINTNEXTLINE(readability/utf8)
|
|
1099
|
+
absl::string_view utf8_value = "AAA �� BBB";
|
|
1100
|
+
// Currently, this is "AAA \xF0\x90\xF0\x90 BBB".
|
|
1101
|
+
|
|
1102
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq(utf8_value)),
|
|
1103
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
1104
|
+
ValueWithStr(Eq(utf8_value))))))));
|
|
1105
|
+
|
|
1106
|
+
test_sink.StartCapturingLogs();
|
|
1107
|
+
LOG(INFO) << value;
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
TYPED_TEST(WideStringLogFormatTest,
|
|
1111
|
+
DISABLED_HighHighLowSurrogateSequencesAreReplaced) {
|
|
1112
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1113
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1114
|
+
|
|
1115
|
+
TypeParam value = L"AAA \xD800\xD800\xDC00 BBB";
|
|
1116
|
+
// NOLINTNEXTLINE(readability/utf8)
|
|
1117
|
+
absl::string_view utf8_value = "AAA �𐀀 BBB";
|
|
1118
|
+
// Currently, this is "AAA \xF0\x90𐀀 BBB".
|
|
1119
|
+
|
|
1120
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq(utf8_value)),
|
|
1121
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
1122
|
+
ValueWithStr(Eq(utf8_value))))))));
|
|
1123
|
+
|
|
1124
|
+
test_sink.StartCapturingLogs();
|
|
1125
|
+
LOG(INFO) << value;
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
TYPED_TEST(WideStringLogFormatTest,
|
|
1129
|
+
DISABLED_TrailingHighSurrogatesAreReplaced) {
|
|
1130
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1131
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1132
|
+
|
|
1133
|
+
TypeParam value = L"AAA \xD800";
|
|
1134
|
+
// NOLINTNEXTLINE(readability/utf8)
|
|
1135
|
+
absl::string_view utf8_value = "AAA �";
|
|
1136
|
+
// Currently, this is "AAA \xF0\x90".
|
|
1137
|
+
|
|
1138
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq(utf8_value)),
|
|
1139
|
+
ENCODED_MESSAGE(HasValues(ElementsAre(
|
|
1140
|
+
ValueWithStr(Eq(utf8_value))))))));
|
|
1141
|
+
|
|
1142
|
+
test_sink.StartCapturingLogs();
|
|
1143
|
+
LOG(INFO) << value;
|
|
1144
|
+
}
|
|
1145
|
+
|
|
1146
|
+
TYPED_TEST(WideStringLogFormatTest, EmptyWideString) {
|
|
1147
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1148
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1149
|
+
|
|
1150
|
+
TypeParam value = L"";
|
|
1151
|
+
|
|
1152
|
+
EXPECT_CALL(test_sink, Send(AllOf(TextMessage(Eq("")),
|
|
1153
|
+
ENCODED_MESSAGE(HasValues(
|
|
1154
|
+
ElementsAre(ValueWithStr(Eq(""))))))));
|
|
1155
|
+
|
|
1156
|
+
test_sink.StartCapturingLogs();
|
|
1157
|
+
LOG(INFO) << value;
|
|
1158
|
+
}
|
|
1159
|
+
|
|
1160
|
+
TEST(WideStringLogFormatTest, MixedNarrowAndWideStrings) {
|
|
1161
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1162
|
+
|
|
1163
|
+
EXPECT_CALL(test_sink, Log(_, _, "1234"));
|
|
1164
|
+
|
|
1165
|
+
test_sink.StartCapturingLogs();
|
|
1166
|
+
LOG(INFO) << "1" << L"2" << "3" << L"4";
|
|
1167
|
+
}
|
|
1168
|
+
|
|
837
1169
|
class CustomClass {};
|
|
838
1170
|
std::ostream& operator<<(std::ostream& os, const CustomClass&) {
|
|
839
1171
|
return os << "CustomClass{}";
|
|
@@ -841,6 +1173,7 @@ std::ostream& operator<<(std::ostream& os, const CustomClass&) {
|
|
|
841
1173
|
|
|
842
1174
|
TEST(LogFormatTest, Custom) {
|
|
843
1175
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1176
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
844
1177
|
|
|
845
1178
|
CustomClass value;
|
|
846
1179
|
auto comparison_stream = ComparisonStream();
|
|
@@ -867,6 +1200,7 @@ std::ostream& operator<<(std::ostream& os, const CustomClassNonCopyable&) {
|
|
|
867
1200
|
|
|
868
1201
|
TEST(LogFormatTest, CustomNonCopyable) {
|
|
869
1202
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1203
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
870
1204
|
|
|
871
1205
|
CustomClassNonCopyable value;
|
|
872
1206
|
auto comparison_stream = ComparisonStream();
|
|
@@ -894,6 +1228,7 @@ struct Point {
|
|
|
894
1228
|
|
|
895
1229
|
TEST(LogFormatTest, AbslStringifyExample) {
|
|
896
1230
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1231
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
897
1232
|
|
|
898
1233
|
Point p;
|
|
899
1234
|
|
|
@@ -925,6 +1260,7 @@ ABSL_ATTRIBUTE_UNUSED std::ostream& operator<<(
|
|
|
925
1260
|
|
|
926
1261
|
TEST(LogFormatTest, CustomWithAbslStringifyAndOstream) {
|
|
927
1262
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1263
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
928
1264
|
|
|
929
1265
|
PointWithAbslStringifiyAndOstream p;
|
|
930
1266
|
|
|
@@ -948,6 +1284,7 @@ struct PointStreamsNothing {
|
|
|
948
1284
|
|
|
949
1285
|
TEST(LogFormatTest, AbslStringifyStreamsNothing) {
|
|
950
1286
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1287
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
951
1288
|
|
|
952
1289
|
PointStreamsNothing p;
|
|
953
1290
|
|
|
@@ -974,6 +1311,7 @@ struct PointMultipleAppend {
|
|
|
974
1311
|
|
|
975
1312
|
TEST(LogFormatTest, AbslStringifyMultipleAppend) {
|
|
976
1313
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1314
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
977
1315
|
|
|
978
1316
|
PointMultipleAppend p;
|
|
979
1317
|
|
|
@@ -989,6 +1327,7 @@ TEST(LogFormatTest, AbslStringifyMultipleAppend) {
|
|
|
989
1327
|
|
|
990
1328
|
TEST(ManipulatorLogFormatTest, BoolAlphaTrue) {
|
|
991
1329
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1330
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
992
1331
|
|
|
993
1332
|
const bool value = true;
|
|
994
1333
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1013,6 +1352,7 @@ TEST(ManipulatorLogFormatTest, BoolAlphaTrue) {
|
|
|
1013
1352
|
|
|
1014
1353
|
TEST(ManipulatorLogFormatTest, BoolAlphaFalse) {
|
|
1015
1354
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1355
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1016
1356
|
|
|
1017
1357
|
const bool value = false;
|
|
1018
1358
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1037,6 +1377,7 @@ TEST(ManipulatorLogFormatTest, BoolAlphaFalse) {
|
|
|
1037
1377
|
|
|
1038
1378
|
TEST(ManipulatorLogFormatTest, ShowPoint) {
|
|
1039
1379
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1380
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1040
1381
|
|
|
1041
1382
|
const double value = 77.0;
|
|
1042
1383
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1061,6 +1402,7 @@ TEST(ManipulatorLogFormatTest, ShowPoint) {
|
|
|
1061
1402
|
|
|
1062
1403
|
TEST(ManipulatorLogFormatTest, ShowPos) {
|
|
1063
1404
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1405
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1064
1406
|
|
|
1065
1407
|
const int value = 77;
|
|
1066
1408
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1084,6 +1426,7 @@ TEST(ManipulatorLogFormatTest, ShowPos) {
|
|
|
1084
1426
|
|
|
1085
1427
|
TEST(ManipulatorLogFormatTest, UppercaseFloat) {
|
|
1086
1428
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1429
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1087
1430
|
|
|
1088
1431
|
const double value = 7.7e7;
|
|
1089
1432
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1108,6 +1451,7 @@ TEST(ManipulatorLogFormatTest, UppercaseFloat) {
|
|
|
1108
1451
|
|
|
1109
1452
|
TEST(ManipulatorLogFormatTest, Hex) {
|
|
1110
1453
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1454
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1111
1455
|
|
|
1112
1456
|
const int value = 0x77;
|
|
1113
1457
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1125,6 +1469,7 @@ TEST(ManipulatorLogFormatTest, Hex) {
|
|
|
1125
1469
|
|
|
1126
1470
|
TEST(ManipulatorLogFormatTest, Oct) {
|
|
1127
1471
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1472
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1128
1473
|
|
|
1129
1474
|
const int value = 077;
|
|
1130
1475
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1143,6 +1488,7 @@ TEST(ManipulatorLogFormatTest, Oct) {
|
|
|
1143
1488
|
|
|
1144
1489
|
TEST(ManipulatorLogFormatTest, Dec) {
|
|
1145
1490
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1491
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1146
1492
|
|
|
1147
1493
|
const int value = 77;
|
|
1148
1494
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1160,6 +1506,7 @@ TEST(ManipulatorLogFormatTest, Dec) {
|
|
|
1160
1506
|
|
|
1161
1507
|
TEST(ManipulatorLogFormatTest, ShowbaseHex) {
|
|
1162
1508
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1509
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1163
1510
|
|
|
1164
1511
|
const int value = 0x77;
|
|
1165
1512
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1186,6 +1533,7 @@ TEST(ManipulatorLogFormatTest, ShowbaseHex) {
|
|
|
1186
1533
|
|
|
1187
1534
|
TEST(ManipulatorLogFormatTest, ShowbaseOct) {
|
|
1188
1535
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1536
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1189
1537
|
|
|
1190
1538
|
const int value = 077;
|
|
1191
1539
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1211,6 +1559,7 @@ TEST(ManipulatorLogFormatTest, ShowbaseOct) {
|
|
|
1211
1559
|
|
|
1212
1560
|
TEST(ManipulatorLogFormatTest, UppercaseHex) {
|
|
1213
1561
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1562
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1214
1563
|
|
|
1215
1564
|
const int value = 0xbeef;
|
|
1216
1565
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1238,6 +1587,7 @@ TEST(ManipulatorLogFormatTest, UppercaseHex) {
|
|
|
1238
1587
|
|
|
1239
1588
|
TEST(ManipulatorLogFormatTest, FixedFloat) {
|
|
1240
1589
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1590
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1241
1591
|
|
|
1242
1592
|
const double value = 7.7e7;
|
|
1243
1593
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1255,6 +1605,7 @@ TEST(ManipulatorLogFormatTest, FixedFloat) {
|
|
|
1255
1605
|
|
|
1256
1606
|
TEST(ManipulatorLogFormatTest, ScientificFloat) {
|
|
1257
1607
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1608
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1258
1609
|
|
|
1259
1610
|
const double value = 7.7e7;
|
|
1260
1611
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1278,6 +1629,7 @@ TEST(ManipulatorLogFormatTest, ScientificFloat) {
|
|
|
1278
1629
|
#else
|
|
1279
1630
|
TEST(ManipulatorLogFormatTest, FixedAndScientificFloat) {
|
|
1280
1631
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1632
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1281
1633
|
|
|
1282
1634
|
const double value = 7.7e7;
|
|
1283
1635
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1311,6 +1663,7 @@ TEST(ManipulatorLogFormatTest, FixedAndScientificFloat) {
|
|
|
1311
1663
|
#else
|
|
1312
1664
|
TEST(ManipulatorLogFormatTest, HexfloatFloat) {
|
|
1313
1665
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1666
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1314
1667
|
|
|
1315
1668
|
const double value = 7.7e7;
|
|
1316
1669
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1332,6 +1685,7 @@ TEST(ManipulatorLogFormatTest, HexfloatFloat) {
|
|
|
1332
1685
|
|
|
1333
1686
|
TEST(ManipulatorLogFormatTest, DefaultFloatFloat) {
|
|
1334
1687
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1688
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1335
1689
|
|
|
1336
1690
|
const double value = 7.7e7;
|
|
1337
1691
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1349,6 +1703,7 @@ TEST(ManipulatorLogFormatTest, DefaultFloatFloat) {
|
|
|
1349
1703
|
|
|
1350
1704
|
TEST(ManipulatorLogFormatTest, Ends) {
|
|
1351
1705
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1706
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1352
1707
|
|
|
1353
1708
|
auto comparison_stream = ComparisonStream();
|
|
1354
1709
|
comparison_stream << std::ends;
|
|
@@ -1365,6 +1720,7 @@ TEST(ManipulatorLogFormatTest, Ends) {
|
|
|
1365
1720
|
|
|
1366
1721
|
TEST(ManipulatorLogFormatTest, Endl) {
|
|
1367
1722
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1723
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1368
1724
|
|
|
1369
1725
|
auto comparison_stream = ComparisonStream();
|
|
1370
1726
|
comparison_stream << std::endl;
|
|
@@ -1382,6 +1738,7 @@ TEST(ManipulatorLogFormatTest, Endl) {
|
|
|
1382
1738
|
|
|
1383
1739
|
TEST(ManipulatorLogFormatTest, SetIosFlags) {
|
|
1384
1740
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1741
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1385
1742
|
|
|
1386
1743
|
const int value = 0x77;
|
|
1387
1744
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1411,6 +1768,7 @@ TEST(ManipulatorLogFormatTest, SetIosFlags) {
|
|
|
1411
1768
|
|
|
1412
1769
|
TEST(ManipulatorLogFormatTest, SetBase) {
|
|
1413
1770
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1771
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1414
1772
|
|
|
1415
1773
|
const int value = 0x77;
|
|
1416
1774
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1435,6 +1793,7 @@ TEST(ManipulatorLogFormatTest, SetBase) {
|
|
|
1435
1793
|
|
|
1436
1794
|
TEST(ManipulatorLogFormatTest, SetPrecision) {
|
|
1437
1795
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1796
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1438
1797
|
|
|
1439
1798
|
const double value = 6.022140857e23;
|
|
1440
1799
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1456,6 +1815,7 @@ TEST(ManipulatorLogFormatTest, SetPrecision) {
|
|
|
1456
1815
|
|
|
1457
1816
|
TEST(ManipulatorLogFormatTest, SetPrecisionOverflow) {
|
|
1458
1817
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1818
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1459
1819
|
|
|
1460
1820
|
const double value = 6.022140857e23;
|
|
1461
1821
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1473,6 +1833,7 @@ TEST(ManipulatorLogFormatTest, SetPrecisionOverflow) {
|
|
|
1473
1833
|
|
|
1474
1834
|
TEST(ManipulatorLogFormatTest, SetW) {
|
|
1475
1835
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1836
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1476
1837
|
|
|
1477
1838
|
const int value = 77;
|
|
1478
1839
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1494,6 +1855,7 @@ TEST(ManipulatorLogFormatTest, SetW) {
|
|
|
1494
1855
|
|
|
1495
1856
|
TEST(ManipulatorLogFormatTest, Left) {
|
|
1496
1857
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1858
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1497
1859
|
|
|
1498
1860
|
const int value = -77;
|
|
1499
1861
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1511,6 +1873,7 @@ TEST(ManipulatorLogFormatTest, Left) {
|
|
|
1511
1873
|
|
|
1512
1874
|
TEST(ManipulatorLogFormatTest, Right) {
|
|
1513
1875
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1876
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1514
1877
|
|
|
1515
1878
|
const int value = -77;
|
|
1516
1879
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1528,6 +1891,7 @@ TEST(ManipulatorLogFormatTest, Right) {
|
|
|
1528
1891
|
|
|
1529
1892
|
TEST(ManipulatorLogFormatTest, Internal) {
|
|
1530
1893
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1894
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1531
1895
|
|
|
1532
1896
|
const int value = -77;
|
|
1533
1897
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1545,6 +1909,7 @@ TEST(ManipulatorLogFormatTest, Internal) {
|
|
|
1545
1909
|
|
|
1546
1910
|
TEST(ManipulatorLogFormatTest, SetFill) {
|
|
1547
1911
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1912
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1548
1913
|
|
|
1549
1914
|
const int value = 77;
|
|
1550
1915
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1571,6 +1936,7 @@ std::ostream& operator<<(std::ostream& os, const FromCustomClass&) {
|
|
|
1571
1936
|
|
|
1572
1937
|
TEST(ManipulatorLogFormatTest, FromCustom) {
|
|
1573
1938
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1939
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1574
1940
|
|
|
1575
1941
|
FromCustomClass value;
|
|
1576
1942
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1593,6 +1959,7 @@ std::ostream& operator<<(std::ostream& os, const StreamsNothing&) { return os; }
|
|
|
1593
1959
|
|
|
1594
1960
|
TEST(ManipulatorLogFormatTest, CustomClassStreamsNothing) {
|
|
1595
1961
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1962
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1596
1963
|
|
|
1597
1964
|
StreamsNothing value;
|
|
1598
1965
|
auto comparison_stream = ComparisonStream();
|
|
@@ -1620,6 +1987,7 @@ struct PointPercentV {
|
|
|
1620
1987
|
|
|
1621
1988
|
TEST(ManipulatorLogFormatTest, IOManipsDoNotAffectAbslStringify) {
|
|
1622
1989
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
1990
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1623
1991
|
|
|
1624
1992
|
PointPercentV p;
|
|
1625
1993
|
|
|
@@ -1635,6 +2003,7 @@ TEST(ManipulatorLogFormatTest, IOManipsDoNotAffectAbslStringify) {
|
|
|
1635
2003
|
|
|
1636
2004
|
TEST(StructuredLoggingOverflowTest, TruncatesStrings) {
|
|
1637
2005
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2006
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1638
2007
|
|
|
1639
2008
|
// This message is too long and should be truncated to some unspecified size
|
|
1640
2009
|
// no greater than the buffer size but not too much less either. It should be
|
|
@@ -1655,6 +2024,30 @@ TEST(StructuredLoggingOverflowTest, TruncatesStrings) {
|
|
|
1655
2024
|
LOG(INFO) << std::string(2 * absl::log_internal::kLogMessageBufferSize, 'x');
|
|
1656
2025
|
}
|
|
1657
2026
|
|
|
2027
|
+
TEST(StructuredLoggingOverflowTest, TruncatesWideStrings) {
|
|
2028
|
+
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2029
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
2030
|
+
|
|
2031
|
+
// This message is too long and should be truncated to some unspecified size
|
|
2032
|
+
// no greater than the buffer size but not too much less either. It should be
|
|
2033
|
+
// truncated rather than discarded.
|
|
2034
|
+
EXPECT_CALL(
|
|
2035
|
+
test_sink,
|
|
2036
|
+
Send(AllOf(
|
|
2037
|
+
TextMessage(AllOf(
|
|
2038
|
+
SizeIs(AllOf(Ge(absl::log_internal::kLogMessageBufferSize - 256),
|
|
2039
|
+
Le(absl::log_internal::kLogMessageBufferSize))),
|
|
2040
|
+
Each(Eq('x')))),
|
|
2041
|
+
ENCODED_MESSAGE(HasOneStrThat(AllOf(
|
|
2042
|
+
SizeIs(AllOf(Ge(absl::log_internal::kLogMessageBufferSize - 256),
|
|
2043
|
+
Le(absl::log_internal::kLogMessageBufferSize))),
|
|
2044
|
+
Each(Eq('x'))))))));
|
|
2045
|
+
|
|
2046
|
+
test_sink.StartCapturingLogs();
|
|
2047
|
+
LOG(INFO) << std::wstring(2 * absl::log_internal::kLogMessageBufferSize,
|
|
2048
|
+
L'x');
|
|
2049
|
+
}
|
|
2050
|
+
|
|
1658
2051
|
struct StringLike {
|
|
1659
2052
|
absl::string_view data;
|
|
1660
2053
|
};
|
|
@@ -1664,6 +2057,7 @@ std::ostream& operator<<(std::ostream& os, StringLike str) {
|
|
|
1664
2057
|
|
|
1665
2058
|
TEST(StructuredLoggingOverflowTest, TruncatesInsertionOperators) {
|
|
1666
2059
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2060
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1667
2061
|
|
|
1668
2062
|
// This message is too long and should be truncated to some unspecified size
|
|
1669
2063
|
// no greater than the buffer size but not too much less either. It should be
|
|
@@ -1715,6 +2109,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesStringsCleanly) {
|
|
|
1715
2109
|
// sizes. To put any data in the field we need a fifth byte.
|
|
1716
2110
|
{
|
|
1717
2111
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2112
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1718
2113
|
EXPECT_CALL(test_sink,
|
|
1719
2114
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
|
|
1720
2115
|
AllOf(SizeIs(longest_fit), Each(Eq('x'))))),
|
|
@@ -1725,6 +2120,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesStringsCleanly) {
|
|
|
1725
2120
|
}
|
|
1726
2121
|
{
|
|
1727
2122
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2123
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1728
2124
|
EXPECT_CALL(test_sink,
|
|
1729
2125
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
|
|
1730
2126
|
AllOf(SizeIs(longest_fit - 1), Each(Eq('x'))))),
|
|
@@ -1735,6 +2131,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesStringsCleanly) {
|
|
|
1735
2131
|
}
|
|
1736
2132
|
{
|
|
1737
2133
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2134
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1738
2135
|
EXPECT_CALL(test_sink,
|
|
1739
2136
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
|
|
1740
2137
|
AllOf(SizeIs(longest_fit - 2), Each(Eq('x'))))),
|
|
@@ -1745,6 +2142,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesStringsCleanly) {
|
|
|
1745
2142
|
}
|
|
1746
2143
|
{
|
|
1747
2144
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2145
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1748
2146
|
EXPECT_CALL(test_sink,
|
|
1749
2147
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
|
|
1750
2148
|
AllOf(SizeIs(longest_fit - 3), Each(Eq('x'))))),
|
|
@@ -1755,6 +2153,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesStringsCleanly) {
|
|
|
1755
2153
|
}
|
|
1756
2154
|
{
|
|
1757
2155
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2156
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1758
2157
|
EXPECT_CALL(test_sink,
|
|
1759
2158
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrAndOneLiteralThat(
|
|
1760
2159
|
AllOf(SizeIs(longest_fit - 4), Each(Eq('x'))),
|
|
@@ -1767,6 +2166,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesStringsCleanly) {
|
|
|
1767
2166
|
}
|
|
1768
2167
|
{
|
|
1769
2168
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2169
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1770
2170
|
EXPECT_CALL(
|
|
1771
2171
|
test_sink,
|
|
1772
2172
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrAndOneLiteralThat(
|
|
@@ -1784,6 +2184,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesInsertionOperatorsCleanly) {
|
|
|
1784
2184
|
// sizes. To put any data in the field we need a fifth byte.
|
|
1785
2185
|
{
|
|
1786
2186
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2187
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1787
2188
|
EXPECT_CALL(test_sink,
|
|
1788
2189
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
|
|
1789
2190
|
AllOf(SizeIs(longest_fit), Each(Eq('x'))))),
|
|
@@ -1794,6 +2195,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesInsertionOperatorsCleanly) {
|
|
|
1794
2195
|
}
|
|
1795
2196
|
{
|
|
1796
2197
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2198
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1797
2199
|
EXPECT_CALL(test_sink,
|
|
1798
2200
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
|
|
1799
2201
|
AllOf(SizeIs(longest_fit - 1), Each(Eq('x'))))),
|
|
@@ -1805,6 +2207,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesInsertionOperatorsCleanly) {
|
|
|
1805
2207
|
}
|
|
1806
2208
|
{
|
|
1807
2209
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2210
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1808
2211
|
EXPECT_CALL(test_sink,
|
|
1809
2212
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
|
|
1810
2213
|
AllOf(SizeIs(longest_fit - 2), Each(Eq('x'))))),
|
|
@@ -1816,6 +2219,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesInsertionOperatorsCleanly) {
|
|
|
1816
2219
|
}
|
|
1817
2220
|
{
|
|
1818
2221
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2222
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1819
2223
|
EXPECT_CALL(test_sink,
|
|
1820
2224
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
|
|
1821
2225
|
AllOf(SizeIs(longest_fit - 3), Each(Eq('x'))))),
|
|
@@ -1827,6 +2231,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesInsertionOperatorsCleanly) {
|
|
|
1827
2231
|
}
|
|
1828
2232
|
{
|
|
1829
2233
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2234
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1830
2235
|
EXPECT_CALL(test_sink,
|
|
1831
2236
|
Send(AllOf(ENCODED_MESSAGE(HasOneStrThat(
|
|
1832
2237
|
AllOf(SizeIs(longest_fit - 4), Each(Eq('x'))))),
|
|
@@ -1840,6 +2245,7 @@ TEST(StructuredLoggingOverflowTest, TruncatesInsertionOperatorsCleanly) {
|
|
|
1840
2245
|
}
|
|
1841
2246
|
{
|
|
1842
2247
|
absl::ScopedMockLog test_sink(absl::MockLogDefault::kDisallowUnexpected);
|
|
2248
|
+
EXPECT_CALL(test_sink, Send).Times(0);
|
|
1843
2249
|
EXPECT_CALL(
|
|
1844
2250
|
test_sink,
|
|
1845
2251
|
Send(AllOf(ENCODED_MESSAGE(HasTwoStrsThat(
|