protovalidate 0.1.0.beta1
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.
- checksums.yaml +7 -0
- data/.yardopts +8 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +201 -0
- data/NOTICE.md +30 -0
- data/README.md +93 -0
- data/Rakefile +32 -0
- data/ext/protovalidate/Cargo.lock +342 -0
- data/ext/protovalidate/Cargo.toml +27 -0
- data/ext/protovalidate/build.rs +4 -0
- data/ext/protovalidate/extconf.rb +8 -0
- data/ext/protovalidate/src/lib.rs +161 -0
- data/ext/protovalidate/sys/Cargo.toml +11 -0
- data/ext/protovalidate/sys/build.rs +218 -0
- data/ext/protovalidate/sys/filelists/absl.txt +126 -0
- data/ext/protovalidate/sys/filelists/antlr4.txt +139 -0
- data/ext/protovalidate/sys/filelists/celcpp.txt +199 -0
- data/ext/protovalidate/sys/filelists/protobuf.txt +83 -0
- data/ext/protovalidate/sys/filelists/protovalidate.txt +14 -0
- data/ext/protovalidate/sys/filelists/re2.txt +25 -0
- data/ext/protovalidate/sys/gen/buf/validate/validate.pb.cc +23621 -0
- data/ext/protovalidate/sys/gen/buf/validate/validate.pb.h +27800 -0
- data/ext/protovalidate/sys/gen/cel/expr/checked.pb.cc +6286 -0
- data/ext/protovalidate/sys/gen/cel/expr/checked.pb.h +6412 -0
- data/ext/protovalidate/sys/gen/cel/expr/syntax.pb.cc +7423 -0
- data/ext/protovalidate/sys/gen/cel/expr/syntax.pb.h +7510 -0
- data/ext/protovalidate/sys/gen/cel/expr/value.pb.cc +2512 -0
- data/ext/protovalidate/sys/gen/cel/expr/value.pb.h +2589 -0
- data/ext/protovalidate/sys/gen/internal/empty_descriptor_set_embed.inc +1 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelBaseVisitor.cpp +9 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelBaseVisitor.h +167 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelLexer.cpp +308 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelLexer.h +57 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelParser.cpp +2484 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelParser.h +697 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelVisitor.cpp +9 -0
- data/ext/protovalidate/sys/gen/parser/internal/CelVisitor.h +98 -0
- data/ext/protovalidate/sys/shim/pv_shim.cc +260 -0
- data/ext/protovalidate/sys/shim/pv_shim.h +84 -0
- data/ext/protovalidate/sys/src/lib.rs +176 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/LICENSE +203 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/algorithm/algorithm.h +96 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/algorithm/container.h +2011 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/attributes.h +1100 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/call_once.h +228 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/casts.cc +61 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/casts.h +313 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/config.h +898 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/const_init.h +76 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/dynamic_annotations.h +480 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/fast_type_id.h +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +200 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/atomic_hook_test_helper.h +34 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/cycleclock.cc +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/cycleclock.h +144 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/cycleclock_config.h +55 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/direct_mmap.h +170 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +398 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/endian.h +279 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/exception_safety_testing.h +1112 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/exception_testing.h +42 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/hardening.h +136 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/hide_ptr.h +51 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/iterator_traits.h +75 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/iterator_traits_test_helper.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +667 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +133 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +196 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/nullability_traits.h +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/per_thread_tls.h +52 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/poison.h +59 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/pretty_function.h +33 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +279 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/raw_logging.h +217 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/scheduling_mode.h +58 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/scoped_set_env.h +45 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock.cc +225 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock.h +310 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_akaros.inc +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +46 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_wait.cc +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_wait.h +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/spinlock_win32.inc +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/strerror.cc +88 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/strerror.h +39 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +493 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/sysinfo.h +74 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/thread_identity.cc +163 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/thread_identity.h +325 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/tracing.cc +39 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/tracing.h +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/tsan_mutex_interface.h +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/unaligned_access.h +89 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +134 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +118 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +62 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/log_severity.cc +56 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/log_severity.h +185 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/macros.h +259 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/no_destructor.h +191 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/nullability.h +318 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/optimization.h +311 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/options.h +212 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/policy_checks.h +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/port.h +25 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/prefetch.h +209 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/thread_annotations.h +333 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/throw_delegate.cc +205 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/base/throw_delegate.h +65 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/cleanup/cleanup.h +143 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/cleanup/internal/cleanup.h +100 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/btree_map.h +941 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/btree_set.h +872 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/chunked_queue.h +757 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/fixed_array.h +548 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/flat_hash_map.h +714 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/flat_hash_set.h +604 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/hash_container_defaults.h +45 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/inlined_vector.h +1025 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/btree.h +3157 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/btree_container.h +875 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/chunked_queue.h +173 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/common.h +302 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h +151 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +275 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/container_memory.h +571 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +281 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hash_generator_testing.h +172 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hash_policy_testing.h +173 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +195 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtable_control_bytes.h +527 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtable_debug.h +102 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtable_debug_hooks.h +85 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +316 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +294 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler_force_weak_definition.cc +31 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/heterogeneous_lookup_testing.h +80 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +1094 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/layout.h +828 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/node_slot_policy.h +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +380 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +2110 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +4056 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl.h +79 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/test_allocator.h +387 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/test_instance_tracker.h +274 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/internal/tracked.h +83 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/linked_hash_map.h +666 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/linked_hash_set.h +527 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/node_hash_map.h +710 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/container/node_hash_set.h +603 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/crc32c.cc +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/crc32c.h +192 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/cpu_detect.cc +359 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/cpu_detect.h +69 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc.cc +435 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc.h +83 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +319 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc32c.h +39 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc32c_inline.h +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_cord_state.cc +131 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_cord_state.h +159 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_internal.h +161 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_memcpy.h +122 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_memcpy_fallback.cc +78 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_memcpy_x86_arm_combined.cc +459 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_non_temporal_memcpy.cc +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +824 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/non_temporal_arm_intrinsics.h +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/crc/internal/non_temporal_memcpy.h +195 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/failure_signal_handler.h +121 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.cc +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/address_is_readable.h +32 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/addresses.h +57 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/bounded_utf8_length_sequence.h +126 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.cc +258 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/decode_rust_punycode.h +55 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +2958 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/demangle.h +76 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.cc +925 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.cc +413 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +141 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc +334 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/examine_stack.h +70 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stack_consumption.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +299 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_arm-inl.inc +148 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +96 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +121 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +121 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +270 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +208 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_unimplemented-inl.inc +25 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_win32-inl.inc +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +410 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +163 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.cc +70 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/utf8_for_code_point.h +47 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +209 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/internal/vdso_support.h +158 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/leak_check.cc +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/leak_check.h +150 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/stacktrace.cc +204 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/stacktrace.h +259 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize.cc +62 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize.h +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_darwin.inc +102 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +1708 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +63 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/commandlineflag.h +220 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/config.h +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/declare.h +77 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/flag.h +307 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/commandlineflag.h +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/flag.h +969 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/parse.h +70 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/path_util.h +62 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/private_handle_accessor.h +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/program_name.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/registry.h +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/sequence_lock.h +187 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/internal/usage.h +106 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/marshalling.h +335 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/parse.h +130 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/reflection.h +90 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/usage.h +43 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/flags/usage_config.h +135 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/any_invocable.h +335 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/bind_back.h +79 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/bind_front.h +200 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/function_ref.h +249 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +787 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/internal/back_binder.h +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/internal/front_binder.h +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/internal/function_ref.h +151 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/functional/overload.h +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/hash.h +466 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/hash_testing.h +382 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/city.cc +337 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/city.h +78 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/hash.cc +430 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/hash.h +1619 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/spy_hash_state.h +289 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/hash/internal/weakly_mixed_integer.h +38 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/absl_check.h +117 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/absl_log.h +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/absl_vlog_is_on.h +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/check.h +210 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/check_test_impl.inc +1035 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/die_if_null.cc +34 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/die_if_null.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/flags.h +43 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/globals.cc +178 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/globals.h +230 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/initialize.h +45 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/append_truncated.h +75 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/check_impl.h +151 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/check_op.cc +147 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/check_op.h +565 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/conditions.cc +85 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/conditions.h +247 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/config.h +45 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/container.h +312 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/flags.h +59 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/fnmatch.cc +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/fnmatch.h +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/globals.cc +145 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/globals.h +101 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_format.cc +205 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_format.h +78 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_impl.h +280 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_message.cc +788 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_message.h +469 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_sink_set.cc +296 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/log_sink_set.h +54 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/nullguard.cc +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/nullguard.h +88 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/nullstream.h +128 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/proto.cc +231 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/proto.h +298 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/strip.h +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/structured.h +160 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/structured_proto.cc +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/structured_proto.h +108 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/test_actions.h +90 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/test_helpers.h +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/test_matchers.h +94 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/vlog_config.cc +347 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/vlog_config.h +164 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/internal/voidify.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log.h +378 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_basic_test_impl.inc +654 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_entry.cc +263 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_entry.h +223 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_sink.cc +23 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_sink.h +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_sink_registry.h +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/log_streamer.h +208 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/scoped_mock_log.h +203 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/structured.h +75 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/log/vlog_is_on.h +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/memory/memory.h +328 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/meta/internal/constexpr_testing.h +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/meta/internal/requires.h +67 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/meta/type_traits.h +646 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/bits.h +262 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/int128.cc +344 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/int128.h +1224 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +303 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +347 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/internal/bits.h +394 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/numeric/internal/representation.h +55 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/hashtable.h +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.cc +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/exponential_biased.h +130 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/periodic_sampler.h +211 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/profile_builder.h +161 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h +253 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/bernoulli_distribution.h +202 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/beta_distribution.h +429 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/bit_gen_ref.h +160 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/discrete_distribution.h +249 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/distributions.h +450 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/exponential_distribution.h +166 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/gaussian_distribution.h +276 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/chi_square.h +89 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +83 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/distribution_test_util.h +113 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/entropy_pool.h +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/explicit_seed_seq.h +92 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/fast_uniform_bits.h +271 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/fastmath.h +57 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/generate_real.h +144 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/iostream_state_saver.h +248 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/mock_helpers.h +134 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/mock_overload_set.h +122 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/mock_validators.h +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/nanobenchmark.h +172 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +160 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/pcg_engine.h +287 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/platform.h +158 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen.h +96 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_detect.h +33 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_engine.h +265 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_hwaes.h +50 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_slow.h +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/randen_traits.h +88 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/salted_seed_seq.h +166 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/seed_material.h +105 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/sequence_urbg.h +60 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/traits.h +170 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/uniform_helper.h +244 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/internal/wide_multiply.h +95 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/log_uniform_int_distribution.h +253 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/mock_distributions.h +269 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/mocking_access.h +74 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/mocking_bit_gen.h +227 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/poisson_distribution.h +262 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/random.h +224 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/seed_gen_exception.h +55 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/seed_sequences.h +112 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/uniform_int_distribution.h +276 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/uniform_real_distribution.h +204 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/random/zipf_distribution.h +273 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/internal/status_internal.cc +296 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/internal/status_internal.h +157 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/internal/status_matchers.h +260 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +657 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status.cc +413 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status.h +1174 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_builder.h +978 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_macros.h +484 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_matchers.h +167 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_payload_printer.cc +36 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/status_payload_printer.h +53 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/statusor.cc +106 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/status/statusor.h +776 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/ascii.cc +296 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/ascii.h +288 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/charconv.cc +1442 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/charconv.h +123 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/charset.h +163 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord.cc +1601 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord.h +1773 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord_analysis.cc +196 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord_analysis.h +63 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord_buffer.h +574 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cord_test_helpers.h +122 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/cordz_test_helpers.h +152 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/escaping.cc +1183 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/escaping.h +195 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/has_absl_stringify.h +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/has_ostream_operator.h +42 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/append_and_overwrite.h +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.cc +357 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/charconv_bigint.h +433 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/charconv_parse.cc +504 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/charconv_parse.h +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_data_edge.h +63 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_internal.cc +70 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +942 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.cc +1237 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree.h +944 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.cc +187 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_navigator.h +267 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.cc +69 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_btree_reader.h +212 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.cc +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_consume.h +47 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.cc +56 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_crc.h +103 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_flat.h +195 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cord_rep_test_util.h +205 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_functions.cc +102 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_functions.h +87 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc +165 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_handle.h +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +424 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_info.h +295 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_sample_token.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_statistics.h +88 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_update_scope.h +71 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/cordz_update_tracker.h +123 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.cc +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/escaping.cc +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/escaping.h +35 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/escaping_test_common.h +133 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/generic_printer.h +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/generic_printer_internal.h +444 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/memutil.cc +48 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/memutil.h +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/numbers_test_common.h +184 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/ostringstream.cc +43 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/ostringstream.h +114 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/pow10_helper.h +40 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +114 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h +248 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +615 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +653 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +275 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +237 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +98 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/constexpr_parser.h +357 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +53 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +456 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +2148 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +37 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +74 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +140 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +271 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +340 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +524 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/string_constant.h +67 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/stringify_sink.cc +28 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/stringify_sink.h +69 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/stringify_stream.h +119 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/utf8.cc +148 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/internal/utf8.h +64 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/match.cc +133 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/match.h +129 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/numbers.cc +1636 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/numbers.h +363 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/resize_and_overwrite.h +198 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_cat.cc +247 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_cat.h +668 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_format.h +887 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_join.h +301 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_replace.cc +91 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_replace.h +222 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_split.cc +144 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/str_split.h +587 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/string_view.h +60 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/strip.h +99 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/substitute.cc +187 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/strings/substitute.h +769 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/barrier.cc +52 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/barrier.h +79 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +73 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/blocking_counter.h +107 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +173 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.h +56 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/futex.h +177 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/futex_waiter.cc +107 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/futex_waiter.h +63 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +714 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.h +146 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.cc +220 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +178 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.cc +106 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +124 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/pthread_waiter.cc +163 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/pthread_waiter.h +60 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/sem_waiter.cc +118 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/sem_waiter.h +65 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.cc +87 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/stdcpp_waiter.h +56 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/thread_pool.h +96 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/waiter.h +69 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/waiter_base.cc +38 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/waiter_base.h +90 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/win32_waiter.cc +147 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/internal/win32_waiter.h +72 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/mutex.cc +2833 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/mutex.h +1352 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/notification.cc +85 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/synchronization/notification.h +133 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/civil_time.cc +200 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/civil_time.h +589 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/clock.cc +603 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/clock.h +81 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/clock_interface.h +93 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/duration.cc +918 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/format.cc +155 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time.h +332 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +644 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/time_zone.h +460 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/zone_info_source.h +102 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/civil_time_detail.cc +94 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/test_time_zone_names.h +33 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.cc +140 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_fixed.h +52 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +1069 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.cc +47 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_if.h +80 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.cc +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_impl.h +97 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.cc +1070 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_info.h +128 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.cc +333 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_libc.h +60 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +217 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_name_win.cc +185 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_name_win.h +37 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.cc +159 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_posix.h +132 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +115 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/cctz/src/zone_info_source.cc +116 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/get_current_time_chrono.inc +31 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/get_current_time_posix.inc +24 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/internal/test_util.h +33 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/simulated_clock.h +109 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/time.cc +507 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/time/time.h +1926 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/any.h +66 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/any_span.h +1067 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/compare.h +506 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/internal/any_span.h +477 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/internal/span.h +140 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/optional.h +68 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/optional_ref.h +295 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/source_location.cc +18 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/source_location.h +172 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/span.h +827 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/types/variant.h +139 -0
- data/ext/protovalidate/sys/third_party/abseil-cpp/absl/utility/utility.h +151 -0
- data/ext/protovalidate/sys/third_party/antlr4/LICENSE.txt +28 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRErrorListener.cpp +10 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRErrorListener.h +167 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp +10 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRErrorStrategy.h +121 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRFileStream.h +30 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +180 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ANTLRInputStream.h +79 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BailErrorStrategy.cpp +61 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BailErrorStrategy.h +59 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BaseErrorListener.cpp +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BaseErrorListener.h +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BufferedTokenStream.cpp +414 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/BufferedTokenStream.h +200 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CharStream.cpp +11 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CharStream.h +37 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonToken.cpp +193 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonToken.h +158 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +39 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonTokenFactory.h +74 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonTokenStream.cpp +78 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/CommonTokenStream.h +79 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +15 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ConsoleErrorListener.h +35 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +336 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/DefaultErrorStrategy.h +466 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp +84 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/DiagnosticErrorListener.h +80 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Exceptions.cpp +64 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Exceptions.h +99 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/FailedPredicateException.cpp +52 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/FailedPredicateException.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/FlatHashMap.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/FlatHashSet.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/InputMismatchException.cpp +18 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/InputMismatchException.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/IntStream.cpp +12 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/IntStream.h +218 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/InterpreterRuleContext.cpp +19 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/InterpreterRuleContext.h +45 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Lexer.cpp +294 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Lexer.h +196 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/LexerInterpreter.cpp +60 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/LexerInterpreter.h +46 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/LexerNoViableAltException.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/LexerNoViableAltException.h +31 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ListTokenSource.cpp +92 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ListTokenSource.h +88 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/NoViableAltException.cpp +46 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/NoViableAltException.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Parser.cpp +670 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Parser.h +461 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ParserInterpreter.cpp +294 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ParserInterpreter.h +173 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ParserRuleContext.cpp +138 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ParserRuleContext.h +147 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/ProxyErrorListener.h +38 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RecognitionException.cpp +65 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RecognitionException.h +98 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Recognizer.cpp +157 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Recognizer.h +160 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuleContext.cpp +144 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuleContext.h +141 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuleContextWithAltNum.cpp +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuleContextWithAltNum.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +54 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/RuntimeMetaData.h +155 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Token.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Token.h +92 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenFactory.h +30 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenSource.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenSource.h +85 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenStream.cpp +11 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenStream.h +137 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +428 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/TokenStreamRewriter.h +295 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +208 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/UnbufferedCharStream.h +117 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp +270 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/UnbufferedTokenStream.h +115 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Version.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Vocabulary.cpp +64 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/Vocabulary.h +177 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/WritableToken.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/WritableToken.h +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/antlr4-common.h +101 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/antlr4-runtime.h +168 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATN.cpp +159 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATN.h +133 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +106 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNConfig.h +157 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +233 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +157 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +39 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +48 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +628 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNSimulator.h +71 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNState.cpp +56 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNState.h +139 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNStateType.cpp +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNStateType.h +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ATNType.h +20 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +29 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ActionTransition.h +35 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/AmbiguityInfo.cpp +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/AmbiguityInfo.h +68 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +129 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +51 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/AtomTransition.h +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/BasicState.h +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/BlockEndState.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/BlockStartState.h +30 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.cpp +14 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h +47 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionEventInfo.cpp +14 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionEventInfo.h +70 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionInfo.cpp +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionInfo.h +227 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionState.cpp +12 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/DecisionState.h +34 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +31 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ErrorInfo.cpp +15 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ErrorInfo.h +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/HashUtils.h +18 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +189 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +76 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +67 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +44 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +621 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +199 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerAction.cpp +15 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerAction.h +100 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +108 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +128 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerActionType.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +59 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +45 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +75 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +50 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +76 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerModeAction.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +51 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +51 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.cpp +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/LoopEndState.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +22 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/NotSetTransition.h +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParseInfo.cpp +102 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParseInfo.h +102 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +1413 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +911 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ParserATNSimulatorOptions.h +50 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +29 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +35 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +17 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +62 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredicateTransition.h +50 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +601 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContext.h +225 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextCache.cpp +56 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextCache.h +63 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.cpp +167 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.h +101 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextMergeCacheOptions.h +71 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionContextType.h +21 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +202 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/PredictionMode.h +436 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +179 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +60 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RangeTransition.h +31 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RuleStartState.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RuleStopState.h +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/RuleTransition.h +42 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +418 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SemanticContext.h +237 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SemanticContextType.h +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SerializedATNView.h +101 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SetTransition.cpp +28 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SetTransition.h +38 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +79 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +37 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +19 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/TokensStartState.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/Transition.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/Transition.h +65 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/TransitionType.cpp +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/TransitionType.h +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +21 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/atn/WildcardTransition.h +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFA.cpp +115 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFA.h +96 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +60 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFASerializer.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFAState.cpp +59 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/DFAState.h +154 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +17 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +22 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/internal/Synchronization.cpp +100 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/internal/Synchronization.h +154 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +124 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/Interval.cpp +61 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/Interval.h +84 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +508 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/IntervalSet.h +190 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +120 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/MurmurHash.h +102 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/Predicate.cpp +4 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/misc/Predicate.h +21 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Any.cpp +8 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Any.h +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Arrays.cpp +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Arrays.h +149 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/BitSet.h +76 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/CPPUtils.cpp +207 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/CPPUtils.h +65 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Casts.h +34 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Declarations.h +161 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/StringUtils.cpp +38 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/StringUtils.h +16 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Unicode.h +28 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Utf8.cpp +242 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/support/Utf8.h +54 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +129 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ErrorNode.h +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +54 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +43 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +66 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTree.cpp +12 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTree.h +111 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeListener.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeListener.h +39 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeProperty.h +50 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeType.h +22 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +57 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +48 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +55 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/TerminalNode.h +40 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +54 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +32 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/Trees.cpp +241 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/Trees.h +78 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/Chunk.cpp +9 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/Chunk.h +44 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp +69 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.h +132 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +64 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h +105 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +370 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.h +185 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.cpp +77 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.h +117 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TagChunk.cpp +39 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TagChunk.h +86 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TextChunk.cpp +28 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TextChunk.h +51 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.cpp +36 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.h +80 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +154 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPath.h +86 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathElement.cpp +31 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathElement.h +40 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +180 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +53 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +13 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +22 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +20 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.h +27 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +30 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +20 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.h +25 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +33 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.h +26 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +23 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.cpp +24 -0
- data/ext/protovalidate/sys/third_party/antlr4/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.h +23 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/LICENSE +202 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/ast.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/attribute.cc +330 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/attribute.h +278 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/attribute_set.h +108 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/builtins.h +106 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_adapter.h +19 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_descriptor.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_result.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_result_set.cc +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/function_result_set.h +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/memory_manager_testing.h +54 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/message_wrapper.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/operators.h +91 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/unknown_set.cc +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/internal/unknown_set.h +131 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/kind.h +25 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/operators.h +507 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/base/type_provider.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/checker_options.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/builtins_arena.cc +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/builtins_arena.h +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/field_path.h +77 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/namespace_generator.h +120 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/proto_type_mask.h +111 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/proto_type_mask_registry.h +83 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/test_ast_helpers.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/type_check_env.h +249 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/type_checker_builder_impl.h +170 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/type_checker_impl.h +58 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/internal/type_inference_context.h +229 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/optional.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/standard_library.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_check_issue.cc +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_check_issue.h +69 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker.cc +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker_builder.h +186 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker_builder_factory.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/type_checker_subset_factory.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/validation_result.cc +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/checker/validation_result.h +117 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/checked_expr_conversion_example.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/exercise1.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/exercise10.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/exercise2.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/exercise4.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/codelab/network_functions.h +197 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/allocator.h +606 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/any.cc +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/any.h +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/arena.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/arena_string.h +365 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/arena_string_pool.h +86 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/arena_string_view.h +239 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/constant_proto.cc +123 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/constant_proto.h +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/expr_proto.cc +514 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/expr_proto.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/metadata.cc +262 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/metadata.h +920 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/navigable_ast_internal.h +311 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/navigable_ast_kinds.cc +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/navigable_ast_kinds.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/source_info_proto.cc +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast/source_info_proto.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast.cc +98 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast.h +157 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_proto.cc +547 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_proto.h +52 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_rewrite.cc +389 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_rewrite.h +146 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_traverse.cc +380 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_traverse.h +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_visitor.h +118 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/ast_visitor_base.h +88 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/casting.h +75 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/constant.cc +101 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/constant.h +491 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/container.cc +171 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/container.h +138 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/data.h +120 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/decl.cc +221 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/decl.h +446 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/decl_proto.h +50 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/decl_proto_v1alpha1.h +55 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/descriptor_pool_type_introspector.cc +244 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/descriptor_pool_type_introspector.h +106 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/expr.cc +320 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/expr.h +1720 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/expr_factory.h +402 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/expr_printer.h +57 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/format_type_name.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/function_descriptor.cc +98 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/function_descriptor.h +124 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/byte_string.cc +1074 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/byte_string.h +688 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/casting.h +237 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/metadata.h +41 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/reference_count.cc +118 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/reference_count.h +406 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/internal/value_conversion.h +115 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/json.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/kind.cc +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/kind.h +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/legacy_value.cc +1324 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/legacy_value.h +131 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/memory.cc +83 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/memory.h +1505 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/memory_testing.h +71 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/minimal_descriptor_database.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/minimal_descriptor_pool.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/native_type.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/navigable_ast.cc +202 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/navigable_ast.h +168 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/operators.cc +233 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/operators.h +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/optional_ref.h +163 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/reference.h +269 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/reference_count.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/signature.cc +640 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/signature.h +101 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/source.cc +679 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/source.h +261 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/standard_definitions.h +349 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type.cc +737 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type.h +1303 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_introspector.cc +277 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_introspector.h +157 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_kind.h +113 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_proto.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_reflector.h +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_spec_resolver.cc +324 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_spec_resolver.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/type_testing.h +24 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/typeinfo.cc +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/typeinfo.h +221 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/any_type.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/basic_struct_type.cc +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/basic_struct_type.h +119 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/bool_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/bool_wrapper_type.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/bytes_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/bytes_wrapper_type.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/double_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/double_wrapper_type.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/duration_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/dyn_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/enum_type.cc +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/enum_type.h +128 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/error_type.h +75 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/function_type.cc +89 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/function_type.h +91 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/function_type_pool.cc +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/function_type_pool.h +102 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/int_type.h +72 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/int_wrapper_type.h +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/legacy_type_introspector.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/list_type.cc +77 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/list_type.h +115 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/list_type_pool.cc +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/list_type_pool.h +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/map_type.cc +122 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/map_type.h +124 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/map_type_pool.cc +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/map_type_pool.h +93 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/message_type.cc +95 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/message_type.h +209 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/null_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/opaque_type.cc +109 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/opaque_type.h +118 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/opaque_type_pool.cc +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/opaque_type_pool.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/optional_type.cc +68 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/optional_type.h +114 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/string_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/string_wrapper_type.h +86 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/struct_type.cc +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/struct_type.h +158 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/timestamp_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_param_type.h +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_pool.cc +96 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_pool.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_type.cc +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_type.h +92 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_type_pool.cc +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/type_type_pool.h +86 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/types.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/uint_type.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/uint_wrapper_type.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/types/unknown_type.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/unknown.h +27 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/value.cc +2791 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/value.h +2947 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/value_kind.h +104 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/value_testing.h +307 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bool_value.cc +97 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bool_value.h +111 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bytes_value.cc +194 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bytes_value.h +338 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bytes_value_input_stream.h +133 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/bytes_value_output_stream.h +176 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_list_value.cc +614 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_list_value.h +423 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_map_value.cc +823 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_map_value.h +469 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_struct_value.cc +385 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_struct_value.h +459 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/custom_value.h +84 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/double_value.cc +137 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/double_value.h +101 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/duration_value.cc +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/duration_value.h +147 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/enum_value.h +49 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/error_value.cc +194 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/error_value.h +276 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/int_value.cc +111 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/int_value.h +117 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_list_value.cc +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_list_value.h +167 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_map_value.cc +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_map_value.h +185 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_struct_value.cc +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/legacy_struct_value.h +183 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/list_value.cc +304 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/list_value.h +284 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/list_value_builder.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/list_value_variant.h +214 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/map_value.cc +378 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/map_value.h +323 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/map_value_builder.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/map_value_variant.h +212 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/message_value.cc +306 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/message_value.h +268 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/null_value.cc +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/null_value.h +96 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/opaque_value.cc +194 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/opaque_value.h +338 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/optional_value.cc +435 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/optional_value.h +207 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_list_value.cc +486 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_list_value.h +229 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_map_value.cc +439 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_map_value.h +250 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_value.cc +103 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_json_value.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_map_field_value.cc +583 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_map_field_value.h +242 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_message_value.cc +411 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_message_value.h +249 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_repeated_field_value.cc +365 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/parsed_repeated_field_value.h +220 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/string_value.cc +1518 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/string_value.h +489 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value.cc +390 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value.h +373 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value_builder.cc +1552 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value_builder.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/struct_value_variant.h +205 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/timestamp_value.cc +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/timestamp_value.h +146 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/type_value.cc +72 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/type_value.h +108 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/uint_value.cc +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/uint_value.h +119 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/unknown_value.cc +66 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/unknown_value.h +121 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/value_builder.cc +1432 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/value_builder.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/value_variant.cc +537 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/value_variant.h +831 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/common/values/values.h +351 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/compiler.h +195 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/compiler_factory.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/compiler_library_subset_factory.h +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/optional.h +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/compiler/standard_library.h +27 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/config.h +173 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/env.h +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/env_runtime.h +85 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/env_std_extensions.h +42 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/env_yaml.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/internal/ext_registry.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/internal/runtime_ext_registry.h +84 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/runtime_std_extensions.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/env/type_info.h +42 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/cel_expression_builder_flat_impl.cc +111 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/cel_expression_builder_flat_impl.h +108 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/check_ast_extensions.cc +58 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/check_ast_extensions.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/comprehension_vulnerability_check.cc +275 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/comprehension_vulnerability_check.h +51 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/constant_folding.cc +280 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/constant_folding.h +42 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/flat_expr_builder.cc +2667 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/flat_expr_builder.h +104 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/flat_expr_builder_extensions.cc +474 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/flat_expr_builder_extensions.h +481 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/instrumentation.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/qualified_reference_resolver.cc +359 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/qualified_reference_resolver.h +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/regex_precompilation_optimization.cc +274 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/regex_precompilation_optimization.h +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/resolver.cc +222 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/compiler/resolver.h +127 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/attribute_trail.cc +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/attribute_trail.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/attribute_utility.cc +260 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/attribute_utility.h +179 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/cel_expression_flat_impl.cc +147 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/cel_expression_flat_impl.h +175 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/compiler_constant_step.cc +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/compiler_constant_step.h +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/comprehension_slots.h +153 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/comprehension_step.cc +685 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/comprehension_step.h +119 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/const_value_step.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/container_access_step.cc +370 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/container_access_step.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_list_step.cc +283 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_list_step.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_map_step.cc +289 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_map_step.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_struct_step.cc +270 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/create_struct_step.h +44 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/direct_expression_step.cc +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/direct_expression_step.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/equality_steps.cc +293 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/equality_steps.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/evaluator_core.cc +178 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/evaluator_core.h +516 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/evaluator_stack.cc +92 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/evaluator_stack.h +327 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/expression_step_base.h +12 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/function_step.cc +529 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/function_step.h +48 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/ident_step.cc +174 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/ident_step.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/iterator_stack.h +77 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/jump_step.cc +172 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/jump_step.h +74 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/lazy_init_step.cc +236 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/lazy_init_step.h +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/logic_step.cc +487 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/logic_step.h +49 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/optional_or_step.cc +305 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/optional_or_step.h +51 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/regex_match_step.cc +135 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/regex_match_step.h +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/select_step.cc +581 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/select_step.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/shadowable_value_step.cc +98 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/shadowable_value_step.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/ternary_step.cc +194 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/ternary_step.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/eval/trace_step.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/adapter_activation_impl.cc +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/adapter_activation_impl.h +68 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/cel_value_equal.cc +242 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/cel_value_equal.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/errors.cc +64 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/errors.h +54 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/internal/interop.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/activation.cc +119 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/activation.h +170 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/activation_bind_helper.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/ast_rewrite.h +175 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/ast_traverse.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/ast_visitor.h +185 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/ast_visitor_base.h +109 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/base_activation.h +75 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/builtin_func_registrar.cc +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/builtin_func_registrar.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_attribute.cc +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_attribute.h +64 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_builtins.h +19 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_expr_builder_factory.cc +146 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_expr_builder_factory.h +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_expression.h +144 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function.cc +76 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function.h +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function_adapter.h +121 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function_adapter_impl.h +407 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function_registry.cc +122 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_function_registry.h +146 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_number.cc +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_number.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_options.cc +51 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_options.h +233 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_type_registry.cc +64 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_type_registry.h +145 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_value.cc +412 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_value.h +770 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_value_internal.h +103 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/cel_value_producer.h +25 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/comparison_functions.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/container_function_registrar.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/container_backed_list_impl.h +44 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/container_backed_map_impl.cc +131 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/container_backed_map_impl.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/field_access.cc +85 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/field_access.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/field_backed_list_impl.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/field_backed_map_impl.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/internal_field_backed_list_impl.cc +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/internal_field_backed_list_impl.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/internal_field_backed_map_impl.cc +298 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/containers/internal_field_backed_map_impl.h +77 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/equality_function_registrar.h +44 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/extension_func_registrar.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/logical_function_registrar.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/message_wrapper.h +139 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/portable_cel_function_adapter.h +72 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/set_util.h +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/source_position.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/string_extension_func_registrar.cc +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/string_extension_func_registrar.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_descriptor_pool_builder.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_wrap_util.cc +1479 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_wrap_util.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_wrapper.cc +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/cel_proto_wrapper.h +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/field_access_impl.cc +746 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/field_access_impl.h +80 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/legacy_type_adapter.h +177 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/legacy_type_info_apis.h +108 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/legacy_type_provider.cc +232 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/legacy_type_provider.h +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/proto_message_type_adapter.cc +708 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/proto_message_type_adapter.h +137 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/protobuf_descriptor_type_provider.cc +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/protobuf_descriptor_type_provider.h +67 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/protobuf_value_factory.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/structs/trivial_legacy_type_info.h +54 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/transform_utility.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/unknown_attribute_set.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/unknown_function_result_set.cc +1 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/unknown_function_result_set.h +27 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/unknown_set.h +22 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/eval/public/value_export_util.h +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/bindings_ext.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/comprehensions_v2.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/comprehensions_v2_functions.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/comprehensions_v2_macros.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/encoders.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/formatting.cc +570 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/formatting.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/lists_functions.h +138 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/math_ext.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/math_ext_decls.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/math_ext_macros.h +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/proto_ext.h +42 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/ast_converters.h +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/bind_proto_to_activation.h +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/enum_adapter.h +30 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/internal/map_reflection.cc +132 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/internal/map_reflection.h +67 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/internal/qualify.cc +457 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/internal/qualify.h +117 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/memory_manager.cc +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/memory_manager.h +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/runtime_adapter.h +51 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/value.h +98 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/protobuf/value_testing.h +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/regex_ext.h +131 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/regex_functions.h +52 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/select_optimization.cc +958 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/select_optimization.h +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/sets_functions.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/strings.cc +432 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/extensions/strings.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/align.h +95 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/benchmark.h +20 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/casts.h +50 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/empty_descriptors.cc +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/empty_descriptors.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/equals_text_proto.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/exceptions.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/json.cc +2041 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/json.h +141 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/lexis.cc +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/lexis.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/manual.h +91 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/message_equality.cc +1490 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/message_equality.h +54 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/message_type_name.h +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/minimal_descriptor_database.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/minimal_descriptor_pool.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/names.h +26 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/new.cc +142 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/new.h +61 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/noop_delete.h +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/number.h +299 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/overflow.cc +339 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/overflow.h +178 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/parse_text_proto.h +121 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_file_util.h +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_matchers.h +140 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_time_encoding.cc +103 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_time_encoding.h +49 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/proto_util.h +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/protobuf_runtime_version.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/re2_options.h +61 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/runfiles.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/status_builder.h +114 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/status_macros.h +152 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/string_pool.cc +79 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/string_pool.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/strings.cc +693 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/strings.h +90 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/testing.h +44 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/testing_descriptor_pool.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/testing_message_factory.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/time.cc +198 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/time.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/to_address.h +68 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/unicode.h +28 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/utf8.cc +526 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/utf8.h +82 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/well_known_types.cc +2181 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/internal/well_known_types.h +1593 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/ast_factory.cc +320 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/ast_factory.h +174 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/ast_factory_interface.h +130 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/lexer.cc +711 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/lexer.h +286 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/options.h +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/pratt_parser.cc +226 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/pratt_parser.h +110 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/pratt_parser_worker.cc +261 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/internal/pratt_parser_worker.h +1143 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro.cc +561 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro.h +229 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro_expr_factory.cc +128 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro_expr_factory.h +333 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro_registry.cc +87 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/macro_registry.h +59 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/options.h +115 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/parser.cc +1995 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/parser.h +102 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/parser_interface.h +160 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/parser_subset_factory.h +41 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/source_factory.h +47 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/parser/standard_macros.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy.h +333 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy_parse_context.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy_parse_result.h +105 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy_parser.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/cel_policy_validation_result.h +84 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/compiler.h +50 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/internal/issue_reporter.h +57 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/internal/optimizer_expr_factory.h +419 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/internal/yaml_string_element_scanner.h +40 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/test_util.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/policy/yaml_policy_parser.h +135 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/activation.cc +141 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/activation.h +184 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/activation_interface.h +109 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/bind_proto_to_activation.h +174 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/comprehension_vulnerability_check.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/constant_folding.h +69 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/embedder_context.h +147 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function.h +115 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_adapter.h +830 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_overload_reference.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_provider.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_registry.cc +263 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/function_registry.h +160 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/activation_attribute_matcher_access.cc +61 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/activation_attribute_matcher_access.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/attribute_matcher.h +48 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/convert_constant.cc +78 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/convert_constant.h +39 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/errors.cc +69 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/errors.h +71 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/function_adapter.h +232 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/issue_collector.h +64 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/legacy_runtime_type_provider.h +37 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_env.cc +73 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_env.h +134 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_env_testing.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_friend_access.h +45 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_impl.cc +159 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_impl.h +125 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_type_provider.cc +96 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/internal/runtime_type_provider.h +66 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/optional_types.h +152 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/reference_resolver.h +46 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/regex_precompilation.h +32 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/register_function_helper.h +99 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime.h +229 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime_builder.h +101 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime_builder_factory.h +65 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime_issue.h +88 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/runtime_options.h +209 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/arithmetic_functions.cc +233 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/arithmetic_functions.h +35 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/comparison_functions.cc +272 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/comparison_functions.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/container_functions.cc +136 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/container_functions.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/container_membership_functions.cc +331 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/container_membership_functions.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/equality_functions.cc +612 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/equality_functions.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/logical_functions.cc +66 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/logical_functions.h +36 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/regex_functions.cc +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/regex_functions.h +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/string_functions.cc +140 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/string_functions.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/time_functions.cc +499 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/time_functions.h +56 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/type_conversion_functions.cc +470 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard/type_conversion_functions.h +34 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard_functions.h +33 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/standard_runtime_builder_factory.h +43 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/type_registry.cc +84 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/runtime/type_registry.h +155 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/branch_coverage.h +68 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/cel_field_extractor.h +70 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/cel_unparser.h +60 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/descriptor_pool_builder.h +93 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/flatbuffers_backed_impl.h +58 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/navigable_ast.h +169 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/tools/proto_to_predicate.h +48 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/ast_depth_validator.h +27 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/comprehension_nesting_validator.h +31 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/homogeneous_literal_validator.h +38 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/regex_validator.h +53 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/timestamp_literal_validator.h +29 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/validator.cc +85 -0
- data/ext/protovalidate/sys/third_party/cel-cpp/validator/validator.h +151 -0
- data/ext/protovalidate/sys/third_party/protobuf/LICENSE +32 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any.cc +65 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any.h +161 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any.pb.cc +528 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any.pb.h +516 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/any_lite.cc +95 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/api.pb.cc +1959 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/api.pb.h +1985 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena.cc +1004 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena.h +1238 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_align.cc +21 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_align.h +199 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_allocation_policy.h +102 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_cleanup.h +108 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arena_test_util.h +91 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arenastring.cc +290 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arenastring.h +545 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arenaz_sampler.cc +227 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/arenaz_sampler.h +238 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/annotation_test_util.h +105 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/code_generator.h +256 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/code_generator_lite.h +77 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/command_line_interface.h +517 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/command_line_interface_tester.h +162 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/importer.cc +594 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/importer.h +338 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/mock_code_generator.h +144 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/notices.h +242 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/package_info.h +40 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/parser.cc +2716 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/parser.h +642 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/plugin.h +73 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/plugin.pb.h +2320 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/retention.h +70 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/scc.h +155 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/subprocess.h +91 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/versions.h +78 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/compiler/zip_writer.h +45 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/cpp_edition_defaults.h +12 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/cpp_features.pb.cc +539 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/cpp_features.pb.h +630 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor.cc +10801 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor.h +3417 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor.pb.cc +18982 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor.pb.h +23170 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_database.cc +1102 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_database.h +423 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_legacy.h +32 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_lite.h +110 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_test_utils.h +129 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/descriptor_visitor.h +187 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/duration.pb.cc +481 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/duration.pb.h +367 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/dynamic_message.cc +1104 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/dynamic_message.h +217 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/empty.pb.cc +285 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/empty.pb.h +245 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/endian.h +192 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/explicitly_constructed.h +71 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/extension_set.cc +1925 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/extension_set.h +1886 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/extension_set_heavy.cc +459 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/extension_set_inl.h +274 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/feature_resolver.cc +637 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/feature_resolver.h +108 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/field_access_listener.h +166 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/field_mask.pb.cc +472 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/field_mask.pb.h +396 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/field_with_arena.h +110 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_enum_reflection.h +187 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_enum_util.cc +223 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_enum_util.h +185 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_bases.cc +88 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_bases.h +68 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_reflection.cc +4185 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_reflection.h +372 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_decl.h +615 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_full.cc +105 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_gen.cc +960 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_gen.h +193 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_impl.h +1229 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_tctable_lite.cc +3308 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_util.cc +434 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/generated_message_util.h +445 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/has_bits.h +138 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/implicit_weak_message.cc +139 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/implicit_weak_message.h +266 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/inlined_string_field.cc +144 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/inlined_string_field.h +379 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_feature_helper.cc +28 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_feature_helper.h +130 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_metadata_locator.h +291 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_visibility.h +55 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/internal_visibility_for_testing.h +27 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/coded_stream.cc +1045 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/coded_stream.h +1885 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/gzip_stream.cc +333 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/gzip_stream.h +189 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/io_win32.cc +450 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/io_win32.h +118 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/package_info.h +30 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/printer.cc +842 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/printer.h +1183 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/strtod.cc +260 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/strtod.h +57 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/test_zero_copy_stream.h +185 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/tokenizer.cc +1262 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/tokenizer.h +441 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_sink.cc +45 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_sink.h +59 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.cc +128 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream.h +269 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc +354 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h +319 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc +699 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h +533 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/descriptor_traits.h +510 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/lexer.cc +512 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/lexer.h +341 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/message_path.cc +46 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/message_path.h +61 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/parser.cc +1437 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/parser.h +37 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/parser_traits.h +400 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/unparser.cc +915 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/unparser.h +38 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/unparser_traits.h +414 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/untyped_message.cc +577 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/untyped_message.h +246 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/writer.cc +307 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/writer.h +214 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/zero_copy_buffered_stream.cc +152 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/internal/zero_copy_buffered_stream.h +338 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/json.cc +137 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/json/json.h +200 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map.cc +297 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map.h +1787 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_entry.h +139 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_field.cc +597 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_field.h +925 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_field_lite.h +124 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_test.inc +4427 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_test_util.h +617 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/map_type_handler.h +374 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message.cc +745 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message.h +1936 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message_lite.cc +807 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message_lite.h +1861 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message_unittest.inc +2302 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/message_unittest_legacy_apis.inc +98 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/metadata.h +13 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/metadata_lite.h +271 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/micro_string.cc +376 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/micro_string.h +649 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/os_macros_restore.inc +97 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/os_macros_undef.inc +166 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/package_info.h +43 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/parse_context.cc +850 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/parse_context.h +1883 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/port.cc +131 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/port.h +908 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/port_def.inc +820 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/port_undef.inc +97 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/proto3_lite_unittest.inc +127 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/raw_ptr.cc +29 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/raw_ptr.h +64 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection.h +603 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_internal.h +313 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_mode.cc +36 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_mode.h +144 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_ops.cc +456 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_ops.h +67 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_tester.h +127 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_visit_field_info.h +1378 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/reflection_visit_fields.h +511 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field.cc +76 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field.h +1814 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field_proxy.h +697 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field_proxy_iterator.h +236 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field_proxy_traits.h +100 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_field_reflection_unittest.inc +687 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_ptr_field.cc +251 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/repeated_ptr_field.h +2706 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/runtime_version.h +27 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/serial_arena.h +447 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/service.cc +22 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/service.h +271 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/source_context.pb.cc +463 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/source_context.pb.h +376 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/string_block.h +181 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/string_member_robber.h +17 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/struct.pb.cc +1663 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/struct.pb.h +1426 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/callback.h +584 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/common.cc +121 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/common.h +94 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/platform_macros.h +115 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/port.h +228 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/stubs/status_macros.h +72 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/symbol_checker.cc +219 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/symbol_checker.h +142 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/test_textproto.h +54 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/test_util.h +3897 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/test_util2.h +70 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/test_util_lite.h +86 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/text_format.cc +3324 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/text_format.h +925 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/thread_safe_arena.h +297 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/timestamp.pb.cc +481 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/timestamp.pb.h +367 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/type.pb.cc +3129 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/type.pb.h +3343 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/unknown_field_set.cc +351 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/unknown_field_set.h +464 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/delimited_message_util.cc +107 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/delimited_message_util.h +85 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/field_comparator.cc +237 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/field_comparator.h +256 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/field_mask_util.cc +754 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/field_mask_util.h +242 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/internal_timeval.h +28 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/json_util.h +34 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/message_differencer.cc +2372 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/message_differencer.h +1002 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/package_info.h +23 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/python/field_mask_util_clif_aux.h +32 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/time_util.cc +563 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/time_util.h +297 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/type_resolver.h +56 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/type_resolver_util.cc +436 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/util/type_resolver_util.h +45 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/varint_shuffle.h +165 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format.cc +1785 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format.h +374 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format_lite.cc +901 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format_lite.h +1720 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wire_format_unittest.h +1726 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wrappers.pb.cc +3203 -0
- data/ext/protovalidate/sys/third_party/protobuf/src/google/protobuf/wrappers.pb.h +2317 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_range.c +207 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_range.h +23 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_range_neon.inc +117 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_range_sse.inc +272 -0
- data/ext/protovalidate/sys/third_party/protobuf/third_party/utf8_range/utf8_validity.h +30 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/LICENSE +201 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/cel_rules.h +116 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/cel_validation_rules.cc +166 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/cel_validation_rules.h +72 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/extra_func.cc +482 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/extra_func.h +31 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/field_rules.cc +388 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/field_rules.h +92 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/ipv4.cc +69 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/ipv4.h +58 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/ipv6.cc +143 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/ipv6.h +51 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/parser_common.h +256 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/uri.cc +469 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/lib/uri.h +25 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/message_factory.cc +31 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/message_factory.h +43 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/message_rules.cc +114 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/message_rules.h +39 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/proto_field.h +155 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/rules.cc +437 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/rules.h +221 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/internal/validation_rules.h +153 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/validator.cc +190 -0
- data/ext/protovalidate/sys/third_party/protovalidate-cc/buf/validate/validator.h +156 -0
- data/ext/protovalidate/sys/third_party/re2/LICENSE +27 -0
- data/ext/protovalidate/sys/third_party/re2/re2/bitmap256.cc +43 -0
- data/ext/protovalidate/sys/third_party/re2/re2/bitmap256.h +88 -0
- data/ext/protovalidate/sys/third_party/re2/re2/bitstate.cc +389 -0
- data/ext/protovalidate/sys/third_party/re2/re2/compile.cc +1265 -0
- data/ext/protovalidate/sys/third_party/re2/re2/dfa.cc +2135 -0
- data/ext/protovalidate/sys/third_party/re2/re2/filtered_re2.cc +138 -0
- data/ext/protovalidate/sys/third_party/re2/re2/filtered_re2.h +115 -0
- data/ext/protovalidate/sys/third_party/re2/re2/mimics_pcre.cc +196 -0
- data/ext/protovalidate/sys/third_party/re2/re2/nfa.cc +714 -0
- data/ext/protovalidate/sys/third_party/re2/re2/onepass.cc +623 -0
- data/ext/protovalidate/sys/third_party/re2/re2/parse.cc +2529 -0
- data/ext/protovalidate/sys/third_party/re2/re2/perl_groups.cc +119 -0
- data/ext/protovalidate/sys/third_party/re2/re2/pod_array.h +55 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prefilter.cc +711 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prefilter.h +168 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prefilter_tree.cc +376 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prefilter_tree.h +153 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prog.cc +1181 -0
- data/ext/protovalidate/sys/third_party/re2/re2/prog.h +493 -0
- data/ext/protovalidate/sys/third_party/re2/re2/re2.cc +1355 -0
- data/ext/protovalidate/sys/third_party/re2/re2/re2.h +1074 -0
- data/ext/protovalidate/sys/third_party/re2/re2/regexp.cc +1004 -0
- data/ext/protovalidate/sys/third_party/re2/re2/regexp.h +693 -0
- data/ext/protovalidate/sys/third_party/re2/re2/set.cc +185 -0
- data/ext/protovalidate/sys/third_party/re2/re2/set.h +91 -0
- data/ext/protovalidate/sys/third_party/re2/re2/simplify.cc +689 -0
- data/ext/protovalidate/sys/third_party/re2/re2/sparse_array.h +394 -0
- data/ext/protovalidate/sys/third_party/re2/re2/sparse_set.h +266 -0
- data/ext/protovalidate/sys/third_party/re2/re2/stringpiece.h +18 -0
- data/ext/protovalidate/sys/third_party/re2/re2/tostring.cc +351 -0
- data/ext/protovalidate/sys/third_party/re2/re2/unicode_casefold.cc +604 -0
- data/ext/protovalidate/sys/third_party/re2/re2/unicode_casefold.h +77 -0
- data/ext/protovalidate/sys/third_party/re2/re2/unicode_groups.cc +6517 -0
- data/ext/protovalidate/sys/third_party/re2/re2/unicode_groups.h +66 -0
- data/ext/protovalidate/sys/third_party/re2/re2/walker-inl.h +249 -0
- data/ext/protovalidate/sys/third_party/re2/util/malloc_counter.h +19 -0
- data/ext/protovalidate/sys/third_party/re2/util/pcre.h +671 -0
- data/ext/protovalidate/sys/third_party/re2/util/rune.cc +260 -0
- data/ext/protovalidate/sys/third_party/re2/util/strutil.cc +26 -0
- data/ext/protovalidate/sys/third_party/re2/util/strutil.h +16 -0
- data/ext/protovalidate/sys/third_party/re2/util/utf.h +44 -0
- data/ext/protovalidate/sys/versions.json +15 -0
- data/lib/buf/validate/validate_pb.rb +55 -0
- data/lib/protovalidate/errors.rb +32 -0
- data/lib/protovalidate/native.rb +30 -0
- data/lib/protovalidate/validator.rb +96 -0
- data/lib/protovalidate/version.rb +10 -0
- data/lib/protovalidate/violation.rb +115 -0
- data/lib/protovalidate.rb +48 -0
- data/sig/buf/validate/validate_pb.rbs +64 -0
- data/sig/protovalidate/native.rbs +14 -0
- data/sig/protovalidate.rbs +90 -0
- metadata +1900 -0
|
@@ -0,0 +1,3897 @@
|
|
|
1
|
+
// Protocol Buffers - Google's data interchange format
|
|
2
|
+
// Copyright 2008 Google Inc. All rights reserved.
|
|
3
|
+
//
|
|
4
|
+
// Use of this source code is governed by a BSD-style
|
|
5
|
+
// license that can be found in the LICENSE file or at
|
|
6
|
+
// https://developers.google.com/open-source/licenses/bsd
|
|
7
|
+
|
|
8
|
+
// Author: kenton@google.com (Kenton Varda)
|
|
9
|
+
// Based on original Protocol Buffers design by
|
|
10
|
+
// Sanjay Ghemawat, Jeff Dean, and others.
|
|
11
|
+
|
|
12
|
+
#ifndef GOOGLE_PROTOBUF_TEST_UTIL_H__
|
|
13
|
+
#define GOOGLE_PROTOBUF_TEST_UTIL_H__
|
|
14
|
+
|
|
15
|
+
#include <gtest/gtest.h>
|
|
16
|
+
#include "absl/strings/string_view.h"
|
|
17
|
+
#include "google/protobuf/unittest.pb.h"
|
|
18
|
+
#include "google/protobuf/unittest_import.pb.h"
|
|
19
|
+
#include "google/protobuf/unittest_mset.pb.h"
|
|
20
|
+
|
|
21
|
+
// Must be included last.
|
|
22
|
+
#include "google/protobuf/port_def.inc"
|
|
23
|
+
|
|
24
|
+
namespace google {
|
|
25
|
+
namespace protobuf {
|
|
26
|
+
// This file doesn't use these declarations, but some .cc files do.
|
|
27
|
+
namespace unittest = ::proto2_unittest;
|
|
28
|
+
namespace unittest_import = ::proto2_unittest_import;
|
|
29
|
+
|
|
30
|
+
namespace TestUtil {
|
|
31
|
+
|
|
32
|
+
class ReflectionTester {
|
|
33
|
+
public:
|
|
34
|
+
// base_descriptor must be a descriptor for TestAllTypes or
|
|
35
|
+
// TestAllExtensions. In the former case, ReflectionTester fetches from
|
|
36
|
+
// it the FieldDescriptors needed to use the reflection interface. In
|
|
37
|
+
// the latter case, ReflectionTester searches for extension fields in
|
|
38
|
+
// its file.
|
|
39
|
+
explicit ReflectionTester(const Descriptor* base_descriptor);
|
|
40
|
+
ReflectionTester(const ReflectionTester&) = delete;
|
|
41
|
+
ReflectionTester& operator=(const ReflectionTester&) = delete;
|
|
42
|
+
|
|
43
|
+
void SetAllFieldsViaReflection(Message* message);
|
|
44
|
+
void ModifyRepeatedFieldsViaReflection(Message* message);
|
|
45
|
+
void ExpectAllFieldsSetViaReflection(const Message& message);
|
|
46
|
+
void ExpectClearViaReflection(const Message& message);
|
|
47
|
+
|
|
48
|
+
void SetPackedFieldsViaReflection(Message* message);
|
|
49
|
+
void ExpectPackedFieldsSetViaReflection(const Message& message);
|
|
50
|
+
|
|
51
|
+
void RemoveLastRepeatedsViaReflection(Message* message);
|
|
52
|
+
void ReleaseLastRepeatedsViaReflection(Message* message,
|
|
53
|
+
bool expect_extensions_notnull);
|
|
54
|
+
void SwapRepeatedsViaReflection(Message* message);
|
|
55
|
+
void SetAllocatedOptionalMessageFieldsToNullViaReflection(Message* message);
|
|
56
|
+
static void SetAllocatedOptionalMessageFieldsToMessageViaReflection(
|
|
57
|
+
Message* from_message, Message* to_message);
|
|
58
|
+
|
|
59
|
+
enum MessageReleaseState {
|
|
60
|
+
IS_NULL,
|
|
61
|
+
CAN_BE_NULL,
|
|
62
|
+
NOT_NULL,
|
|
63
|
+
};
|
|
64
|
+
void ExpectMessagesReleasedViaReflection(
|
|
65
|
+
Message* message, MessageReleaseState expected_release_state);
|
|
66
|
+
|
|
67
|
+
// Set and check functions for TestOneof2 messages. No need to construct
|
|
68
|
+
// the ReflectionTester by TestAllTypes nor TestAllExtensions.
|
|
69
|
+
static void SetOneofViaReflection(Message* message);
|
|
70
|
+
static void ExpectOneofSetViaReflection(const Message& message);
|
|
71
|
+
|
|
72
|
+
private:
|
|
73
|
+
const FieldDescriptor* F(const std::string& name);
|
|
74
|
+
|
|
75
|
+
const Descriptor* base_descriptor_;
|
|
76
|
+
|
|
77
|
+
const FieldDescriptor* group_a_;
|
|
78
|
+
const FieldDescriptor* repeated_group_a_;
|
|
79
|
+
const FieldDescriptor* nested_b_;
|
|
80
|
+
const FieldDescriptor* foreign_c_;
|
|
81
|
+
const FieldDescriptor* import_d_;
|
|
82
|
+
const FieldDescriptor* import_e_;
|
|
83
|
+
|
|
84
|
+
const EnumValueDescriptor* nested_foo_;
|
|
85
|
+
const EnumValueDescriptor* nested_bar_;
|
|
86
|
+
const EnumValueDescriptor* nested_baz_;
|
|
87
|
+
const EnumValueDescriptor* foreign_foo_;
|
|
88
|
+
const EnumValueDescriptor* foreign_bar_;
|
|
89
|
+
const EnumValueDescriptor* foreign_baz_;
|
|
90
|
+
const EnumValueDescriptor* import_foo_;
|
|
91
|
+
const EnumValueDescriptor* import_bar_;
|
|
92
|
+
const EnumValueDescriptor* import_baz_;
|
|
93
|
+
|
|
94
|
+
// We have to split this into three function otherwise it creates a stack
|
|
95
|
+
// frame so large that it triggers a warning.
|
|
96
|
+
void ExpectAllFieldsSetViaReflection1(const Message& message);
|
|
97
|
+
void ExpectAllFieldsSetViaReflection2(const Message& message);
|
|
98
|
+
void ExpectAllFieldsSetViaReflection3(const Message& message);
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
inline TestUtil::ReflectionTester::ReflectionTester(
|
|
102
|
+
const Descriptor* base_descriptor)
|
|
103
|
+
: base_descriptor_(base_descriptor) {
|
|
104
|
+
const DescriptorPool* pool = base_descriptor->file()->pool();
|
|
105
|
+
const absl::string_view package = base_descriptor->file()->package();
|
|
106
|
+
const FieldDescriptor* import_descriptor = pool->FindFieldByName(
|
|
107
|
+
absl::StrCat(package, ".TestAllTypes.optional_import_message"));
|
|
108
|
+
const absl::string_view import_package =
|
|
109
|
+
import_descriptor->message_type()->file()->package();
|
|
110
|
+
|
|
111
|
+
nested_b_ = pool->FindFieldByName(
|
|
112
|
+
absl::StrCat(package, ".TestAllTypes.NestedMessage.bb"));
|
|
113
|
+
foreign_c_ =
|
|
114
|
+
pool->FindFieldByName(absl::StrCat(package, ".ForeignMessage.c"));
|
|
115
|
+
import_d_ =
|
|
116
|
+
pool->FindFieldByName(absl::StrCat(import_package, ".ImportMessage.d"));
|
|
117
|
+
import_e_ = pool->FindFieldByName(
|
|
118
|
+
absl::StrCat(import_package, ".PublicImportMessage.e"));
|
|
119
|
+
nested_foo_ =
|
|
120
|
+
pool->FindEnumValueByName(absl::StrCat(package, ".TestAllTypes.FOO"));
|
|
121
|
+
nested_bar_ =
|
|
122
|
+
pool->FindEnumValueByName(absl::StrCat(package, ".TestAllTypes.BAR"));
|
|
123
|
+
nested_baz_ =
|
|
124
|
+
pool->FindEnumValueByName(absl::StrCat(package, ".TestAllTypes.BAZ"));
|
|
125
|
+
foreign_foo_ =
|
|
126
|
+
pool->FindEnumValueByName(absl::StrCat(package, ".FOREIGN_FOO"));
|
|
127
|
+
foreign_bar_ =
|
|
128
|
+
pool->FindEnumValueByName(absl::StrCat(package, ".FOREIGN_BAR"));
|
|
129
|
+
foreign_baz_ =
|
|
130
|
+
pool->FindEnumValueByName(absl::StrCat(package, ".FOREIGN_BAZ"));
|
|
131
|
+
import_foo_ =
|
|
132
|
+
pool->FindEnumValueByName(absl::StrCat(import_package, ".IMPORT_FOO"));
|
|
133
|
+
import_bar_ =
|
|
134
|
+
pool->FindEnumValueByName(absl::StrCat(import_package, ".IMPORT_BAR"));
|
|
135
|
+
import_baz_ =
|
|
136
|
+
pool->FindEnumValueByName(absl::StrCat(import_package, ".IMPORT_BAZ"));
|
|
137
|
+
|
|
138
|
+
if (base_descriptor_->name() == "TestAllExtensions") {
|
|
139
|
+
group_a_ = pool->FindFieldByName(
|
|
140
|
+
absl::StrCat(package, ".OptionalGroup_extension.a"));
|
|
141
|
+
repeated_group_a_ = pool->FindFieldByName(
|
|
142
|
+
absl::StrCat(package, ".RepeatedGroup_extension.a"));
|
|
143
|
+
} else {
|
|
144
|
+
group_a_ = pool->FindFieldByName(
|
|
145
|
+
absl::StrCat(package, ".TestAllTypes.OptionalGroup.a"));
|
|
146
|
+
repeated_group_a_ = pool->FindFieldByName(
|
|
147
|
+
absl::StrCat(package, ".TestAllTypes.RepeatedGroup.a"));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
EXPECT_TRUE(group_a_ != nullptr);
|
|
151
|
+
EXPECT_TRUE(repeated_group_a_ != nullptr);
|
|
152
|
+
EXPECT_TRUE(nested_b_ != nullptr);
|
|
153
|
+
EXPECT_TRUE(foreign_c_ != nullptr);
|
|
154
|
+
EXPECT_TRUE(import_d_ != nullptr);
|
|
155
|
+
EXPECT_TRUE(import_e_ != nullptr);
|
|
156
|
+
EXPECT_TRUE(nested_foo_ != nullptr);
|
|
157
|
+
EXPECT_TRUE(nested_bar_ != nullptr);
|
|
158
|
+
EXPECT_TRUE(nested_baz_ != nullptr);
|
|
159
|
+
EXPECT_TRUE(foreign_foo_ != nullptr);
|
|
160
|
+
EXPECT_TRUE(foreign_bar_ != nullptr);
|
|
161
|
+
EXPECT_TRUE(foreign_baz_ != nullptr);
|
|
162
|
+
EXPECT_TRUE(import_foo_ != nullptr);
|
|
163
|
+
EXPECT_TRUE(import_bar_ != nullptr);
|
|
164
|
+
EXPECT_TRUE(import_baz_ != nullptr);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// Shorthand to get a FieldDescriptor for a field of TestAllTypes.
|
|
168
|
+
inline const FieldDescriptor* TestUtil::ReflectionTester::F(
|
|
169
|
+
const std::string& name) {
|
|
170
|
+
const FieldDescriptor* result = nullptr;
|
|
171
|
+
if (base_descriptor_->name() == "TestAllExtensions" ||
|
|
172
|
+
base_descriptor_->name() == "TestPackedExtensions") {
|
|
173
|
+
result = base_descriptor_->file()->FindExtensionByName(
|
|
174
|
+
absl::StrCat(name, "_extension"));
|
|
175
|
+
} else {
|
|
176
|
+
result = base_descriptor_->FindFieldByName(name);
|
|
177
|
+
}
|
|
178
|
+
ABSL_CHECK(result != nullptr);
|
|
179
|
+
return result;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// -------------------------------------------------------------------
|
|
183
|
+
|
|
184
|
+
inline void TestUtil::ReflectionTester::SetAllFieldsViaReflection(
|
|
185
|
+
Message* message) {
|
|
186
|
+
const Reflection* reflection = message->GetReflection();
|
|
187
|
+
Message* sub_message;
|
|
188
|
+
|
|
189
|
+
reflection->SetInt32(message, F("optional_int32"), 101);
|
|
190
|
+
reflection->SetInt64(message, F("optional_int64"), 102);
|
|
191
|
+
reflection->SetUInt32(message, F("optional_uint32"), 103);
|
|
192
|
+
reflection->SetUInt64(message, F("optional_uint64"), 104);
|
|
193
|
+
reflection->SetInt32(message, F("optional_sint32"), 105);
|
|
194
|
+
reflection->SetInt64(message, F("optional_sint64"), 106);
|
|
195
|
+
reflection->SetUInt32(message, F("optional_fixed32"), 107);
|
|
196
|
+
reflection->SetUInt64(message, F("optional_fixed64"), 108);
|
|
197
|
+
reflection->SetInt32(message, F("optional_sfixed32"), 109);
|
|
198
|
+
reflection->SetInt64(message, F("optional_sfixed64"), 110);
|
|
199
|
+
reflection->SetFloat(message, F("optional_float"), 111);
|
|
200
|
+
reflection->SetDouble(message, F("optional_double"), 112);
|
|
201
|
+
reflection->SetBool(message, F("optional_bool"), true);
|
|
202
|
+
reflection->SetString(message, F("optional_string"), "115");
|
|
203
|
+
reflection->SetString(message, F("optional_bytes"), "116");
|
|
204
|
+
|
|
205
|
+
sub_message = reflection->MutableMessage(message, F("optionalgroup"));
|
|
206
|
+
sub_message->GetReflection()->SetInt32(sub_message, group_a_, 117);
|
|
207
|
+
sub_message =
|
|
208
|
+
reflection->MutableMessage(message, F("optional_nested_message"));
|
|
209
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 118);
|
|
210
|
+
sub_message =
|
|
211
|
+
reflection->MutableMessage(message, F("optional_foreign_message"));
|
|
212
|
+
sub_message->GetReflection()->SetInt32(sub_message, foreign_c_, 119);
|
|
213
|
+
sub_message =
|
|
214
|
+
reflection->MutableMessage(message, F("optional_import_message"));
|
|
215
|
+
sub_message->GetReflection()->SetInt32(sub_message, import_d_, 120);
|
|
216
|
+
|
|
217
|
+
reflection->SetEnum(message, F("optional_nested_enum"), nested_baz_);
|
|
218
|
+
reflection->SetEnum(message, F("optional_foreign_enum"), foreign_baz_);
|
|
219
|
+
reflection->SetEnum(message, F("optional_import_enum"), import_baz_);
|
|
220
|
+
|
|
221
|
+
reflection->SetString(message, F("optional_string_piece"), "124");
|
|
222
|
+
reflection->SetString(message, F("optional_cord"), "125");
|
|
223
|
+
reflection->SetString(message, F("optional_bytes_cord"),
|
|
224
|
+
"optional bytes cord");
|
|
225
|
+
|
|
226
|
+
sub_message =
|
|
227
|
+
reflection->MutableMessage(message, F("optional_public_import_message"));
|
|
228
|
+
sub_message->GetReflection()->SetInt32(sub_message, import_e_, 126);
|
|
229
|
+
|
|
230
|
+
sub_message = reflection->MutableMessage(message, F("optional_lazy_message"));
|
|
231
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 127);
|
|
232
|
+
|
|
233
|
+
sub_message = reflection->MutableMessage(
|
|
234
|
+
message, F("optional_unverified_lazy_message"));
|
|
235
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 128);
|
|
236
|
+
|
|
237
|
+
// -----------------------------------------------------------------
|
|
238
|
+
|
|
239
|
+
reflection->AddInt32(message, F("repeated_int32"), 201);
|
|
240
|
+
reflection->AddInt64(message, F("repeated_int64"), 202);
|
|
241
|
+
reflection->AddUInt32(message, F("repeated_uint32"), 203);
|
|
242
|
+
reflection->AddUInt64(message, F("repeated_uint64"), 204);
|
|
243
|
+
reflection->AddInt32(message, F("repeated_sint32"), 205);
|
|
244
|
+
reflection->AddInt64(message, F("repeated_sint64"), 206);
|
|
245
|
+
reflection->AddUInt32(message, F("repeated_fixed32"), 207);
|
|
246
|
+
reflection->AddUInt64(message, F("repeated_fixed64"), 208);
|
|
247
|
+
reflection->AddInt32(message, F("repeated_sfixed32"), 209);
|
|
248
|
+
reflection->AddInt64(message, F("repeated_sfixed64"), 210);
|
|
249
|
+
reflection->AddFloat(message, F("repeated_float"), 211);
|
|
250
|
+
reflection->AddDouble(message, F("repeated_double"), 212);
|
|
251
|
+
reflection->AddBool(message, F("repeated_bool"), true);
|
|
252
|
+
reflection->AddString(message, F("repeated_string"), "215");
|
|
253
|
+
reflection->AddString(message, F("repeated_bytes"), "216");
|
|
254
|
+
|
|
255
|
+
sub_message = reflection->AddMessage(message, F("repeatedgroup"));
|
|
256
|
+
sub_message->GetReflection()->SetInt32(sub_message, repeated_group_a_, 217);
|
|
257
|
+
sub_message = reflection->AddMessage(message, F("repeated_nested_message"));
|
|
258
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 218);
|
|
259
|
+
sub_message = reflection->AddMessage(message, F("repeated_foreign_message"));
|
|
260
|
+
sub_message->GetReflection()->SetInt32(sub_message, foreign_c_, 219);
|
|
261
|
+
sub_message = reflection->AddMessage(message, F("repeated_import_message"));
|
|
262
|
+
sub_message->GetReflection()->SetInt32(sub_message, import_d_, 220);
|
|
263
|
+
sub_message = reflection->AddMessage(message, F("repeated_lazy_message"));
|
|
264
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 227);
|
|
265
|
+
|
|
266
|
+
reflection->AddEnum(message, F("repeated_nested_enum"), nested_bar_);
|
|
267
|
+
reflection->AddEnum(message, F("repeated_foreign_enum"), foreign_bar_);
|
|
268
|
+
reflection->AddEnum(message, F("repeated_import_enum"), import_bar_);
|
|
269
|
+
|
|
270
|
+
reflection->AddString(message, F("repeated_string_piece"), "224");
|
|
271
|
+
reflection->AddString(message, F("repeated_cord"), "225");
|
|
272
|
+
|
|
273
|
+
// Add a second one of each field.
|
|
274
|
+
reflection->AddInt32(message, F("repeated_int32"), 301);
|
|
275
|
+
reflection->AddInt64(message, F("repeated_int64"), 302);
|
|
276
|
+
reflection->AddUInt32(message, F("repeated_uint32"), 303);
|
|
277
|
+
reflection->AddUInt64(message, F("repeated_uint64"), 304);
|
|
278
|
+
reflection->AddInt32(message, F("repeated_sint32"), 305);
|
|
279
|
+
reflection->AddInt64(message, F("repeated_sint64"), 306);
|
|
280
|
+
reflection->AddUInt32(message, F("repeated_fixed32"), 307);
|
|
281
|
+
reflection->AddUInt64(message, F("repeated_fixed64"), 308);
|
|
282
|
+
reflection->AddInt32(message, F("repeated_sfixed32"), 309);
|
|
283
|
+
reflection->AddInt64(message, F("repeated_sfixed64"), 310);
|
|
284
|
+
reflection->AddFloat(message, F("repeated_float"), 311);
|
|
285
|
+
reflection->AddDouble(message, F("repeated_double"), 312);
|
|
286
|
+
reflection->AddBool(message, F("repeated_bool"), false);
|
|
287
|
+
reflection->AddString(message, F("repeated_string"), "315");
|
|
288
|
+
reflection->AddString(message, F("repeated_bytes"), "316");
|
|
289
|
+
|
|
290
|
+
sub_message = reflection->AddMessage(message, F("repeatedgroup"));
|
|
291
|
+
sub_message->GetReflection()->SetInt32(sub_message, repeated_group_a_, 317);
|
|
292
|
+
sub_message = reflection->AddMessage(message, F("repeated_nested_message"));
|
|
293
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 318);
|
|
294
|
+
sub_message = reflection->AddMessage(message, F("repeated_foreign_message"));
|
|
295
|
+
sub_message->GetReflection()->SetInt32(sub_message, foreign_c_, 319);
|
|
296
|
+
sub_message = reflection->AddMessage(message, F("repeated_import_message"));
|
|
297
|
+
sub_message->GetReflection()->SetInt32(sub_message, import_d_, 320);
|
|
298
|
+
sub_message = reflection->AddMessage(message, F("repeated_lazy_message"));
|
|
299
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 327);
|
|
300
|
+
|
|
301
|
+
reflection->AddEnum(message, F("repeated_nested_enum"), nested_baz_);
|
|
302
|
+
reflection->AddEnum(message, F("repeated_foreign_enum"), foreign_baz_);
|
|
303
|
+
reflection->AddEnum(message, F("repeated_import_enum"), import_baz_);
|
|
304
|
+
|
|
305
|
+
reflection->AddString(message, F("repeated_string_piece"), "324");
|
|
306
|
+
reflection->AddString(message, F("repeated_cord"), "325");
|
|
307
|
+
|
|
308
|
+
// -----------------------------------------------------------------
|
|
309
|
+
|
|
310
|
+
reflection->SetInt32(message, F("default_int32"), 401);
|
|
311
|
+
reflection->SetInt64(message, F("default_int64"), 402);
|
|
312
|
+
reflection->SetUInt32(message, F("default_uint32"), 403);
|
|
313
|
+
reflection->SetUInt64(message, F("default_uint64"), 404);
|
|
314
|
+
reflection->SetInt32(message, F("default_sint32"), 405);
|
|
315
|
+
reflection->SetInt64(message, F("default_sint64"), 406);
|
|
316
|
+
reflection->SetUInt32(message, F("default_fixed32"), 407);
|
|
317
|
+
reflection->SetUInt64(message, F("default_fixed64"), 408);
|
|
318
|
+
reflection->SetInt32(message, F("default_sfixed32"), 409);
|
|
319
|
+
reflection->SetInt64(message, F("default_sfixed64"), 410);
|
|
320
|
+
reflection->SetFloat(message, F("default_float"), 411);
|
|
321
|
+
reflection->SetDouble(message, F("default_double"), 412);
|
|
322
|
+
reflection->SetBool(message, F("default_bool"), false);
|
|
323
|
+
reflection->SetString(message, F("default_string"), "415");
|
|
324
|
+
reflection->SetString(message, F("default_bytes"), "416");
|
|
325
|
+
|
|
326
|
+
reflection->SetEnum(message, F("default_nested_enum"), nested_foo_);
|
|
327
|
+
reflection->SetEnum(message, F("default_foreign_enum"), foreign_foo_);
|
|
328
|
+
reflection->SetEnum(message, F("default_import_enum"), import_foo_);
|
|
329
|
+
|
|
330
|
+
reflection->SetString(message, F("default_string_piece"), "424");
|
|
331
|
+
reflection->SetString(message, F("default_cord"), "425");
|
|
332
|
+
|
|
333
|
+
reflection->SetUInt32(message, F("oneof_uint32"), 601);
|
|
334
|
+
sub_message = reflection->MutableMessage(message, F("oneof_nested_message"));
|
|
335
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 602);
|
|
336
|
+
reflection->SetString(message, F("oneof_string"), "603");
|
|
337
|
+
reflection->SetString(message, F("oneof_bytes"), "604");
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
inline void TestUtil::ReflectionTester::SetOneofViaReflection(
|
|
341
|
+
Message* message) {
|
|
342
|
+
const Descriptor* descriptor = message->GetDescriptor();
|
|
343
|
+
const Reflection* reflection = message->GetReflection();
|
|
344
|
+
Message* sub_message = reflection->MutableMessage(
|
|
345
|
+
message, descriptor->FindFieldByName("foo_lazy_message"));
|
|
346
|
+
sub_message->GetReflection()->SetInt64(
|
|
347
|
+
sub_message, sub_message->GetDescriptor()->FindFieldByName("moo_int"),
|
|
348
|
+
100);
|
|
349
|
+
|
|
350
|
+
reflection->SetString(message, descriptor->FindFieldByName("bar_cord"),
|
|
351
|
+
"101");
|
|
352
|
+
reflection->SetInt32(message, descriptor->FindFieldByName("baz_int"), 102);
|
|
353
|
+
reflection->SetString(message, descriptor->FindFieldByName("baz_string"),
|
|
354
|
+
"103");
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
inline void TestUtil::ReflectionTester::ExpectOneofSetViaReflection(
|
|
358
|
+
const Message& message) {
|
|
359
|
+
const Descriptor* descriptor = message.GetDescriptor();
|
|
360
|
+
const Reflection* reflection = message.GetReflection();
|
|
361
|
+
std::string scratch;
|
|
362
|
+
EXPECT_TRUE(reflection->HasField(
|
|
363
|
+
message, descriptor->FindFieldByName("foo_lazy_message")));
|
|
364
|
+
EXPECT_TRUE(
|
|
365
|
+
reflection->HasField(message, descriptor->FindFieldByName("bar_cord")));
|
|
366
|
+
EXPECT_TRUE(
|
|
367
|
+
reflection->HasField(message, descriptor->FindFieldByName("baz_int")));
|
|
368
|
+
EXPECT_TRUE(
|
|
369
|
+
reflection->HasField(message, descriptor->FindFieldByName("baz_string")));
|
|
370
|
+
|
|
371
|
+
const Message* sub_message = &reflection->GetMessage(
|
|
372
|
+
message, descriptor->FindFieldByName("foo_lazy_message"));
|
|
373
|
+
EXPECT_EQ(100, sub_message->GetReflection()->GetInt64(
|
|
374
|
+
*sub_message,
|
|
375
|
+
sub_message->GetDescriptor()->FindFieldByName("moo_int")));
|
|
376
|
+
|
|
377
|
+
EXPECT_EQ("101", reflection->GetString(
|
|
378
|
+
message, descriptor->FindFieldByName("bar_cord")));
|
|
379
|
+
EXPECT_EQ("101",
|
|
380
|
+
reflection->GetStringReference(
|
|
381
|
+
message, descriptor->FindFieldByName("bar_cord"), &scratch));
|
|
382
|
+
|
|
383
|
+
EXPECT_EQ(102, reflection->GetInt32(message,
|
|
384
|
+
descriptor->FindFieldByName("baz_int")));
|
|
385
|
+
|
|
386
|
+
EXPECT_EQ("103", reflection->GetString(
|
|
387
|
+
message, descriptor->FindFieldByName("baz_string")));
|
|
388
|
+
EXPECT_EQ("103",
|
|
389
|
+
reflection->GetStringReference(
|
|
390
|
+
message, descriptor->FindFieldByName("baz_string"), &scratch));
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
inline void TestUtil::ReflectionTester::SetPackedFieldsViaReflection(
|
|
394
|
+
Message* message) {
|
|
395
|
+
const Reflection* reflection = message->GetReflection();
|
|
396
|
+
reflection->AddInt32(message, F("packed_int32"), 601);
|
|
397
|
+
reflection->AddInt64(message, F("packed_int64"), 602);
|
|
398
|
+
reflection->AddUInt32(message, F("packed_uint32"), 603);
|
|
399
|
+
reflection->AddUInt64(message, F("packed_uint64"), 604);
|
|
400
|
+
reflection->AddInt32(message, F("packed_sint32"), 605);
|
|
401
|
+
reflection->AddInt64(message, F("packed_sint64"), 606);
|
|
402
|
+
reflection->AddUInt32(message, F("packed_fixed32"), 607);
|
|
403
|
+
reflection->AddUInt64(message, F("packed_fixed64"), 608);
|
|
404
|
+
reflection->AddInt32(message, F("packed_sfixed32"), 609);
|
|
405
|
+
reflection->AddInt64(message, F("packed_sfixed64"), 610);
|
|
406
|
+
reflection->AddFloat(message, F("packed_float"), 611);
|
|
407
|
+
reflection->AddDouble(message, F("packed_double"), 612);
|
|
408
|
+
reflection->AddBool(message, F("packed_bool"), true);
|
|
409
|
+
reflection->AddEnum(message, F("packed_enum"), foreign_bar_);
|
|
410
|
+
|
|
411
|
+
reflection->AddInt32(message, F("packed_int32"), 701);
|
|
412
|
+
reflection->AddInt64(message, F("packed_int64"), 702);
|
|
413
|
+
reflection->AddUInt32(message, F("packed_uint32"), 703);
|
|
414
|
+
reflection->AddUInt64(message, F("packed_uint64"), 704);
|
|
415
|
+
reflection->AddInt32(message, F("packed_sint32"), 705);
|
|
416
|
+
reflection->AddInt64(message, F("packed_sint64"), 706);
|
|
417
|
+
reflection->AddUInt32(message, F("packed_fixed32"), 707);
|
|
418
|
+
reflection->AddUInt64(message, F("packed_fixed64"), 708);
|
|
419
|
+
reflection->AddInt32(message, F("packed_sfixed32"), 709);
|
|
420
|
+
reflection->AddInt64(message, F("packed_sfixed64"), 710);
|
|
421
|
+
reflection->AddFloat(message, F("packed_float"), 711);
|
|
422
|
+
reflection->AddDouble(message, F("packed_double"), 712);
|
|
423
|
+
reflection->AddBool(message, F("packed_bool"), false);
|
|
424
|
+
reflection->AddEnum(message, F("packed_enum"), foreign_baz_);
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// -------------------------------------------------------------------
|
|
428
|
+
|
|
429
|
+
inline void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection(
|
|
430
|
+
const Message& message) {
|
|
431
|
+
// We have to split this into three function otherwise it creates a stack
|
|
432
|
+
// frame so large that it triggers a warning.
|
|
433
|
+
ExpectAllFieldsSetViaReflection1(message);
|
|
434
|
+
ExpectAllFieldsSetViaReflection2(message);
|
|
435
|
+
ExpectAllFieldsSetViaReflection3(message);
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
inline void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection1(
|
|
439
|
+
const Message& message) {
|
|
440
|
+
const Reflection* reflection = message.GetReflection();
|
|
441
|
+
std::string scratch;
|
|
442
|
+
const Message* sub_message;
|
|
443
|
+
|
|
444
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_int32")));
|
|
445
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_int64")));
|
|
446
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_uint32")));
|
|
447
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_uint64")));
|
|
448
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_sint32")));
|
|
449
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_sint64")));
|
|
450
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_fixed32")));
|
|
451
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_fixed64")));
|
|
452
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_sfixed32")));
|
|
453
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_sfixed64")));
|
|
454
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_float")));
|
|
455
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_double")));
|
|
456
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_bool")));
|
|
457
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_string")));
|
|
458
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_bytes")));
|
|
459
|
+
|
|
460
|
+
EXPECT_TRUE(reflection->HasField(message, F("optionalgroup")));
|
|
461
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_nested_message")));
|
|
462
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_foreign_message")));
|
|
463
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_import_message")));
|
|
464
|
+
EXPECT_TRUE(
|
|
465
|
+
reflection->HasField(message, F("optional_public_import_message")));
|
|
466
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_lazy_message")));
|
|
467
|
+
EXPECT_TRUE(
|
|
468
|
+
reflection->HasField(message, F("optional_unverified_lazy_message")));
|
|
469
|
+
|
|
470
|
+
sub_message = &reflection->GetMessage(message, F("optionalgroup"));
|
|
471
|
+
EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, group_a_));
|
|
472
|
+
sub_message = &reflection->GetMessage(message, F("optional_nested_message"));
|
|
473
|
+
EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, nested_b_));
|
|
474
|
+
sub_message = &reflection->GetMessage(message, F("optional_foreign_message"));
|
|
475
|
+
EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, foreign_c_));
|
|
476
|
+
sub_message = &reflection->GetMessage(message, F("optional_import_message"));
|
|
477
|
+
EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, import_d_));
|
|
478
|
+
sub_message =
|
|
479
|
+
&reflection->GetMessage(message, F("optional_public_import_message"));
|
|
480
|
+
EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, import_e_));
|
|
481
|
+
sub_message = &reflection->GetMessage(message, F("optional_lazy_message"));
|
|
482
|
+
EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, nested_b_));
|
|
483
|
+
sub_message =
|
|
484
|
+
&reflection->GetMessage(message, F("optional_unverified_lazy_message"));
|
|
485
|
+
EXPECT_TRUE(sub_message->GetReflection()->HasField(*sub_message, nested_b_));
|
|
486
|
+
|
|
487
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_nested_enum")));
|
|
488
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_foreign_enum")));
|
|
489
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_import_enum")));
|
|
490
|
+
|
|
491
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_string_piece")));
|
|
492
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_cord")));
|
|
493
|
+
EXPECT_TRUE(reflection->HasField(message, F("optional_bytes_cord")));
|
|
494
|
+
|
|
495
|
+
EXPECT_EQ(101, reflection->GetInt32(message, F("optional_int32")));
|
|
496
|
+
EXPECT_EQ(102, reflection->GetInt64(message, F("optional_int64")));
|
|
497
|
+
EXPECT_EQ(103, reflection->GetUInt32(message, F("optional_uint32")));
|
|
498
|
+
EXPECT_EQ(104, reflection->GetUInt64(message, F("optional_uint64")));
|
|
499
|
+
EXPECT_EQ(105, reflection->GetInt32(message, F("optional_sint32")));
|
|
500
|
+
EXPECT_EQ(106, reflection->GetInt64(message, F("optional_sint64")));
|
|
501
|
+
EXPECT_EQ(107, reflection->GetUInt32(message, F("optional_fixed32")));
|
|
502
|
+
EXPECT_EQ(108, reflection->GetUInt64(message, F("optional_fixed64")));
|
|
503
|
+
EXPECT_EQ(109, reflection->GetInt32(message, F("optional_sfixed32")));
|
|
504
|
+
EXPECT_EQ(110, reflection->GetInt64(message, F("optional_sfixed64")));
|
|
505
|
+
EXPECT_EQ(111, reflection->GetFloat(message, F("optional_float")));
|
|
506
|
+
EXPECT_EQ(112, reflection->GetDouble(message, F("optional_double")));
|
|
507
|
+
EXPECT_TRUE(reflection->GetBool(message, F("optional_bool")));
|
|
508
|
+
EXPECT_EQ("115", reflection->GetString(message, F("optional_string")));
|
|
509
|
+
EXPECT_EQ("116", reflection->GetString(message, F("optional_bytes")));
|
|
510
|
+
|
|
511
|
+
EXPECT_EQ("115", reflection->GetStringReference(message, F("optional_string"),
|
|
512
|
+
&scratch));
|
|
513
|
+
EXPECT_EQ("116", reflection->GetStringReference(message, F("optional_bytes"),
|
|
514
|
+
&scratch));
|
|
515
|
+
|
|
516
|
+
sub_message = &reflection->GetMessage(message, F("optionalgroup"));
|
|
517
|
+
EXPECT_EQ(117,
|
|
518
|
+
sub_message->GetReflection()->GetInt32(*sub_message, group_a_));
|
|
519
|
+
sub_message = &reflection->GetMessage(message, F("optional_nested_message"));
|
|
520
|
+
EXPECT_EQ(118,
|
|
521
|
+
sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
522
|
+
sub_message = &reflection->GetMessage(message, F("optional_foreign_message"));
|
|
523
|
+
EXPECT_EQ(119,
|
|
524
|
+
sub_message->GetReflection()->GetInt32(*sub_message, foreign_c_));
|
|
525
|
+
sub_message = &reflection->GetMessage(message, F("optional_import_message"));
|
|
526
|
+
EXPECT_EQ(120,
|
|
527
|
+
sub_message->GetReflection()->GetInt32(*sub_message, import_d_));
|
|
528
|
+
sub_message =
|
|
529
|
+
&reflection->GetMessage(message, F("optional_public_import_message"));
|
|
530
|
+
EXPECT_EQ(126,
|
|
531
|
+
sub_message->GetReflection()->GetInt32(*sub_message, import_e_));
|
|
532
|
+
sub_message = &reflection->GetMessage(message, F("optional_lazy_message"));
|
|
533
|
+
EXPECT_EQ(127,
|
|
534
|
+
sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
535
|
+
sub_message =
|
|
536
|
+
&reflection->GetMessage(message, F("optional_unverified_lazy_message"));
|
|
537
|
+
EXPECT_EQ(128,
|
|
538
|
+
sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
539
|
+
|
|
540
|
+
EXPECT_EQ(nested_baz_,
|
|
541
|
+
reflection->GetEnum(message, F("optional_nested_enum")));
|
|
542
|
+
EXPECT_EQ(foreign_baz_,
|
|
543
|
+
reflection->GetEnum(message, F("optional_foreign_enum")));
|
|
544
|
+
EXPECT_EQ(import_baz_,
|
|
545
|
+
reflection->GetEnum(message, F("optional_import_enum")));
|
|
546
|
+
|
|
547
|
+
EXPECT_EQ("124", reflection->GetString(message, F("optional_string_piece")));
|
|
548
|
+
EXPECT_EQ("124", reflection->GetStringReference(
|
|
549
|
+
message, F("optional_string_piece"), &scratch));
|
|
550
|
+
|
|
551
|
+
EXPECT_EQ("125", reflection->GetString(message, F("optional_cord")));
|
|
552
|
+
EXPECT_EQ("125", reflection->GetStringReference(message, F("optional_cord"),
|
|
553
|
+
&scratch));
|
|
554
|
+
|
|
555
|
+
EXPECT_EQ("optional bytes cord",
|
|
556
|
+
reflection->GetString(message, F("optional_bytes_cord")));
|
|
557
|
+
EXPECT_EQ("optional bytes cord",
|
|
558
|
+
reflection->GetStringReference(message, F("optional_bytes_cord"),
|
|
559
|
+
&scratch));
|
|
560
|
+
EXPECT_EQ("optional bytes cord",
|
|
561
|
+
reflection->GetCord(message, F("optional_bytes_cord")));
|
|
562
|
+
|
|
563
|
+
EXPECT_TRUE(reflection->HasField(message, F("oneof_bytes")));
|
|
564
|
+
EXPECT_EQ("604", reflection->GetString(message, F("oneof_bytes")));
|
|
565
|
+
|
|
566
|
+
if (base_descriptor_->name() == "TestAllTypes") {
|
|
567
|
+
EXPECT_FALSE(reflection->HasField(message, F("oneof_uint32")));
|
|
568
|
+
EXPECT_FALSE(reflection->HasField(message, F("oneof_string")));
|
|
569
|
+
} else {
|
|
570
|
+
EXPECT_TRUE(reflection->HasField(message, F("oneof_uint32")));
|
|
571
|
+
EXPECT_TRUE(reflection->HasField(message, F("oneof_string")));
|
|
572
|
+
EXPECT_EQ(601, reflection->GetUInt32(message, F("oneof_uint32")));
|
|
573
|
+
EXPECT_EQ("603", reflection->GetString(message, F("oneof_string")));
|
|
574
|
+
sub_message = &reflection->GetMessage(message, F("oneof_nested_message"));
|
|
575
|
+
EXPECT_EQ(602,
|
|
576
|
+
sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
inline void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection2(
|
|
581
|
+
const Message& message) {
|
|
582
|
+
const Reflection* reflection = message.GetReflection();
|
|
583
|
+
std::string scratch;
|
|
584
|
+
const Message* sub_message;
|
|
585
|
+
|
|
586
|
+
// -----------------------------------------------------------------
|
|
587
|
+
|
|
588
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_int32")));
|
|
589
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_int64")));
|
|
590
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_uint32")));
|
|
591
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_uint64")));
|
|
592
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_sint32")));
|
|
593
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_sint64")));
|
|
594
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_fixed32")));
|
|
595
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_fixed64")));
|
|
596
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_sfixed32")));
|
|
597
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_sfixed64")));
|
|
598
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_float")));
|
|
599
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_double")));
|
|
600
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_bool")));
|
|
601
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_string")));
|
|
602
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_bytes")));
|
|
603
|
+
|
|
604
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeatedgroup")));
|
|
605
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_nested_message")));
|
|
606
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_foreign_message")));
|
|
607
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_import_message")));
|
|
608
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_lazy_message")));
|
|
609
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_nested_enum")));
|
|
610
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_foreign_enum")));
|
|
611
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_import_enum")));
|
|
612
|
+
|
|
613
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_string_piece")));
|
|
614
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("repeated_cord")));
|
|
615
|
+
|
|
616
|
+
EXPECT_EQ(201, reflection->GetRepeatedInt32(message, F("repeated_int32"), 0));
|
|
617
|
+
EXPECT_EQ(202, reflection->GetRepeatedInt64(message, F("repeated_int64"), 0));
|
|
618
|
+
EXPECT_EQ(203,
|
|
619
|
+
reflection->GetRepeatedUInt32(message, F("repeated_uint32"), 0));
|
|
620
|
+
EXPECT_EQ(204,
|
|
621
|
+
reflection->GetRepeatedUInt64(message, F("repeated_uint64"), 0));
|
|
622
|
+
EXPECT_EQ(205,
|
|
623
|
+
reflection->GetRepeatedInt32(message, F("repeated_sint32"), 0));
|
|
624
|
+
EXPECT_EQ(206,
|
|
625
|
+
reflection->GetRepeatedInt64(message, F("repeated_sint64"), 0));
|
|
626
|
+
EXPECT_EQ(207,
|
|
627
|
+
reflection->GetRepeatedUInt32(message, F("repeated_fixed32"), 0));
|
|
628
|
+
EXPECT_EQ(208,
|
|
629
|
+
reflection->GetRepeatedUInt64(message, F("repeated_fixed64"), 0));
|
|
630
|
+
EXPECT_EQ(209,
|
|
631
|
+
reflection->GetRepeatedInt32(message, F("repeated_sfixed32"), 0));
|
|
632
|
+
EXPECT_EQ(210,
|
|
633
|
+
reflection->GetRepeatedInt64(message, F("repeated_sfixed64"), 0));
|
|
634
|
+
EXPECT_EQ(211, reflection->GetRepeatedFloat(message, F("repeated_float"), 0));
|
|
635
|
+
EXPECT_EQ(212,
|
|
636
|
+
reflection->GetRepeatedDouble(message, F("repeated_double"), 0));
|
|
637
|
+
EXPECT_TRUE(reflection->GetRepeatedBool(message, F("repeated_bool"), 0));
|
|
638
|
+
EXPECT_EQ("215",
|
|
639
|
+
reflection->GetRepeatedString(message, F("repeated_string"), 0));
|
|
640
|
+
EXPECT_EQ("216",
|
|
641
|
+
reflection->GetRepeatedString(message, F("repeated_bytes"), 0));
|
|
642
|
+
|
|
643
|
+
EXPECT_EQ("215", reflection->GetRepeatedStringReference(
|
|
644
|
+
message, F("repeated_string"), 0, &scratch));
|
|
645
|
+
EXPECT_EQ("216", reflection->GetRepeatedStringReference(
|
|
646
|
+
message, F("repeated_bytes"), 0, &scratch));
|
|
647
|
+
|
|
648
|
+
sub_message = &reflection->GetRepeatedMessage(message, F("repeatedgroup"), 0);
|
|
649
|
+
EXPECT_EQ(217, sub_message->GetReflection()->GetInt32(*sub_message,
|
|
650
|
+
repeated_group_a_));
|
|
651
|
+
sub_message =
|
|
652
|
+
&reflection->GetRepeatedMessage(message, F("repeated_nested_message"), 0);
|
|
653
|
+
EXPECT_EQ(218,
|
|
654
|
+
sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
655
|
+
sub_message = &reflection->GetRepeatedMessage(
|
|
656
|
+
message, F("repeated_foreign_message"), 0);
|
|
657
|
+
EXPECT_EQ(219,
|
|
658
|
+
sub_message->GetReflection()->GetInt32(*sub_message, foreign_c_));
|
|
659
|
+
sub_message =
|
|
660
|
+
&reflection->GetRepeatedMessage(message, F("repeated_import_message"), 0);
|
|
661
|
+
EXPECT_EQ(220,
|
|
662
|
+
sub_message->GetReflection()->GetInt32(*sub_message, import_d_));
|
|
663
|
+
sub_message =
|
|
664
|
+
&reflection->GetRepeatedMessage(message, F("repeated_lazy_message"), 0);
|
|
665
|
+
EXPECT_EQ(227,
|
|
666
|
+
sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
667
|
+
|
|
668
|
+
EXPECT_EQ(nested_bar_,
|
|
669
|
+
reflection->GetRepeatedEnum(message, F("repeated_nested_enum"), 0));
|
|
670
|
+
EXPECT_EQ(foreign_bar_, reflection->GetRepeatedEnum(
|
|
671
|
+
message, F("repeated_foreign_enum"), 0));
|
|
672
|
+
EXPECT_EQ(import_bar_,
|
|
673
|
+
reflection->GetRepeatedEnum(message, F("repeated_import_enum"), 0));
|
|
674
|
+
|
|
675
|
+
EXPECT_EQ("224", reflection->GetRepeatedString(
|
|
676
|
+
message, F("repeated_string_piece"), 0));
|
|
677
|
+
EXPECT_EQ("224", reflection->GetRepeatedStringReference(
|
|
678
|
+
message, F("repeated_string_piece"), 0, &scratch));
|
|
679
|
+
|
|
680
|
+
EXPECT_EQ("225",
|
|
681
|
+
reflection->GetRepeatedString(message, F("repeated_cord"), 0));
|
|
682
|
+
EXPECT_EQ("225", reflection->GetRepeatedStringReference(
|
|
683
|
+
message, F("repeated_cord"), 0, &scratch));
|
|
684
|
+
|
|
685
|
+
EXPECT_EQ(301, reflection->GetRepeatedInt32(message, F("repeated_int32"), 1));
|
|
686
|
+
EXPECT_EQ(302, reflection->GetRepeatedInt64(message, F("repeated_int64"), 1));
|
|
687
|
+
EXPECT_EQ(303,
|
|
688
|
+
reflection->GetRepeatedUInt32(message, F("repeated_uint32"), 1));
|
|
689
|
+
EXPECT_EQ(304,
|
|
690
|
+
reflection->GetRepeatedUInt64(message, F("repeated_uint64"), 1));
|
|
691
|
+
EXPECT_EQ(305,
|
|
692
|
+
reflection->GetRepeatedInt32(message, F("repeated_sint32"), 1));
|
|
693
|
+
EXPECT_EQ(306,
|
|
694
|
+
reflection->GetRepeatedInt64(message, F("repeated_sint64"), 1));
|
|
695
|
+
EXPECT_EQ(307,
|
|
696
|
+
reflection->GetRepeatedUInt32(message, F("repeated_fixed32"), 1));
|
|
697
|
+
EXPECT_EQ(308,
|
|
698
|
+
reflection->GetRepeatedUInt64(message, F("repeated_fixed64"), 1));
|
|
699
|
+
EXPECT_EQ(309,
|
|
700
|
+
reflection->GetRepeatedInt32(message, F("repeated_sfixed32"), 1));
|
|
701
|
+
EXPECT_EQ(310,
|
|
702
|
+
reflection->GetRepeatedInt64(message, F("repeated_sfixed64"), 1));
|
|
703
|
+
EXPECT_EQ(311, reflection->GetRepeatedFloat(message, F("repeated_float"), 1));
|
|
704
|
+
EXPECT_EQ(312,
|
|
705
|
+
reflection->GetRepeatedDouble(message, F("repeated_double"), 1));
|
|
706
|
+
EXPECT_FALSE(reflection->GetRepeatedBool(message, F("repeated_bool"), 1));
|
|
707
|
+
EXPECT_EQ("315",
|
|
708
|
+
reflection->GetRepeatedString(message, F("repeated_string"), 1));
|
|
709
|
+
EXPECT_EQ("316",
|
|
710
|
+
reflection->GetRepeatedString(message, F("repeated_bytes"), 1));
|
|
711
|
+
|
|
712
|
+
EXPECT_EQ("315", reflection->GetRepeatedStringReference(
|
|
713
|
+
message, F("repeated_string"), 1, &scratch));
|
|
714
|
+
EXPECT_EQ("316", reflection->GetRepeatedStringReference(
|
|
715
|
+
message, F("repeated_bytes"), 1, &scratch));
|
|
716
|
+
|
|
717
|
+
sub_message = &reflection->GetRepeatedMessage(message, F("repeatedgroup"), 1);
|
|
718
|
+
EXPECT_EQ(317, sub_message->GetReflection()->GetInt32(*sub_message,
|
|
719
|
+
repeated_group_a_));
|
|
720
|
+
sub_message =
|
|
721
|
+
&reflection->GetRepeatedMessage(message, F("repeated_nested_message"), 1);
|
|
722
|
+
EXPECT_EQ(318,
|
|
723
|
+
sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
724
|
+
sub_message = &reflection->GetRepeatedMessage(
|
|
725
|
+
message, F("repeated_foreign_message"), 1);
|
|
726
|
+
EXPECT_EQ(319,
|
|
727
|
+
sub_message->GetReflection()->GetInt32(*sub_message, foreign_c_));
|
|
728
|
+
sub_message =
|
|
729
|
+
&reflection->GetRepeatedMessage(message, F("repeated_import_message"), 1);
|
|
730
|
+
EXPECT_EQ(320,
|
|
731
|
+
sub_message->GetReflection()->GetInt32(*sub_message, import_d_));
|
|
732
|
+
sub_message =
|
|
733
|
+
&reflection->GetRepeatedMessage(message, F("repeated_lazy_message"), 1);
|
|
734
|
+
EXPECT_EQ(327,
|
|
735
|
+
sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
736
|
+
|
|
737
|
+
EXPECT_EQ(nested_baz_,
|
|
738
|
+
reflection->GetRepeatedEnum(message, F("repeated_nested_enum"), 1));
|
|
739
|
+
EXPECT_EQ(foreign_baz_, reflection->GetRepeatedEnum(
|
|
740
|
+
message, F("repeated_foreign_enum"), 1));
|
|
741
|
+
EXPECT_EQ(import_baz_,
|
|
742
|
+
reflection->GetRepeatedEnum(message, F("repeated_import_enum"), 1));
|
|
743
|
+
|
|
744
|
+
EXPECT_EQ("324", reflection->GetRepeatedString(
|
|
745
|
+
message, F("repeated_string_piece"), 1));
|
|
746
|
+
EXPECT_EQ("324", reflection->GetRepeatedStringReference(
|
|
747
|
+
message, F("repeated_string_piece"), 1, &scratch));
|
|
748
|
+
|
|
749
|
+
EXPECT_EQ("325",
|
|
750
|
+
reflection->GetRepeatedString(message, F("repeated_cord"), 1));
|
|
751
|
+
EXPECT_EQ("325", reflection->GetRepeatedStringReference(
|
|
752
|
+
message, F("repeated_cord"), 1, &scratch));
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
inline void TestUtil::ReflectionTester::ExpectAllFieldsSetViaReflection3(
|
|
756
|
+
const Message& message) {
|
|
757
|
+
const Reflection* reflection = message.GetReflection();
|
|
758
|
+
std::string scratch;
|
|
759
|
+
|
|
760
|
+
// -----------------------------------------------------------------
|
|
761
|
+
|
|
762
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_int32")));
|
|
763
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_int64")));
|
|
764
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_uint32")));
|
|
765
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_uint64")));
|
|
766
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_sint32")));
|
|
767
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_sint64")));
|
|
768
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_fixed32")));
|
|
769
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_fixed64")));
|
|
770
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_sfixed32")));
|
|
771
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_sfixed64")));
|
|
772
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_float")));
|
|
773
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_double")));
|
|
774
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_bool")));
|
|
775
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_string")));
|
|
776
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_bytes")));
|
|
777
|
+
|
|
778
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_nested_enum")));
|
|
779
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_foreign_enum")));
|
|
780
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_import_enum")));
|
|
781
|
+
|
|
782
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_string_piece")));
|
|
783
|
+
EXPECT_TRUE(reflection->HasField(message, F("default_cord")));
|
|
784
|
+
|
|
785
|
+
EXPECT_EQ(401, reflection->GetInt32(message, F("default_int32")));
|
|
786
|
+
EXPECT_EQ(402, reflection->GetInt64(message, F("default_int64")));
|
|
787
|
+
EXPECT_EQ(403, reflection->GetUInt32(message, F("default_uint32")));
|
|
788
|
+
EXPECT_EQ(404, reflection->GetUInt64(message, F("default_uint64")));
|
|
789
|
+
EXPECT_EQ(405, reflection->GetInt32(message, F("default_sint32")));
|
|
790
|
+
EXPECT_EQ(406, reflection->GetInt64(message, F("default_sint64")));
|
|
791
|
+
EXPECT_EQ(407, reflection->GetUInt32(message, F("default_fixed32")));
|
|
792
|
+
EXPECT_EQ(408, reflection->GetUInt64(message, F("default_fixed64")));
|
|
793
|
+
EXPECT_EQ(409, reflection->GetInt32(message, F("default_sfixed32")));
|
|
794
|
+
EXPECT_EQ(410, reflection->GetInt64(message, F("default_sfixed64")));
|
|
795
|
+
EXPECT_EQ(411, reflection->GetFloat(message, F("default_float")));
|
|
796
|
+
EXPECT_EQ(412, reflection->GetDouble(message, F("default_double")));
|
|
797
|
+
EXPECT_FALSE(reflection->GetBool(message, F("default_bool")));
|
|
798
|
+
EXPECT_EQ("415", reflection->GetString(message, F("default_string")));
|
|
799
|
+
EXPECT_EQ("416", reflection->GetString(message, F("default_bytes")));
|
|
800
|
+
|
|
801
|
+
EXPECT_EQ("415", reflection->GetStringReference(message, F("default_string"),
|
|
802
|
+
&scratch));
|
|
803
|
+
EXPECT_EQ("416", reflection->GetStringReference(message, F("default_bytes"),
|
|
804
|
+
&scratch));
|
|
805
|
+
|
|
806
|
+
EXPECT_EQ(nested_foo_,
|
|
807
|
+
reflection->GetEnum(message, F("default_nested_enum")));
|
|
808
|
+
EXPECT_EQ(foreign_foo_,
|
|
809
|
+
reflection->GetEnum(message, F("default_foreign_enum")));
|
|
810
|
+
EXPECT_EQ(import_foo_,
|
|
811
|
+
reflection->GetEnum(message, F("default_import_enum")));
|
|
812
|
+
|
|
813
|
+
EXPECT_EQ("424", reflection->GetString(message, F("default_string_piece")));
|
|
814
|
+
EXPECT_EQ("424", reflection->GetStringReference(
|
|
815
|
+
message, F("default_string_piece"), &scratch));
|
|
816
|
+
|
|
817
|
+
EXPECT_EQ("425", reflection->GetString(message, F("default_cord")));
|
|
818
|
+
EXPECT_EQ("425", reflection->GetStringReference(message, F("default_cord"),
|
|
819
|
+
&scratch));
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
inline void TestUtil::ReflectionTester::ExpectPackedFieldsSetViaReflection(
|
|
823
|
+
const Message& message) {
|
|
824
|
+
const Reflection* reflection = message.GetReflection();
|
|
825
|
+
|
|
826
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_int32")));
|
|
827
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_int64")));
|
|
828
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_uint32")));
|
|
829
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_uint64")));
|
|
830
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_sint32")));
|
|
831
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_sint64")));
|
|
832
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_fixed32")));
|
|
833
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_fixed64")));
|
|
834
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_sfixed32")));
|
|
835
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_sfixed64")));
|
|
836
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_float")));
|
|
837
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_double")));
|
|
838
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_bool")));
|
|
839
|
+
ASSERT_EQ(2, reflection->FieldSize(message, F("packed_enum")));
|
|
840
|
+
|
|
841
|
+
EXPECT_EQ(601, reflection->GetRepeatedInt32(message, F("packed_int32"), 0));
|
|
842
|
+
EXPECT_EQ(602, reflection->GetRepeatedInt64(message, F("packed_int64"), 0));
|
|
843
|
+
EXPECT_EQ(603, reflection->GetRepeatedUInt32(message, F("packed_uint32"), 0));
|
|
844
|
+
EXPECT_EQ(604, reflection->GetRepeatedUInt64(message, F("packed_uint64"), 0));
|
|
845
|
+
EXPECT_EQ(605, reflection->GetRepeatedInt32(message, F("packed_sint32"), 0));
|
|
846
|
+
EXPECT_EQ(606, reflection->GetRepeatedInt64(message, F("packed_sint64"), 0));
|
|
847
|
+
EXPECT_EQ(607,
|
|
848
|
+
reflection->GetRepeatedUInt32(message, F("packed_fixed32"), 0));
|
|
849
|
+
EXPECT_EQ(608,
|
|
850
|
+
reflection->GetRepeatedUInt64(message, F("packed_fixed64"), 0));
|
|
851
|
+
EXPECT_EQ(609,
|
|
852
|
+
reflection->GetRepeatedInt32(message, F("packed_sfixed32"), 0));
|
|
853
|
+
EXPECT_EQ(610,
|
|
854
|
+
reflection->GetRepeatedInt64(message, F("packed_sfixed64"), 0));
|
|
855
|
+
EXPECT_EQ(611, reflection->GetRepeatedFloat(message, F("packed_float"), 0));
|
|
856
|
+
EXPECT_EQ(612, reflection->GetRepeatedDouble(message, F("packed_double"), 0));
|
|
857
|
+
EXPECT_TRUE(reflection->GetRepeatedBool(message, F("packed_bool"), 0));
|
|
858
|
+
EXPECT_EQ(foreign_bar_,
|
|
859
|
+
reflection->GetRepeatedEnum(message, F("packed_enum"), 0));
|
|
860
|
+
|
|
861
|
+
EXPECT_EQ(701, reflection->GetRepeatedInt32(message, F("packed_int32"), 1));
|
|
862
|
+
EXPECT_EQ(702, reflection->GetRepeatedInt64(message, F("packed_int64"), 1));
|
|
863
|
+
EXPECT_EQ(703, reflection->GetRepeatedUInt32(message, F("packed_uint32"), 1));
|
|
864
|
+
EXPECT_EQ(704, reflection->GetRepeatedUInt64(message, F("packed_uint64"), 1));
|
|
865
|
+
EXPECT_EQ(705, reflection->GetRepeatedInt32(message, F("packed_sint32"), 1));
|
|
866
|
+
EXPECT_EQ(706, reflection->GetRepeatedInt64(message, F("packed_sint64"), 1));
|
|
867
|
+
EXPECT_EQ(707,
|
|
868
|
+
reflection->GetRepeatedUInt32(message, F("packed_fixed32"), 1));
|
|
869
|
+
EXPECT_EQ(708,
|
|
870
|
+
reflection->GetRepeatedUInt64(message, F("packed_fixed64"), 1));
|
|
871
|
+
EXPECT_EQ(709,
|
|
872
|
+
reflection->GetRepeatedInt32(message, F("packed_sfixed32"), 1));
|
|
873
|
+
EXPECT_EQ(710,
|
|
874
|
+
reflection->GetRepeatedInt64(message, F("packed_sfixed64"), 1));
|
|
875
|
+
EXPECT_EQ(711, reflection->GetRepeatedFloat(message, F("packed_float"), 1));
|
|
876
|
+
EXPECT_EQ(712, reflection->GetRepeatedDouble(message, F("packed_double"), 1));
|
|
877
|
+
EXPECT_FALSE(reflection->GetRepeatedBool(message, F("packed_bool"), 1));
|
|
878
|
+
EXPECT_EQ(foreign_baz_,
|
|
879
|
+
reflection->GetRepeatedEnum(message, F("packed_enum"), 1));
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
// -------------------------------------------------------------------
|
|
883
|
+
|
|
884
|
+
inline void TestUtil::ReflectionTester::ExpectClearViaReflection(
|
|
885
|
+
const Message& message) {
|
|
886
|
+
const Reflection* reflection = message.GetReflection();
|
|
887
|
+
std::string scratch;
|
|
888
|
+
const Message* sub_message;
|
|
889
|
+
|
|
890
|
+
// has_blah() should initially be false for all optional fields.
|
|
891
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_int32")));
|
|
892
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_int64")));
|
|
893
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_uint32")));
|
|
894
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_uint64")));
|
|
895
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_sint32")));
|
|
896
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_sint64")));
|
|
897
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_fixed32")));
|
|
898
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_fixed64")));
|
|
899
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_sfixed32")));
|
|
900
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_sfixed64")));
|
|
901
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_float")));
|
|
902
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_double")));
|
|
903
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_bool")));
|
|
904
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_string")));
|
|
905
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_bytes")));
|
|
906
|
+
|
|
907
|
+
EXPECT_FALSE(reflection->HasField(message, F("optionalgroup")));
|
|
908
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_nested_message")));
|
|
909
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_foreign_message")));
|
|
910
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_import_message")));
|
|
911
|
+
EXPECT_FALSE(
|
|
912
|
+
reflection->HasField(message, F("optional_public_import_message")));
|
|
913
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_lazy_message")));
|
|
914
|
+
EXPECT_FALSE(
|
|
915
|
+
reflection->HasField(message, F("optional_unverified_lazy_message")));
|
|
916
|
+
|
|
917
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_nested_enum")));
|
|
918
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_foreign_enum")));
|
|
919
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_import_enum")));
|
|
920
|
+
|
|
921
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_string_piece")));
|
|
922
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_cord")));
|
|
923
|
+
EXPECT_FALSE(reflection->HasField(message, F("optional_bytes_cord")));
|
|
924
|
+
|
|
925
|
+
// Optional fields without defaults are set to zero or something like it.
|
|
926
|
+
EXPECT_EQ(0, reflection->GetInt32(message, F("optional_int32")));
|
|
927
|
+
EXPECT_EQ(0, reflection->GetInt64(message, F("optional_int64")));
|
|
928
|
+
EXPECT_EQ(0, reflection->GetUInt32(message, F("optional_uint32")));
|
|
929
|
+
EXPECT_EQ(0, reflection->GetUInt64(message, F("optional_uint64")));
|
|
930
|
+
EXPECT_EQ(0, reflection->GetInt32(message, F("optional_sint32")));
|
|
931
|
+
EXPECT_EQ(0, reflection->GetInt64(message, F("optional_sint64")));
|
|
932
|
+
EXPECT_EQ(0, reflection->GetUInt32(message, F("optional_fixed32")));
|
|
933
|
+
EXPECT_EQ(0, reflection->GetUInt64(message, F("optional_fixed64")));
|
|
934
|
+
EXPECT_EQ(0, reflection->GetInt32(message, F("optional_sfixed32")));
|
|
935
|
+
EXPECT_EQ(0, reflection->GetInt64(message, F("optional_sfixed64")));
|
|
936
|
+
EXPECT_EQ(0, reflection->GetFloat(message, F("optional_float")));
|
|
937
|
+
EXPECT_EQ(0, reflection->GetDouble(message, F("optional_double")));
|
|
938
|
+
EXPECT_FALSE(reflection->GetBool(message, F("optional_bool")));
|
|
939
|
+
EXPECT_EQ("", reflection->GetString(message, F("optional_string")));
|
|
940
|
+
EXPECT_EQ("", reflection->GetString(message, F("optional_bytes")));
|
|
941
|
+
|
|
942
|
+
EXPECT_EQ("", reflection->GetStringReference(message, F("optional_string"),
|
|
943
|
+
&scratch));
|
|
944
|
+
EXPECT_EQ("", reflection->GetStringReference(message, F("optional_bytes"),
|
|
945
|
+
&scratch));
|
|
946
|
+
|
|
947
|
+
// Embedded messages should also be clear.
|
|
948
|
+
sub_message = &reflection->GetMessage(message, F("optionalgroup"));
|
|
949
|
+
EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, group_a_));
|
|
950
|
+
EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, group_a_));
|
|
951
|
+
sub_message = &reflection->GetMessage(message, F("optional_nested_message"));
|
|
952
|
+
EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, nested_b_));
|
|
953
|
+
EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
954
|
+
sub_message = &reflection->GetMessage(message, F("optional_foreign_message"));
|
|
955
|
+
EXPECT_FALSE(
|
|
956
|
+
sub_message->GetReflection()->HasField(*sub_message, foreign_c_));
|
|
957
|
+
EXPECT_EQ(0,
|
|
958
|
+
sub_message->GetReflection()->GetInt32(*sub_message, foreign_c_));
|
|
959
|
+
sub_message = &reflection->GetMessage(message, F("optional_import_message"));
|
|
960
|
+
EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, import_d_));
|
|
961
|
+
EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, import_d_));
|
|
962
|
+
sub_message =
|
|
963
|
+
&reflection->GetMessage(message, F("optional_public_import_message"));
|
|
964
|
+
EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, import_e_));
|
|
965
|
+
EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, import_e_));
|
|
966
|
+
sub_message = &reflection->GetMessage(message, F("optional_lazy_message"));
|
|
967
|
+
EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, nested_b_));
|
|
968
|
+
EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
969
|
+
sub_message =
|
|
970
|
+
&reflection->GetMessage(message, F("optional_unverified_lazy_message"));
|
|
971
|
+
EXPECT_FALSE(sub_message->GetReflection()->HasField(*sub_message, nested_b_));
|
|
972
|
+
EXPECT_EQ(0, sub_message->GetReflection()->GetInt32(*sub_message, nested_b_));
|
|
973
|
+
|
|
974
|
+
// Enums without defaults are set to the first value in the enum.
|
|
975
|
+
EXPECT_EQ(nested_foo_,
|
|
976
|
+
reflection->GetEnum(message, F("optional_nested_enum")));
|
|
977
|
+
EXPECT_EQ(foreign_foo_,
|
|
978
|
+
reflection->GetEnum(message, F("optional_foreign_enum")));
|
|
979
|
+
EXPECT_EQ(import_foo_,
|
|
980
|
+
reflection->GetEnum(message, F("optional_import_enum")));
|
|
981
|
+
|
|
982
|
+
EXPECT_EQ("", reflection->GetString(message, F("optional_string_piece")));
|
|
983
|
+
EXPECT_EQ("", reflection->GetStringReference(
|
|
984
|
+
message, F("optional_string_piece"), &scratch));
|
|
985
|
+
|
|
986
|
+
EXPECT_EQ("", reflection->GetString(message, F("optional_cord")));
|
|
987
|
+
EXPECT_EQ("", reflection->GetStringReference(message, F("optional_cord"),
|
|
988
|
+
&scratch));
|
|
989
|
+
|
|
990
|
+
EXPECT_EQ("", reflection->GetString(message, F("optional_bytes_cord")));
|
|
991
|
+
EXPECT_EQ("", reflection->GetStringReference(
|
|
992
|
+
message, F("optional_bytes_cord"), &scratch));
|
|
993
|
+
EXPECT_EQ("", reflection->GetCord(message, F("optional_bytes_cord")));
|
|
994
|
+
|
|
995
|
+
// Repeated fields are empty.
|
|
996
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_int32")));
|
|
997
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_int64")));
|
|
998
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_uint32")));
|
|
999
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_uint64")));
|
|
1000
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_sint32")));
|
|
1001
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_sint64")));
|
|
1002
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_fixed32")));
|
|
1003
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_fixed64")));
|
|
1004
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_sfixed32")));
|
|
1005
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_sfixed64")));
|
|
1006
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_float")));
|
|
1007
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_double")));
|
|
1008
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_bool")));
|
|
1009
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_string")));
|
|
1010
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_bytes")));
|
|
1011
|
+
|
|
1012
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeatedgroup")));
|
|
1013
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_nested_message")));
|
|
1014
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_foreign_message")));
|
|
1015
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_import_message")));
|
|
1016
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_lazy_message")));
|
|
1017
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_nested_enum")));
|
|
1018
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_foreign_enum")));
|
|
1019
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_import_enum")));
|
|
1020
|
+
|
|
1021
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_string_piece")));
|
|
1022
|
+
EXPECT_EQ(0, reflection->FieldSize(message, F("repeated_cord")));
|
|
1023
|
+
|
|
1024
|
+
// has_blah() should also be false for all default fields.
|
|
1025
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_int32")));
|
|
1026
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_int64")));
|
|
1027
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_uint32")));
|
|
1028
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_uint64")));
|
|
1029
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_sint32")));
|
|
1030
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_sint64")));
|
|
1031
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_fixed32")));
|
|
1032
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_fixed64")));
|
|
1033
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_sfixed32")));
|
|
1034
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_sfixed64")));
|
|
1035
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_float")));
|
|
1036
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_double")));
|
|
1037
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_bool")));
|
|
1038
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_string")));
|
|
1039
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_bytes")));
|
|
1040
|
+
|
|
1041
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_nested_enum")));
|
|
1042
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_foreign_enum")));
|
|
1043
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_import_enum")));
|
|
1044
|
+
|
|
1045
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_string_piece")));
|
|
1046
|
+
EXPECT_FALSE(reflection->HasField(message, F("default_cord")));
|
|
1047
|
+
|
|
1048
|
+
// Fields with defaults have their default values (duh).
|
|
1049
|
+
EXPECT_EQ(41, reflection->GetInt32(message, F("default_int32")));
|
|
1050
|
+
EXPECT_EQ(42, reflection->GetInt64(message, F("default_int64")));
|
|
1051
|
+
EXPECT_EQ(43, reflection->GetUInt32(message, F("default_uint32")));
|
|
1052
|
+
EXPECT_EQ(44, reflection->GetUInt64(message, F("default_uint64")));
|
|
1053
|
+
EXPECT_EQ(-45, reflection->GetInt32(message, F("default_sint32")));
|
|
1054
|
+
EXPECT_EQ(46, reflection->GetInt64(message, F("default_sint64")));
|
|
1055
|
+
EXPECT_EQ(47, reflection->GetUInt32(message, F("default_fixed32")));
|
|
1056
|
+
EXPECT_EQ(48, reflection->GetUInt64(message, F("default_fixed64")));
|
|
1057
|
+
EXPECT_EQ(49, reflection->GetInt32(message, F("default_sfixed32")));
|
|
1058
|
+
EXPECT_EQ(-50, reflection->GetInt64(message, F("default_sfixed64")));
|
|
1059
|
+
EXPECT_EQ(51.5, reflection->GetFloat(message, F("default_float")));
|
|
1060
|
+
EXPECT_EQ(52e3, reflection->GetDouble(message, F("default_double")));
|
|
1061
|
+
EXPECT_TRUE(reflection->GetBool(message, F("default_bool")));
|
|
1062
|
+
EXPECT_EQ("hello", reflection->GetString(message, F("default_string")));
|
|
1063
|
+
EXPECT_EQ("world", reflection->GetString(message, F("default_bytes")));
|
|
1064
|
+
|
|
1065
|
+
EXPECT_EQ("hello", reflection->GetStringReference(
|
|
1066
|
+
message, F("default_string"), &scratch));
|
|
1067
|
+
EXPECT_EQ("world", reflection->GetStringReference(message, F("default_bytes"),
|
|
1068
|
+
&scratch));
|
|
1069
|
+
|
|
1070
|
+
EXPECT_EQ(nested_bar_,
|
|
1071
|
+
reflection->GetEnum(message, F("default_nested_enum")));
|
|
1072
|
+
EXPECT_EQ(foreign_bar_,
|
|
1073
|
+
reflection->GetEnum(message, F("default_foreign_enum")));
|
|
1074
|
+
EXPECT_EQ(import_bar_,
|
|
1075
|
+
reflection->GetEnum(message, F("default_import_enum")));
|
|
1076
|
+
|
|
1077
|
+
EXPECT_EQ("abc", reflection->GetString(message, F("default_string_piece")));
|
|
1078
|
+
EXPECT_EQ("abc", reflection->GetStringReference(
|
|
1079
|
+
message, F("default_string_piece"), &scratch));
|
|
1080
|
+
|
|
1081
|
+
EXPECT_EQ("123", reflection->GetString(message, F("default_cord")));
|
|
1082
|
+
EXPECT_EQ("123", reflection->GetStringReference(message, F("default_cord"),
|
|
1083
|
+
&scratch));
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1086
|
+
// -------------------------------------------------------------------
|
|
1087
|
+
|
|
1088
|
+
inline void TestUtil::ReflectionTester::ModifyRepeatedFieldsViaReflection(
|
|
1089
|
+
Message* message) {
|
|
1090
|
+
const Reflection* reflection = message->GetReflection();
|
|
1091
|
+
Message* sub_message;
|
|
1092
|
+
|
|
1093
|
+
reflection->SetRepeatedInt32(message, F("repeated_int32"), 1, 501);
|
|
1094
|
+
reflection->SetRepeatedInt64(message, F("repeated_int64"), 1, 502);
|
|
1095
|
+
reflection->SetRepeatedUInt32(message, F("repeated_uint32"), 1, 503);
|
|
1096
|
+
reflection->SetRepeatedUInt64(message, F("repeated_uint64"), 1, 504);
|
|
1097
|
+
reflection->SetRepeatedInt32(message, F("repeated_sint32"), 1, 505);
|
|
1098
|
+
reflection->SetRepeatedInt64(message, F("repeated_sint64"), 1, 506);
|
|
1099
|
+
reflection->SetRepeatedUInt32(message, F("repeated_fixed32"), 1, 507);
|
|
1100
|
+
reflection->SetRepeatedUInt64(message, F("repeated_fixed64"), 1, 508);
|
|
1101
|
+
reflection->SetRepeatedInt32(message, F("repeated_sfixed32"), 1, 509);
|
|
1102
|
+
reflection->SetRepeatedInt64(message, F("repeated_sfixed64"), 1, 510);
|
|
1103
|
+
reflection->SetRepeatedFloat(message, F("repeated_float"), 1, 511);
|
|
1104
|
+
reflection->SetRepeatedDouble(message, F("repeated_double"), 1, 512);
|
|
1105
|
+
reflection->SetRepeatedBool(message, F("repeated_bool"), 1, true);
|
|
1106
|
+
reflection->SetRepeatedString(message, F("repeated_string"), 1, "515");
|
|
1107
|
+
reflection->SetRepeatedString(message, F("repeated_bytes"), 1, "516");
|
|
1108
|
+
|
|
1109
|
+
sub_message =
|
|
1110
|
+
reflection->MutableRepeatedMessage(message, F("repeatedgroup"), 1);
|
|
1111
|
+
sub_message->GetReflection()->SetInt32(sub_message, repeated_group_a_, 517);
|
|
1112
|
+
sub_message = reflection->MutableRepeatedMessage(
|
|
1113
|
+
message, F("repeated_nested_message"), 1);
|
|
1114
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 518);
|
|
1115
|
+
sub_message = reflection->MutableRepeatedMessage(
|
|
1116
|
+
message, F("repeated_foreign_message"), 1);
|
|
1117
|
+
sub_message->GetReflection()->SetInt32(sub_message, foreign_c_, 519);
|
|
1118
|
+
sub_message = reflection->MutableRepeatedMessage(
|
|
1119
|
+
message, F("repeated_import_message"), 1);
|
|
1120
|
+
sub_message->GetReflection()->SetInt32(sub_message, import_d_, 520);
|
|
1121
|
+
sub_message = reflection->MutableRepeatedMessage(
|
|
1122
|
+
message, F("repeated_lazy_message"), 1);
|
|
1123
|
+
sub_message->GetReflection()->SetInt32(sub_message, nested_b_, 527);
|
|
1124
|
+
|
|
1125
|
+
reflection->SetRepeatedEnum(message, F("repeated_nested_enum"), 1,
|
|
1126
|
+
nested_foo_);
|
|
1127
|
+
reflection->SetRepeatedEnum(message, F("repeated_foreign_enum"), 1,
|
|
1128
|
+
foreign_foo_);
|
|
1129
|
+
reflection->SetRepeatedEnum(message, F("repeated_import_enum"), 1,
|
|
1130
|
+
import_foo_);
|
|
1131
|
+
|
|
1132
|
+
reflection->SetRepeatedString(message, F("repeated_string_piece"), 1, "524");
|
|
1133
|
+
reflection->SetRepeatedString(message, F("repeated_cord"), 1, "525");
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
inline void TestUtil::ReflectionTester::RemoveLastRepeatedsViaReflection(
|
|
1137
|
+
Message* message) {
|
|
1138
|
+
const Reflection* reflection = message->GetReflection();
|
|
1139
|
+
|
|
1140
|
+
std::vector<const FieldDescriptor*> output;
|
|
1141
|
+
reflection->ListFields(*message, &output);
|
|
1142
|
+
for (const FieldDescriptor* field : output) {
|
|
1143
|
+
if (!field->is_repeated()) continue;
|
|
1144
|
+
|
|
1145
|
+
reflection->RemoveLast(message, field);
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
inline void TestUtil::ReflectionTester::ReleaseLastRepeatedsViaReflection(
|
|
1150
|
+
Message* message, bool expect_extensions_notnull) {
|
|
1151
|
+
const Reflection* reflection = message->GetReflection();
|
|
1152
|
+
|
|
1153
|
+
std::vector<const FieldDescriptor*> output;
|
|
1154
|
+
reflection->ListFields(*message, &output);
|
|
1155
|
+
for (const FieldDescriptor* field : output) {
|
|
1156
|
+
if (!field->is_repeated()) continue;
|
|
1157
|
+
if (field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE) continue;
|
|
1158
|
+
|
|
1159
|
+
Message* released = reflection->ReleaseLast(message, field);
|
|
1160
|
+
if (!field->is_extension() || expect_extensions_notnull) {
|
|
1161
|
+
ASSERT_TRUE(released != nullptr)
|
|
1162
|
+
<< "ReleaseLast returned nullptr for: " << field->name();
|
|
1163
|
+
}
|
|
1164
|
+
delete released;
|
|
1165
|
+
}
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
inline void TestUtil::ReflectionTester::SwapRepeatedsViaReflection(
|
|
1169
|
+
Message* message) {
|
|
1170
|
+
const Reflection* reflection = message->GetReflection();
|
|
1171
|
+
|
|
1172
|
+
std::vector<const FieldDescriptor*> output;
|
|
1173
|
+
reflection->ListFields(*message, &output);
|
|
1174
|
+
for (const FieldDescriptor* field : output) {
|
|
1175
|
+
if (!field->is_repeated()) continue;
|
|
1176
|
+
|
|
1177
|
+
reflection->SwapElements(message, field, 0, 1);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
|
|
1181
|
+
inline void TestUtil::ReflectionTester::
|
|
1182
|
+
SetAllocatedOptionalMessageFieldsToNullViaReflection(Message* message) {
|
|
1183
|
+
const Reflection* reflection = message->GetReflection();
|
|
1184
|
+
|
|
1185
|
+
std::vector<const FieldDescriptor*> fields;
|
|
1186
|
+
reflection->ListFields(*message, &fields);
|
|
1187
|
+
|
|
1188
|
+
for (const FieldDescriptor* field : fields) {
|
|
1189
|
+
if (field->is_required() || field->is_repeated() ||
|
|
1190
|
+
field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE)
|
|
1191
|
+
continue;
|
|
1192
|
+
|
|
1193
|
+
reflection->SetAllocatedMessage(message, nullptr, field);
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
|
|
1197
|
+
inline void TestUtil::ReflectionTester::
|
|
1198
|
+
SetAllocatedOptionalMessageFieldsToMessageViaReflection(
|
|
1199
|
+
Message* from_message, Message* to_message) {
|
|
1200
|
+
EXPECT_EQ(from_message->GetDescriptor(), to_message->GetDescriptor());
|
|
1201
|
+
const Reflection* from_reflection = from_message->GetReflection();
|
|
1202
|
+
const Reflection* to_reflection = to_message->GetReflection();
|
|
1203
|
+
|
|
1204
|
+
std::vector<const FieldDescriptor*> fields;
|
|
1205
|
+
from_reflection->ListFields(*from_message, &fields);
|
|
1206
|
+
|
|
1207
|
+
for (const FieldDescriptor* field : fields) {
|
|
1208
|
+
if (field->is_required() || field->is_repeated() ||
|
|
1209
|
+
field->cpp_type() != FieldDescriptor::CPPTYPE_MESSAGE)
|
|
1210
|
+
continue;
|
|
1211
|
+
|
|
1212
|
+
Message* sub_message = from_reflection->ReleaseMessage(from_message, field);
|
|
1213
|
+
to_reflection->SetAllocatedMessage(to_message, sub_message, field);
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
inline void TestUtil::ReflectionTester::ExpectMessagesReleasedViaReflection(
|
|
1218
|
+
Message* message,
|
|
1219
|
+
TestUtil::ReflectionTester::MessageReleaseState expected_release_state) {
|
|
1220
|
+
const Reflection* reflection = message->GetReflection();
|
|
1221
|
+
|
|
1222
|
+
static const char* fields[] = {
|
|
1223
|
+
"optionalgroup",
|
|
1224
|
+
"optional_nested_message",
|
|
1225
|
+
"optional_foreign_message",
|
|
1226
|
+
"optional_import_message",
|
|
1227
|
+
};
|
|
1228
|
+
for (const char* field : fields) {
|
|
1229
|
+
Message* released = reflection->ReleaseMessage(message, F(field));
|
|
1230
|
+
switch (expected_release_state) {
|
|
1231
|
+
case IS_NULL:
|
|
1232
|
+
EXPECT_TRUE(released == nullptr);
|
|
1233
|
+
break;
|
|
1234
|
+
case NOT_NULL:
|
|
1235
|
+
EXPECT_TRUE(released != nullptr);
|
|
1236
|
+
break;
|
|
1237
|
+
case CAN_BE_NULL:
|
|
1238
|
+
break;
|
|
1239
|
+
}
|
|
1240
|
+
delete released;
|
|
1241
|
+
EXPECT_FALSE(reflection->HasField(*message, F(field)));
|
|
1242
|
+
}
|
|
1243
|
+
}
|
|
1244
|
+
|
|
1245
|
+
// Check that the passed-in serialization is the canonical serialization we
|
|
1246
|
+
// expect for a TestFieldOrderings message filled in by
|
|
1247
|
+
// SetAllFieldsAndExtensions().
|
|
1248
|
+
inline void ExpectAllFieldsAndExtensionsInOrder(const std::string& serialized) {
|
|
1249
|
+
// We set each field individually, serialize separately, and concatenate all
|
|
1250
|
+
// the strings in canonical order to determine the expected serialization.
|
|
1251
|
+
std::string expected;
|
|
1252
|
+
unittest::TestFieldOrderings message;
|
|
1253
|
+
message.set_my_int(1); // Field 1.
|
|
1254
|
+
ABSL_CHECK(message.AppendToString(&expected));
|
|
1255
|
+
message.Clear();
|
|
1256
|
+
message.SetExtension(unittest::my_extension_int, 23); // Field 5.
|
|
1257
|
+
ABSL_CHECK(message.AppendToString(&expected));
|
|
1258
|
+
message.Clear();
|
|
1259
|
+
message.set_my_string("foo"); // Field 11.
|
|
1260
|
+
ABSL_CHECK(message.AppendToString(&expected));
|
|
1261
|
+
message.Clear();
|
|
1262
|
+
message.SetExtension(unittest::my_extension_string, "bar"); // Field 50.
|
|
1263
|
+
ABSL_CHECK(message.AppendToString(&expected));
|
|
1264
|
+
message.Clear();
|
|
1265
|
+
message.set_my_float(1.0); // Field 101.
|
|
1266
|
+
ABSL_CHECK(message.AppendToString(&expected));
|
|
1267
|
+
message.Clear();
|
|
1268
|
+
|
|
1269
|
+
// We don't EXPECT_EQ() since we don't want to print raw bytes to stdout.
|
|
1270
|
+
EXPECT_TRUE(serialized == expected);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
// Trait to gather all types and values used in the templates below for a
|
|
1274
|
+
// particular namespace.
|
|
1275
|
+
|
|
1276
|
+
template <typename T>
|
|
1277
|
+
struct TestUtilTraits;
|
|
1278
|
+
|
|
1279
|
+
// List all the extensions that are defined at namespace scope.
|
|
1280
|
+
#define PROTOBUF_TEST_UTIL_DECLARE_INPUT_EXTS_(ns, X) \
|
|
1281
|
+
X(ns, my_extension_int); \
|
|
1282
|
+
X(ns, my_extension_string); \
|
|
1283
|
+
X(ns, optional_int32_extension); \
|
|
1284
|
+
X(ns, optional_int64_extension); \
|
|
1285
|
+
X(ns, optional_uint32_extension); \
|
|
1286
|
+
X(ns, optional_uint64_extension); \
|
|
1287
|
+
X(ns, optional_sint32_extension); \
|
|
1288
|
+
X(ns, optional_sint64_extension); \
|
|
1289
|
+
X(ns, optional_fixed32_extension); \
|
|
1290
|
+
X(ns, optional_fixed64_extension); \
|
|
1291
|
+
X(ns, optional_sfixed32_extension); \
|
|
1292
|
+
X(ns, optional_sfixed64_extension); \
|
|
1293
|
+
X(ns, optional_float_extension); \
|
|
1294
|
+
X(ns, optional_double_extension); \
|
|
1295
|
+
X(ns, optional_bool_extension); \
|
|
1296
|
+
X(ns, optional_string_extension); \
|
|
1297
|
+
X(ns, optional_bytes_extension); \
|
|
1298
|
+
X(ns, optionalgroup_extension); \
|
|
1299
|
+
X(ns, optional_nested_message_extension); \
|
|
1300
|
+
X(ns, optional_foreign_message_extension); \
|
|
1301
|
+
X(ns, optional_import_message_extension); \
|
|
1302
|
+
X(ns, optional_nested_enum_extension); \
|
|
1303
|
+
X(ns, optional_foreign_enum_extension); \
|
|
1304
|
+
X(ns, optional_import_enum_extension); \
|
|
1305
|
+
X(ns, optional_string_piece_extension); \
|
|
1306
|
+
X(ns, optional_cord_extension); \
|
|
1307
|
+
X(ns, optional_bytes_cord_extension); \
|
|
1308
|
+
X(ns, optional_public_import_message_extension); \
|
|
1309
|
+
X(ns, optional_lazy_message_extension); \
|
|
1310
|
+
X(ns, optional_unverified_lazy_message_extension); \
|
|
1311
|
+
X(ns, default_bool_extension); \
|
|
1312
|
+
X(ns, default_bytes_extension); \
|
|
1313
|
+
X(ns, default_cord_extension); \
|
|
1314
|
+
X(ns, default_double_extension); \
|
|
1315
|
+
X(ns, default_fixed32_extension); \
|
|
1316
|
+
X(ns, default_fixed64_extension); \
|
|
1317
|
+
X(ns, default_float_extension); \
|
|
1318
|
+
X(ns, default_foreign_enum_extension); \
|
|
1319
|
+
X(ns, default_import_enum_extension); \
|
|
1320
|
+
X(ns, default_int32_extension); \
|
|
1321
|
+
X(ns, default_int64_extension); \
|
|
1322
|
+
X(ns, default_nested_enum_extension); \
|
|
1323
|
+
X(ns, default_sfixed32_extension); \
|
|
1324
|
+
X(ns, default_sfixed64_extension); \
|
|
1325
|
+
X(ns, default_sint32_extension); \
|
|
1326
|
+
X(ns, default_sint64_extension); \
|
|
1327
|
+
X(ns, default_string_extension); \
|
|
1328
|
+
X(ns, default_string_piece_extension); \
|
|
1329
|
+
X(ns, default_uint32_extension); \
|
|
1330
|
+
X(ns, default_uint64_extension); \
|
|
1331
|
+
X(ns, repeated_bool_extension); \
|
|
1332
|
+
X(ns, repeated_bytes_extension); \
|
|
1333
|
+
X(ns, repeated_cord_extension); \
|
|
1334
|
+
X(ns, repeated_double_extension); \
|
|
1335
|
+
X(ns, repeated_fixed32_extension); \
|
|
1336
|
+
X(ns, repeated_fixed64_extension); \
|
|
1337
|
+
X(ns, repeated_float_extension); \
|
|
1338
|
+
X(ns, repeated_foreign_enum_extension); \
|
|
1339
|
+
X(ns, repeated_foreign_message_extension); \
|
|
1340
|
+
X(ns, repeated_import_enum_extension); \
|
|
1341
|
+
X(ns, repeated_import_message_extension); \
|
|
1342
|
+
X(ns, repeated_int32_extension); \
|
|
1343
|
+
X(ns, repeated_int64_extension); \
|
|
1344
|
+
X(ns, repeated_lazy_message_extension); \
|
|
1345
|
+
X(ns, repeated_nested_enum_extension); \
|
|
1346
|
+
X(ns, repeated_nested_message_extension); \
|
|
1347
|
+
X(ns, repeated_sfixed32_extension); \
|
|
1348
|
+
X(ns, repeated_sfixed64_extension); \
|
|
1349
|
+
X(ns, repeated_sint32_extension); \
|
|
1350
|
+
X(ns, repeated_sint64_extension); \
|
|
1351
|
+
X(ns, repeated_string_extension); \
|
|
1352
|
+
X(ns, repeated_string_piece_extension); \
|
|
1353
|
+
X(ns, repeated_uint32_extension); \
|
|
1354
|
+
X(ns, repeated_uint64_extension); \
|
|
1355
|
+
X(ns, repeatedgroup_extension); \
|
|
1356
|
+
X(ns, oneof_uint32_extension); \
|
|
1357
|
+
X(ns, oneof_nested_message_extension); \
|
|
1358
|
+
X(ns, oneof_string_extension); \
|
|
1359
|
+
X(ns, oneof_bytes_extension); \
|
|
1360
|
+
X(ns, unpacked_bool_extension); \
|
|
1361
|
+
X(ns, unpacked_double_extension); \
|
|
1362
|
+
X(ns, unpacked_enum_extension); \
|
|
1363
|
+
X(ns, unpacked_fixed32_extension); \
|
|
1364
|
+
X(ns, unpacked_fixed64_extension); \
|
|
1365
|
+
X(ns, unpacked_float_extension); \
|
|
1366
|
+
X(ns, unpacked_int32_extension); \
|
|
1367
|
+
X(ns, unpacked_int64_extension); \
|
|
1368
|
+
X(ns, unpacked_sfixed32_extension); \
|
|
1369
|
+
X(ns, unpacked_sfixed64_extension); \
|
|
1370
|
+
X(ns, unpacked_sint32_extension); \
|
|
1371
|
+
X(ns, unpacked_sint64_extension); \
|
|
1372
|
+
X(ns, unpacked_uint32_extension); \
|
|
1373
|
+
X(ns, unpacked_uint64_extension); \
|
|
1374
|
+
X(ns, packed_int32_extension); \
|
|
1375
|
+
X(ns, packed_int64_extension); \
|
|
1376
|
+
X(ns, packed_uint32_extension); \
|
|
1377
|
+
X(ns, packed_uint64_extension); \
|
|
1378
|
+
X(ns, packed_sint32_extension); \
|
|
1379
|
+
X(ns, packed_sint64_extension); \
|
|
1380
|
+
X(ns, packed_fixed32_extension); \
|
|
1381
|
+
X(ns, packed_fixed64_extension); \
|
|
1382
|
+
X(ns, packed_sfixed32_extension); \
|
|
1383
|
+
X(ns, packed_sfixed64_extension); \
|
|
1384
|
+
X(ns, packed_float_extension); \
|
|
1385
|
+
X(ns, packed_double_extension); \
|
|
1386
|
+
X(ns, packed_bool_extension); \
|
|
1387
|
+
X(ns, packed_enum_extension);
|
|
1388
|
+
|
|
1389
|
+
#define PROTOBUF_TEST_UTIL_DECLARE_INPUT_EXT_VARIABLE_(ns, name) \
|
|
1390
|
+
static constexpr auto& name = ns::name
|
|
1391
|
+
|
|
1392
|
+
// Declare traits for the namespaces ns and import_ns.
|
|
1393
|
+
// It connects all namespace scoped names together.
|
|
1394
|
+
// This is needed so that functions that take some type X can find
|
|
1395
|
+
// declarations from the same namespace.
|
|
1396
|
+
#define PROTOBUF_TEST_UTIL_DECLARE_INPUT_IMPL(ns, import_ns) \
|
|
1397
|
+
template <> \
|
|
1398
|
+
struct google::protobuf::TestUtil::TestUtilTraits<::ns::TestAllExtensions> { \
|
|
1399
|
+
PROTOBUF_TEST_UTIL_DECLARE_INPUT_EXTS_( \
|
|
1400
|
+
::ns, PROTOBUF_TEST_UTIL_DECLARE_INPUT_EXT_VARIABLE_); \
|
|
1401
|
+
using TestAllTypes = ::ns::TestAllTypes; \
|
|
1402
|
+
using TestRequired = ::ns::TestRequired; \
|
|
1403
|
+
using NestedTestMessageSetContainer = ::ns::NestedTestMessageSetContainer; \
|
|
1404
|
+
using OneBytes = ::ns::OneBytes; \
|
|
1405
|
+
using OneString = ::ns::OneString; \
|
|
1406
|
+
using MoreBytes = ::ns::MoreBytes; \
|
|
1407
|
+
using MoreString = ::ns::MoreString; \
|
|
1408
|
+
using TestEmptyMessage = ::ns::TestEmptyMessage; \
|
|
1409
|
+
using TestRepeatedScalarDifferentTagSizes = \
|
|
1410
|
+
::ns::TestRepeatedScalarDifferentTagSizes; \
|
|
1411
|
+
using TestRecursiveMessage = ::ns::TestRecursiveMessage; \
|
|
1412
|
+
using Int32Message = ::ns::Int32Message; \
|
|
1413
|
+
using Uint32Message = ::ns::Uint32Message; \
|
|
1414
|
+
using Int64Message = ::ns::Int64Message; \
|
|
1415
|
+
using Uint64Message = ::ns::Uint64Message; \
|
|
1416
|
+
using BoolMessage = ::ns::BoolMessage; \
|
|
1417
|
+
using RawMessageSet = ::ns::RawMessageSet; \
|
|
1418
|
+
using TestFieldOrderings = ::ns::TestFieldOrderings; \
|
|
1419
|
+
using TestMessageSetExtension1 = ::ns::TestMessageSetExtension1; \
|
|
1420
|
+
using TestMessageSetExtension2 = ::ns::TestMessageSetExtension2; \
|
|
1421
|
+
using TestMessageSet = \
|
|
1422
|
+
decltype(TestMessageSetExtension1::message_set_extension)::Extendee; \
|
|
1423
|
+
using TestOneofBackwardsCompatible = ::ns::TestOneofBackwardsCompatible; \
|
|
1424
|
+
using TestOneof = ::ns::TestOneof; \
|
|
1425
|
+
using TestOneof2 = ::ns::TestOneof2; \
|
|
1426
|
+
using TestPackedExtensions = ::ns::TestPackedExtensions; \
|
|
1427
|
+
using TestUnpackedTypes = ::ns::TestUnpackedTypes; \
|
|
1428
|
+
using TestPackedTypes = ::ns::TestPackedTypes; \
|
|
1429
|
+
using TestAllExtensions = ::ns::TestAllExtensions; \
|
|
1430
|
+
static constexpr auto FOREIGN_FOO = ::ns::FOREIGN_FOO; \
|
|
1431
|
+
static constexpr auto FOREIGN_BAR = ::ns::FOREIGN_BAR; \
|
|
1432
|
+
static constexpr auto FOREIGN_BAZ = ::ns::FOREIGN_BAZ; \
|
|
1433
|
+
static constexpr auto IMPORT_FOO = ::import_ns::IMPORT_FOO; \
|
|
1434
|
+
static constexpr auto IMPORT_BAR = ::import_ns::IMPORT_BAR; \
|
|
1435
|
+
static constexpr auto IMPORT_BAZ = ::import_ns::IMPORT_BAZ; \
|
|
1436
|
+
}; \
|
|
1437
|
+
template <> \
|
|
1438
|
+
struct google::protobuf::TestUtil::TestUtilTraits<::ns::TestFieldOrderings> \
|
|
1439
|
+
: google::protobuf::TestUtil::TestUtilTraits<::ns::TestAllExtensions> {}; \
|
|
1440
|
+
template <> \
|
|
1441
|
+
struct google::protobuf::TestUtil::TestUtilTraits<::ns::TestAllTypes> \
|
|
1442
|
+
: google::protobuf::TestUtil::TestUtilTraits<::ns::TestAllExtensions> {}; \
|
|
1443
|
+
template <> \
|
|
1444
|
+
struct google::protobuf::TestUtil::TestUtilTraits<::ns::TestPackedExtensions> \
|
|
1445
|
+
: google::protobuf::TestUtil::TestUtilTraits<::ns::TestAllExtensions> {}; \
|
|
1446
|
+
template <> \
|
|
1447
|
+
struct google::protobuf::TestUtil::TestUtilTraits<::ns::TestUnpackedExtensions> \
|
|
1448
|
+
: google::protobuf::TestUtil::TestUtilTraits<::ns::TestAllExtensions> {}
|
|
1449
|
+
|
|
1450
|
+
#define PROTOBUF_TEST_UTIL_DECLARE_INPUT(ns_suffix) \
|
|
1451
|
+
PROTOBUF_TEST_UTIL_DECLARE_INPUT_IMPL(proto2_unittest##ns_suffix, \
|
|
1452
|
+
proto2_unittest_import##ns_suffix)
|
|
1453
|
+
|
|
1454
|
+
// Set every field in the message to a unique value.
|
|
1455
|
+
template <typename TestAllTypes>
|
|
1456
|
+
void SetAllFields(TestAllTypes* message);
|
|
1457
|
+
template <typename TestAllTypes>
|
|
1458
|
+
void SetOptionalFields(TestAllTypes* message);
|
|
1459
|
+
template <typename TestAllTypes>
|
|
1460
|
+
void AddRepeatedFields1(TestAllTypes* message);
|
|
1461
|
+
template <typename TestAllTypes>
|
|
1462
|
+
void AddRepeatedFields2(TestAllTypes* message);
|
|
1463
|
+
template <typename TestAllTypes>
|
|
1464
|
+
void SetDefaultFields(TestAllTypes* message);
|
|
1465
|
+
template <typename TestAllTypes>
|
|
1466
|
+
void SetOneofFields(TestAllTypes* message);
|
|
1467
|
+
template <typename TestPackedTypes>
|
|
1468
|
+
void SetPackedFields(TestPackedTypes* message);
|
|
1469
|
+
template <typename TestUnpackedTypes>
|
|
1470
|
+
void SetUnpackedFields(TestUnpackedTypes* message);
|
|
1471
|
+
template <typename TestOneof2>
|
|
1472
|
+
void SetOneof1(TestOneof2* message);
|
|
1473
|
+
template <typename TestOneof2>
|
|
1474
|
+
void SetOneof2(TestOneof2* message);
|
|
1475
|
+
template <typename TestAllExtensions>
|
|
1476
|
+
void SetAllExtensions(TestAllExtensions* message);
|
|
1477
|
+
template <typename TestAllExtensions>
|
|
1478
|
+
void SetOneofFieldsExtensions(TestAllExtensions* message);
|
|
1479
|
+
template <typename TestFieldOrderings>
|
|
1480
|
+
void SetAllFieldsAndExtensions(TestFieldOrderings* message);
|
|
1481
|
+
template <typename TestPackedExtensions>
|
|
1482
|
+
void SetPackedExtensions(TestPackedExtensions* message);
|
|
1483
|
+
|
|
1484
|
+
// Use the repeated versions of the set_*() accessors to modify all the
|
|
1485
|
+
// repeated fields of the message (which should already have been
|
|
1486
|
+
// initialized with Set*Fields()). Set*Fields() itself only tests
|
|
1487
|
+
// the add_*() accessors.
|
|
1488
|
+
template <typename TestAllTypes>
|
|
1489
|
+
void ModifyRepeatedFields(TestAllTypes* message);
|
|
1490
|
+
template <typename TestAllExtensions>
|
|
1491
|
+
void ModifyRepeatedExtensions(TestAllExtensions* message);
|
|
1492
|
+
|
|
1493
|
+
// Check that all fields have the values that they should have after
|
|
1494
|
+
// Set*Fields() is called.
|
|
1495
|
+
template <typename TestAllTypes>
|
|
1496
|
+
void ExpectAllFieldsSet(const TestAllTypes& message);
|
|
1497
|
+
template <typename TestPackedTypes>
|
|
1498
|
+
void ExpectPackedFieldsSet(const TestPackedTypes& message);
|
|
1499
|
+
template <typename TestUnpackedTypes>
|
|
1500
|
+
void ExpectUnpackedFieldsSet(const TestUnpackedTypes& message);
|
|
1501
|
+
template <typename TestOneof2>
|
|
1502
|
+
void ExpectOneofSet1(const TestOneof2& message);
|
|
1503
|
+
template <typename TestOneof2>
|
|
1504
|
+
void ExpectOneofSet2(const TestOneof2& message);
|
|
1505
|
+
template <typename TestPackedExtensions>
|
|
1506
|
+
void ExpectPackedExtensionsSet(const TestPackedExtensions& message);
|
|
1507
|
+
template <typename TestUnpackedExtensions>
|
|
1508
|
+
void ExpectUnpackedExtensionsSet(const TestUnpackedExtensions& message);
|
|
1509
|
+
template <typename TestPackedExtensions>
|
|
1510
|
+
void ExpectLastRepeatedExtensionsRemovedPacked(
|
|
1511
|
+
const TestPackedExtensions& message);
|
|
1512
|
+
template <typename TestAllTypes>
|
|
1513
|
+
void ExpectLastRepeatedsReleased(const TestAllTypes& message);
|
|
1514
|
+
template <typename TestAllExtensions>
|
|
1515
|
+
void ExpectLastRepeatedExtensionsReleased(const TestAllExtensions& message);
|
|
1516
|
+
|
|
1517
|
+
// Expect that the message is modified as would be expected from
|
|
1518
|
+
// Modify*Fields().
|
|
1519
|
+
template <typename TestAllTypes>
|
|
1520
|
+
void ExpectRepeatedFieldsModified(const TestAllTypes& message);
|
|
1521
|
+
template <typename TestAllExtensions>
|
|
1522
|
+
void ExpectRepeatedExtensionsModified(const TestAllExtensions& message);
|
|
1523
|
+
|
|
1524
|
+
// Check that all fields have their default values.
|
|
1525
|
+
template <typename TestAllTypes>
|
|
1526
|
+
void ExpectClear(const TestAllTypes& message);
|
|
1527
|
+
template <typename TestOneof2>
|
|
1528
|
+
void ExpectOneofClear(const TestOneof2& message);
|
|
1529
|
+
template <typename TestAllExtensions>
|
|
1530
|
+
void ExpectExtensionsClear(const TestAllExtensions& message);
|
|
1531
|
+
|
|
1532
|
+
// Check that all repeated fields have had their last elements removed.
|
|
1533
|
+
template <typename TestAllTypes>
|
|
1534
|
+
void ExpectLastRepeatedsRemoved(const TestAllTypes& message);
|
|
1535
|
+
template <typename TestAllExtensions>
|
|
1536
|
+
void ExpectLastRepeatedExtensionsRemoved(const TestAllExtensions& message);
|
|
1537
|
+
|
|
1538
|
+
// Check that all repeated fields have had their first and last elements
|
|
1539
|
+
// swapped.
|
|
1540
|
+
template <typename TestAllTypes>
|
|
1541
|
+
void ExpectRepeatedsSwapped(const TestAllTypes& message);
|
|
1542
|
+
template <typename TestAllExtensions>
|
|
1543
|
+
void ExpectRepeatedExtensionsSwapped(const TestAllExtensions& message);
|
|
1544
|
+
|
|
1545
|
+
template <typename TestOneof2>
|
|
1546
|
+
void ExpectAtMostOneFieldSetInOneof(const TestOneof2& message);
|
|
1547
|
+
|
|
1548
|
+
template <typename TestAllTypes>
|
|
1549
|
+
void SetAllFields(TestAllTypes* message) {
|
|
1550
|
+
SetOptionalFields(message);
|
|
1551
|
+
AddRepeatedFields1(message);
|
|
1552
|
+
AddRepeatedFields2(message);
|
|
1553
|
+
SetDefaultFields(message);
|
|
1554
|
+
SetOneofFields(message);
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
// Helper aliases to extract the different enum types from the message type.
|
|
1558
|
+
// Allow to find the types without using namespaces.
|
|
1559
|
+
template <typename T>
|
|
1560
|
+
auto ForeignEnumF() -> decltype(T().optional_foreign_enum());
|
|
1561
|
+
template <typename T>
|
|
1562
|
+
auto ForeignEnumF() -> decltype(T().packed_enum(0));
|
|
1563
|
+
template <typename T>
|
|
1564
|
+
auto ForeignEnumF() -> decltype(T().unpacked_enum(0));
|
|
1565
|
+
|
|
1566
|
+
template <typename T>
|
|
1567
|
+
using ForeignEnum = decltype(ForeignEnumF<T>());
|
|
1568
|
+
|
|
1569
|
+
template <typename T>
|
|
1570
|
+
using ImportEnum = decltype(T().optional_import_enum());
|
|
1571
|
+
|
|
1572
|
+
template <typename TestAllTypes>
|
|
1573
|
+
void SetOptionalFields(TestAllTypes* message) {
|
|
1574
|
+
message->set_optional_int32(101);
|
|
1575
|
+
message->set_optional_int64(102);
|
|
1576
|
+
message->set_optional_uint32(103);
|
|
1577
|
+
message->set_optional_uint64(104);
|
|
1578
|
+
message->set_optional_sint32(105);
|
|
1579
|
+
message->set_optional_sint64(106);
|
|
1580
|
+
message->set_optional_fixed32(107);
|
|
1581
|
+
message->set_optional_fixed64(108);
|
|
1582
|
+
message->set_optional_sfixed32(109);
|
|
1583
|
+
message->set_optional_sfixed64(110);
|
|
1584
|
+
message->set_optional_float(111);
|
|
1585
|
+
message->set_optional_double(112);
|
|
1586
|
+
message->set_optional_bool(true);
|
|
1587
|
+
message->set_optional_string("115");
|
|
1588
|
+
message->set_optional_bytes("116");
|
|
1589
|
+
|
|
1590
|
+
message->mutable_optionalgroup()->set_a(117);
|
|
1591
|
+
message->mutable_optional_nested_message()->set_bb(118);
|
|
1592
|
+
message->mutable_optional_foreign_message()->set_c(119);
|
|
1593
|
+
message->mutable_optional_import_message()->set_d(120);
|
|
1594
|
+
message->mutable_optional_public_import_message()->set_e(126);
|
|
1595
|
+
message->mutable_optional_lazy_message()->set_bb(127);
|
|
1596
|
+
message->mutable_optional_unverified_lazy_message()->set_bb(128);
|
|
1597
|
+
|
|
1598
|
+
message->set_optional_nested_enum(TestAllTypes::BAZ);
|
|
1599
|
+
message->set_optional_foreign_enum(ForeignEnum<TestAllTypes>::FOREIGN_BAZ);
|
|
1600
|
+
message->set_optional_import_enum(ImportEnum<TestAllTypes>::IMPORT_BAZ);
|
|
1601
|
+
|
|
1602
|
+
// StringPiece and Cord fields are only accessible via reflection in the
|
|
1603
|
+
// open source release; see comments in compiler/cpp/string_field.cc.
|
|
1604
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1605
|
+
message->GetReflection()->SetString(
|
|
1606
|
+
message,
|
|
1607
|
+
message->GetDescriptor()->FindFieldByName("optional_string_piece"),
|
|
1608
|
+
"124");
|
|
1609
|
+
message->GetReflection()->SetString(
|
|
1610
|
+
message, message->GetDescriptor()->FindFieldByName("optional_cord"),
|
|
1611
|
+
"125");
|
|
1612
|
+
#endif // !PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1613
|
+
message->set_optional_bytes_cord("optional bytes cord");
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
// -------------------------------------------------------------------
|
|
1617
|
+
|
|
1618
|
+
template <typename TestAllTypes>
|
|
1619
|
+
void AddRepeatedFields1(TestAllTypes* message) {
|
|
1620
|
+
message->add_repeated_int32(201);
|
|
1621
|
+
message->add_repeated_int64(202);
|
|
1622
|
+
message->add_repeated_uint32(203);
|
|
1623
|
+
message->add_repeated_uint64(204);
|
|
1624
|
+
message->add_repeated_sint32(205);
|
|
1625
|
+
message->add_repeated_sint64(206);
|
|
1626
|
+
message->add_repeated_fixed32(207);
|
|
1627
|
+
message->add_repeated_fixed64(208);
|
|
1628
|
+
message->add_repeated_sfixed32(209);
|
|
1629
|
+
message->add_repeated_sfixed64(210);
|
|
1630
|
+
message->add_repeated_float(211);
|
|
1631
|
+
message->add_repeated_double(212);
|
|
1632
|
+
message->add_repeated_bool(true);
|
|
1633
|
+
message->add_repeated_string("215");
|
|
1634
|
+
message->add_repeated_bytes("216");
|
|
1635
|
+
|
|
1636
|
+
message->add_repeatedgroup()->set_a(217);
|
|
1637
|
+
message->add_repeated_nested_message()->set_bb(218);
|
|
1638
|
+
message->add_repeated_foreign_message()->set_c(219);
|
|
1639
|
+
message->add_repeated_import_message()->set_d(220);
|
|
1640
|
+
message->add_repeated_lazy_message()->set_bb(227);
|
|
1641
|
+
|
|
1642
|
+
message->add_repeated_nested_enum(TestAllTypes::BAR);
|
|
1643
|
+
message->add_repeated_foreign_enum(ForeignEnum<TestAllTypes>::FOREIGN_BAR);
|
|
1644
|
+
message->add_repeated_import_enum(ImportEnum<TestAllTypes>::IMPORT_BAR);
|
|
1645
|
+
|
|
1646
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1647
|
+
message->GetReflection()->AddString(
|
|
1648
|
+
message,
|
|
1649
|
+
message->GetDescriptor()->FindFieldByName("repeated_string_piece"),
|
|
1650
|
+
"224");
|
|
1651
|
+
message->GetReflection()->AddString(
|
|
1652
|
+
message, message->GetDescriptor()->FindFieldByName("repeated_cord"),
|
|
1653
|
+
"225");
|
|
1654
|
+
#endif // !PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
template <typename TestAllTypes>
|
|
1658
|
+
void AddRepeatedFields2(TestAllTypes* message) {
|
|
1659
|
+
// Add a second one of each field.
|
|
1660
|
+
message->add_repeated_int32(301);
|
|
1661
|
+
message->add_repeated_int64(302);
|
|
1662
|
+
message->add_repeated_uint32(303);
|
|
1663
|
+
message->add_repeated_uint64(304);
|
|
1664
|
+
message->add_repeated_sint32(305);
|
|
1665
|
+
message->add_repeated_sint64(306);
|
|
1666
|
+
message->add_repeated_fixed32(307);
|
|
1667
|
+
message->add_repeated_fixed64(308);
|
|
1668
|
+
message->add_repeated_sfixed32(309);
|
|
1669
|
+
message->add_repeated_sfixed64(310);
|
|
1670
|
+
message->add_repeated_float(311);
|
|
1671
|
+
message->add_repeated_double(312);
|
|
1672
|
+
message->add_repeated_bool(false);
|
|
1673
|
+
message->add_repeated_string("315");
|
|
1674
|
+
message->add_repeated_bytes("316");
|
|
1675
|
+
|
|
1676
|
+
message->add_repeatedgroup()->set_a(317);
|
|
1677
|
+
message->add_repeated_nested_message()->set_bb(318);
|
|
1678
|
+
message->add_repeated_foreign_message()->set_c(319);
|
|
1679
|
+
message->add_repeated_import_message()->set_d(320);
|
|
1680
|
+
message->add_repeated_lazy_message()->set_bb(327);
|
|
1681
|
+
|
|
1682
|
+
message->add_repeated_nested_enum(TestAllTypes::BAZ);
|
|
1683
|
+
message->add_repeated_foreign_enum(ForeignEnum<TestAllTypes>::FOREIGN_BAZ);
|
|
1684
|
+
message->add_repeated_import_enum(ImportEnum<TestAllTypes>::IMPORT_BAZ);
|
|
1685
|
+
|
|
1686
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1687
|
+
message->GetReflection()->AddString(
|
|
1688
|
+
message,
|
|
1689
|
+
message->GetDescriptor()->FindFieldByName("repeated_string_piece"),
|
|
1690
|
+
"324");
|
|
1691
|
+
message->GetReflection()->AddString(
|
|
1692
|
+
message, message->GetDescriptor()->FindFieldByName("repeated_cord"),
|
|
1693
|
+
"325");
|
|
1694
|
+
#endif // !PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
template <typename TestAllTypes>
|
|
1698
|
+
void SetDefaultFields(TestAllTypes* message) {
|
|
1699
|
+
message->set_default_int32(401);
|
|
1700
|
+
message->set_default_int64(402);
|
|
1701
|
+
message->set_default_uint32(403);
|
|
1702
|
+
message->set_default_uint64(404);
|
|
1703
|
+
message->set_default_sint32(405);
|
|
1704
|
+
message->set_default_sint64(406);
|
|
1705
|
+
message->set_default_fixed32(407);
|
|
1706
|
+
message->set_default_fixed64(408);
|
|
1707
|
+
message->set_default_sfixed32(409);
|
|
1708
|
+
message->set_default_sfixed64(410);
|
|
1709
|
+
message->set_default_float(411);
|
|
1710
|
+
message->set_default_double(412);
|
|
1711
|
+
message->set_default_bool(false);
|
|
1712
|
+
message->set_default_string("415");
|
|
1713
|
+
message->set_default_bytes("416");
|
|
1714
|
+
|
|
1715
|
+
message->set_default_nested_enum(TestAllTypes::FOO);
|
|
1716
|
+
message->set_default_foreign_enum(ForeignEnum<TestAllTypes>::FOREIGN_FOO);
|
|
1717
|
+
message->set_default_import_enum(ImportEnum<TestAllTypes>::IMPORT_FOO);
|
|
1718
|
+
|
|
1719
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1720
|
+
message->GetReflection()->SetString(
|
|
1721
|
+
message,
|
|
1722
|
+
message->GetDescriptor()->FindFieldByName("default_string_piece"), "424");
|
|
1723
|
+
message->GetReflection()->SetString(
|
|
1724
|
+
message, message->GetDescriptor()->FindFieldByName("default_cord"),
|
|
1725
|
+
"425");
|
|
1726
|
+
#endif // !PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1729
|
+
template <typename TestAllTypes>
|
|
1730
|
+
void ModifyRepeatedFields(TestAllTypes* message) {
|
|
1731
|
+
message->set_repeated_int32(1, 501);
|
|
1732
|
+
message->set_repeated_int64(1, 502);
|
|
1733
|
+
message->set_repeated_uint32(1, 503);
|
|
1734
|
+
message->set_repeated_uint64(1, 504);
|
|
1735
|
+
message->set_repeated_sint32(1, 505);
|
|
1736
|
+
message->set_repeated_sint64(1, 506);
|
|
1737
|
+
message->set_repeated_fixed32(1, 507);
|
|
1738
|
+
message->set_repeated_fixed64(1, 508);
|
|
1739
|
+
message->set_repeated_sfixed32(1, 509);
|
|
1740
|
+
message->set_repeated_sfixed64(1, 510);
|
|
1741
|
+
message->set_repeated_float(1, 511);
|
|
1742
|
+
message->set_repeated_double(1, 512);
|
|
1743
|
+
message->set_repeated_bool(1, true);
|
|
1744
|
+
message->set_repeated_string(1, "515");
|
|
1745
|
+
message->set_repeated_bytes(1, "516");
|
|
1746
|
+
|
|
1747
|
+
message->mutable_repeatedgroup(1)->set_a(517);
|
|
1748
|
+
message->mutable_repeated_nested_message(1)->set_bb(518);
|
|
1749
|
+
message->mutable_repeated_foreign_message(1)->set_c(519);
|
|
1750
|
+
message->mutable_repeated_import_message(1)->set_d(520);
|
|
1751
|
+
message->mutable_repeated_lazy_message(1)->set_bb(527);
|
|
1752
|
+
|
|
1753
|
+
message->set_repeated_nested_enum(1, TestAllTypes::FOO);
|
|
1754
|
+
message->set_repeated_foreign_enum(1, ForeignEnum<TestAllTypes>::FOREIGN_FOO);
|
|
1755
|
+
message->set_repeated_import_enum(1, ImportEnum<TestAllTypes>::IMPORT_FOO);
|
|
1756
|
+
|
|
1757
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1758
|
+
message->GetReflection()->SetRepeatedString(
|
|
1759
|
+
message,
|
|
1760
|
+
message->GetDescriptor()->FindFieldByName("repeated_string_piece"), 1,
|
|
1761
|
+
"524");
|
|
1762
|
+
message->GetReflection()->SetRepeatedString(
|
|
1763
|
+
message, message->GetDescriptor()->FindFieldByName("repeated_cord"), 1,
|
|
1764
|
+
"525");
|
|
1765
|
+
#endif // !PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
template <typename TestAllTypes>
|
|
1769
|
+
void SetOneofFields(TestAllTypes* message) {
|
|
1770
|
+
message->set_oneof_uint32(601);
|
|
1771
|
+
message->mutable_oneof_nested_message()->set_bb(602);
|
|
1772
|
+
message->mutable_oneof_lazy_nested_message()->set_bb(605);
|
|
1773
|
+
message->set_oneof_string("603");
|
|
1774
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1775
|
+
message->GetReflection()->SetString(
|
|
1776
|
+
message, message->GetDescriptor()->FindFieldByName("oneof_cord"), "606");
|
|
1777
|
+
message->GetReflection()->SetString(
|
|
1778
|
+
message, message->GetDescriptor()->FindFieldByName("oneof_string_piece"),
|
|
1779
|
+
"607");
|
|
1780
|
+
#endif // !PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1781
|
+
// Must be last because tests are expecting it.
|
|
1782
|
+
message->set_oneof_bytes("604");
|
|
1783
|
+
}
|
|
1784
|
+
|
|
1785
|
+
template <typename TestAllTypes>
|
|
1786
|
+
void ExpectAllFieldsSet(const TestAllTypes& message) {
|
|
1787
|
+
EXPECT_TRUE(message.has_optional_int32());
|
|
1788
|
+
EXPECT_TRUE(message.has_optional_int64());
|
|
1789
|
+
EXPECT_TRUE(message.has_optional_uint32());
|
|
1790
|
+
EXPECT_TRUE(message.has_optional_uint64());
|
|
1791
|
+
EXPECT_TRUE(message.has_optional_sint32());
|
|
1792
|
+
EXPECT_TRUE(message.has_optional_sint64());
|
|
1793
|
+
EXPECT_TRUE(message.has_optional_fixed32());
|
|
1794
|
+
EXPECT_TRUE(message.has_optional_fixed64());
|
|
1795
|
+
EXPECT_TRUE(message.has_optional_sfixed32());
|
|
1796
|
+
EXPECT_TRUE(message.has_optional_sfixed64());
|
|
1797
|
+
EXPECT_TRUE(message.has_optional_float());
|
|
1798
|
+
EXPECT_TRUE(message.has_optional_double());
|
|
1799
|
+
EXPECT_TRUE(message.has_optional_bool());
|
|
1800
|
+
EXPECT_TRUE(message.has_optional_string());
|
|
1801
|
+
EXPECT_TRUE(message.has_optional_bytes());
|
|
1802
|
+
|
|
1803
|
+
EXPECT_TRUE(message.has_optionalgroup());
|
|
1804
|
+
EXPECT_TRUE(message.has_optional_nested_message());
|
|
1805
|
+
EXPECT_TRUE(message.has_optional_foreign_message());
|
|
1806
|
+
EXPECT_TRUE(message.has_optional_import_message());
|
|
1807
|
+
EXPECT_TRUE(message.has_optional_public_import_message());
|
|
1808
|
+
EXPECT_TRUE(message.has_optional_lazy_message());
|
|
1809
|
+
EXPECT_TRUE(message.has_optional_unverified_lazy_message());
|
|
1810
|
+
|
|
1811
|
+
EXPECT_TRUE(message.optionalgroup().has_a());
|
|
1812
|
+
EXPECT_TRUE(message.optional_nested_message().has_bb());
|
|
1813
|
+
EXPECT_TRUE(message.optional_foreign_message().has_c());
|
|
1814
|
+
EXPECT_TRUE(message.optional_import_message().has_d());
|
|
1815
|
+
EXPECT_TRUE(message.optional_public_import_message().has_e());
|
|
1816
|
+
EXPECT_TRUE(message.optional_lazy_message().has_bb());
|
|
1817
|
+
EXPECT_TRUE(message.optional_unverified_lazy_message().has_bb());
|
|
1818
|
+
|
|
1819
|
+
EXPECT_TRUE(message.has_optional_nested_enum());
|
|
1820
|
+
EXPECT_TRUE(message.has_optional_foreign_enum());
|
|
1821
|
+
EXPECT_TRUE(message.has_optional_import_enum());
|
|
1822
|
+
|
|
1823
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1824
|
+
EXPECT_TRUE(message.has_optional_string_piece());
|
|
1825
|
+
EXPECT_TRUE(message.has_optional_cord());
|
|
1826
|
+
#endif
|
|
1827
|
+
EXPECT_TRUE(message.has_optional_bytes_cord());
|
|
1828
|
+
|
|
1829
|
+
EXPECT_EQ(101, message.optional_int32());
|
|
1830
|
+
EXPECT_EQ(102, message.optional_int64());
|
|
1831
|
+
EXPECT_EQ(103, message.optional_uint32());
|
|
1832
|
+
EXPECT_EQ(104, message.optional_uint64());
|
|
1833
|
+
EXPECT_EQ(105, message.optional_sint32());
|
|
1834
|
+
EXPECT_EQ(106, message.optional_sint64());
|
|
1835
|
+
EXPECT_EQ(107, message.optional_fixed32());
|
|
1836
|
+
EXPECT_EQ(108, message.optional_fixed64());
|
|
1837
|
+
EXPECT_EQ(109, message.optional_sfixed32());
|
|
1838
|
+
EXPECT_EQ(110, message.optional_sfixed64());
|
|
1839
|
+
EXPECT_EQ(111, message.optional_float());
|
|
1840
|
+
EXPECT_EQ(112, message.optional_double());
|
|
1841
|
+
EXPECT_TRUE(message.optional_bool());
|
|
1842
|
+
EXPECT_EQ("115", message.optional_string());
|
|
1843
|
+
EXPECT_EQ("116", message.optional_bytes());
|
|
1844
|
+
|
|
1845
|
+
EXPECT_EQ(117, message.optionalgroup().a());
|
|
1846
|
+
EXPECT_EQ(118, message.optional_nested_message().bb());
|
|
1847
|
+
EXPECT_EQ(119, message.optional_foreign_message().c());
|
|
1848
|
+
EXPECT_EQ(120, message.optional_import_message().d());
|
|
1849
|
+
EXPECT_EQ(126, message.optional_public_import_message().e());
|
|
1850
|
+
EXPECT_EQ(127, message.optional_lazy_message().bb());
|
|
1851
|
+
EXPECT_EQ(128, message.optional_unverified_lazy_message().bb());
|
|
1852
|
+
|
|
1853
|
+
EXPECT_EQ(TestAllTypes::BAZ, message.optional_nested_enum());
|
|
1854
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_BAZ,
|
|
1855
|
+
message.optional_foreign_enum());
|
|
1856
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_BAZ,
|
|
1857
|
+
message.optional_import_enum());
|
|
1858
|
+
|
|
1859
|
+
EXPECT_EQ("optional bytes cord", message.optional_bytes_cord());
|
|
1860
|
+
|
|
1861
|
+
// -----------------------------------------------------------------
|
|
1862
|
+
|
|
1863
|
+
ASSERT_EQ(2, message.repeated_int32_size());
|
|
1864
|
+
ASSERT_EQ(2, message.repeated_int64_size());
|
|
1865
|
+
ASSERT_EQ(2, message.repeated_uint32_size());
|
|
1866
|
+
ASSERT_EQ(2, message.repeated_uint64_size());
|
|
1867
|
+
ASSERT_EQ(2, message.repeated_sint32_size());
|
|
1868
|
+
ASSERT_EQ(2, message.repeated_sint64_size());
|
|
1869
|
+
ASSERT_EQ(2, message.repeated_fixed32_size());
|
|
1870
|
+
ASSERT_EQ(2, message.repeated_fixed64_size());
|
|
1871
|
+
ASSERT_EQ(2, message.repeated_sfixed32_size());
|
|
1872
|
+
ASSERT_EQ(2, message.repeated_sfixed64_size());
|
|
1873
|
+
ASSERT_EQ(2, message.repeated_float_size());
|
|
1874
|
+
ASSERT_EQ(2, message.repeated_double_size());
|
|
1875
|
+
ASSERT_EQ(2, message.repeated_bool_size());
|
|
1876
|
+
ASSERT_EQ(2, message.repeated_string_size());
|
|
1877
|
+
ASSERT_EQ(2, message.repeated_bytes_size());
|
|
1878
|
+
|
|
1879
|
+
ASSERT_EQ(2, message.repeatedgroup_size());
|
|
1880
|
+
ASSERT_EQ(2, message.repeated_nested_message_size());
|
|
1881
|
+
ASSERT_EQ(2, message.repeated_foreign_message_size());
|
|
1882
|
+
ASSERT_EQ(2, message.repeated_import_message_size());
|
|
1883
|
+
ASSERT_EQ(2, message.repeated_lazy_message_size());
|
|
1884
|
+
ASSERT_EQ(2, message.repeated_nested_enum_size());
|
|
1885
|
+
ASSERT_EQ(2, message.repeated_foreign_enum_size());
|
|
1886
|
+
ASSERT_EQ(2, message.repeated_import_enum_size());
|
|
1887
|
+
|
|
1888
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
1889
|
+
ASSERT_EQ(2, message.repeated_string_piece_size());
|
|
1890
|
+
ASSERT_EQ(2, message.repeated_cord_size());
|
|
1891
|
+
#endif
|
|
1892
|
+
|
|
1893
|
+
EXPECT_EQ(201, message.repeated_int32(0));
|
|
1894
|
+
EXPECT_EQ(202, message.repeated_int64(0));
|
|
1895
|
+
EXPECT_EQ(203, message.repeated_uint32(0));
|
|
1896
|
+
EXPECT_EQ(204, message.repeated_uint64(0));
|
|
1897
|
+
EXPECT_EQ(205, message.repeated_sint32(0));
|
|
1898
|
+
EXPECT_EQ(206, message.repeated_sint64(0));
|
|
1899
|
+
EXPECT_EQ(207, message.repeated_fixed32(0));
|
|
1900
|
+
EXPECT_EQ(208, message.repeated_fixed64(0));
|
|
1901
|
+
EXPECT_EQ(209, message.repeated_sfixed32(0));
|
|
1902
|
+
EXPECT_EQ(210, message.repeated_sfixed64(0));
|
|
1903
|
+
EXPECT_EQ(211, message.repeated_float(0));
|
|
1904
|
+
EXPECT_EQ(212, message.repeated_double(0));
|
|
1905
|
+
EXPECT_TRUE(message.repeated_bool(0));
|
|
1906
|
+
EXPECT_EQ("215", message.repeated_string(0));
|
|
1907
|
+
EXPECT_EQ("216", message.repeated_bytes(0));
|
|
1908
|
+
|
|
1909
|
+
EXPECT_EQ(217, message.repeatedgroup(0).a());
|
|
1910
|
+
EXPECT_EQ(218, message.repeated_nested_message(0).bb());
|
|
1911
|
+
EXPECT_EQ(219, message.repeated_foreign_message(0).c());
|
|
1912
|
+
EXPECT_EQ(220, message.repeated_import_message(0).d());
|
|
1913
|
+
EXPECT_EQ(227, message.repeated_lazy_message(0).bb());
|
|
1914
|
+
|
|
1915
|
+
|
|
1916
|
+
EXPECT_EQ(TestAllTypes::BAR, message.repeated_nested_enum(0));
|
|
1917
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_BAR,
|
|
1918
|
+
message.repeated_foreign_enum(0));
|
|
1919
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_BAR,
|
|
1920
|
+
message.repeated_import_enum(0));
|
|
1921
|
+
|
|
1922
|
+
EXPECT_EQ(301, message.repeated_int32(1));
|
|
1923
|
+
EXPECT_EQ(302, message.repeated_int64(1));
|
|
1924
|
+
EXPECT_EQ(303, message.repeated_uint32(1));
|
|
1925
|
+
EXPECT_EQ(304, message.repeated_uint64(1));
|
|
1926
|
+
EXPECT_EQ(305, message.repeated_sint32(1));
|
|
1927
|
+
EXPECT_EQ(306, message.repeated_sint64(1));
|
|
1928
|
+
EXPECT_EQ(307, message.repeated_fixed32(1));
|
|
1929
|
+
EXPECT_EQ(308, message.repeated_fixed64(1));
|
|
1930
|
+
EXPECT_EQ(309, message.repeated_sfixed32(1));
|
|
1931
|
+
EXPECT_EQ(310, message.repeated_sfixed64(1));
|
|
1932
|
+
EXPECT_EQ(311, message.repeated_float(1));
|
|
1933
|
+
EXPECT_EQ(312, message.repeated_double(1));
|
|
1934
|
+
EXPECT_FALSE(message.repeated_bool(1));
|
|
1935
|
+
EXPECT_EQ("315", message.repeated_string(1));
|
|
1936
|
+
EXPECT_EQ("316", message.repeated_bytes(1));
|
|
1937
|
+
|
|
1938
|
+
EXPECT_EQ(317, message.repeatedgroup(1).a());
|
|
1939
|
+
EXPECT_EQ(318, message.repeated_nested_message(1).bb());
|
|
1940
|
+
EXPECT_EQ(319, message.repeated_foreign_message(1).c());
|
|
1941
|
+
EXPECT_EQ(320, message.repeated_import_message(1).d());
|
|
1942
|
+
EXPECT_EQ(327, message.repeated_lazy_message(1).bb());
|
|
1943
|
+
|
|
1944
|
+
EXPECT_EQ(TestAllTypes::BAZ, message.repeated_nested_enum(1));
|
|
1945
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_BAZ,
|
|
1946
|
+
message.repeated_foreign_enum(1));
|
|
1947
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_BAZ,
|
|
1948
|
+
message.repeated_import_enum(1));
|
|
1949
|
+
|
|
1950
|
+
|
|
1951
|
+
// -----------------------------------------------------------------
|
|
1952
|
+
|
|
1953
|
+
EXPECT_TRUE(message.has_default_int32());
|
|
1954
|
+
EXPECT_TRUE(message.has_default_int64());
|
|
1955
|
+
EXPECT_TRUE(message.has_default_uint32());
|
|
1956
|
+
EXPECT_TRUE(message.has_default_uint64());
|
|
1957
|
+
EXPECT_TRUE(message.has_default_sint32());
|
|
1958
|
+
EXPECT_TRUE(message.has_default_sint64());
|
|
1959
|
+
EXPECT_TRUE(message.has_default_fixed32());
|
|
1960
|
+
EXPECT_TRUE(message.has_default_fixed64());
|
|
1961
|
+
EXPECT_TRUE(message.has_default_sfixed32());
|
|
1962
|
+
EXPECT_TRUE(message.has_default_sfixed64());
|
|
1963
|
+
EXPECT_TRUE(message.has_default_float());
|
|
1964
|
+
EXPECT_TRUE(message.has_default_double());
|
|
1965
|
+
EXPECT_TRUE(message.has_default_bool());
|
|
1966
|
+
EXPECT_TRUE(message.has_default_string());
|
|
1967
|
+
EXPECT_TRUE(message.has_default_bytes());
|
|
1968
|
+
|
|
1969
|
+
EXPECT_TRUE(message.has_default_nested_enum());
|
|
1970
|
+
EXPECT_TRUE(message.has_default_foreign_enum());
|
|
1971
|
+
EXPECT_TRUE(message.has_default_import_enum());
|
|
1972
|
+
|
|
1973
|
+
|
|
1974
|
+
EXPECT_EQ(401, message.default_int32());
|
|
1975
|
+
EXPECT_EQ(402, message.default_int64());
|
|
1976
|
+
EXPECT_EQ(403, message.default_uint32());
|
|
1977
|
+
EXPECT_EQ(404, message.default_uint64());
|
|
1978
|
+
EXPECT_EQ(405, message.default_sint32());
|
|
1979
|
+
EXPECT_EQ(406, message.default_sint64());
|
|
1980
|
+
EXPECT_EQ(407, message.default_fixed32());
|
|
1981
|
+
EXPECT_EQ(408, message.default_fixed64());
|
|
1982
|
+
EXPECT_EQ(409, message.default_sfixed32());
|
|
1983
|
+
EXPECT_EQ(410, message.default_sfixed64());
|
|
1984
|
+
EXPECT_EQ(411, message.default_float());
|
|
1985
|
+
EXPECT_EQ(412, message.default_double());
|
|
1986
|
+
EXPECT_FALSE(message.default_bool());
|
|
1987
|
+
EXPECT_EQ("415", message.default_string());
|
|
1988
|
+
EXPECT_EQ("416", message.default_bytes());
|
|
1989
|
+
|
|
1990
|
+
EXPECT_EQ(TestAllTypes::FOO, message.default_nested_enum());
|
|
1991
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_FOO,
|
|
1992
|
+
message.default_foreign_enum());
|
|
1993
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_FOO,
|
|
1994
|
+
message.default_import_enum());
|
|
1995
|
+
|
|
1996
|
+
|
|
1997
|
+
EXPECT_FALSE(message.has_oneof_uint32());
|
|
1998
|
+
EXPECT_FALSE(message.has_oneof_nested_message());
|
|
1999
|
+
EXPECT_FALSE(message.has_oneof_string());
|
|
2000
|
+
EXPECT_TRUE(message.has_oneof_bytes());
|
|
2001
|
+
|
|
2002
|
+
EXPECT_EQ("604", message.oneof_bytes());
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
template <typename TestAllTypes>
|
|
2006
|
+
void ExpectClear(const TestAllTypes& message) {
|
|
2007
|
+
// has_blah() should initially be false for all optional fields.
|
|
2008
|
+
EXPECT_FALSE(message.has_optional_int32());
|
|
2009
|
+
EXPECT_FALSE(message.has_optional_int64());
|
|
2010
|
+
EXPECT_FALSE(message.has_optional_uint32());
|
|
2011
|
+
EXPECT_FALSE(message.has_optional_uint64());
|
|
2012
|
+
EXPECT_FALSE(message.has_optional_sint32());
|
|
2013
|
+
EXPECT_FALSE(message.has_optional_sint64());
|
|
2014
|
+
EXPECT_FALSE(message.has_optional_fixed32());
|
|
2015
|
+
EXPECT_FALSE(message.has_optional_fixed64());
|
|
2016
|
+
EXPECT_FALSE(message.has_optional_sfixed32());
|
|
2017
|
+
EXPECT_FALSE(message.has_optional_sfixed64());
|
|
2018
|
+
EXPECT_FALSE(message.has_optional_float());
|
|
2019
|
+
EXPECT_FALSE(message.has_optional_double());
|
|
2020
|
+
EXPECT_FALSE(message.has_optional_bool());
|
|
2021
|
+
EXPECT_FALSE(message.has_optional_string());
|
|
2022
|
+
EXPECT_FALSE(message.has_optional_bytes());
|
|
2023
|
+
|
|
2024
|
+
EXPECT_FALSE(message.has_optionalgroup());
|
|
2025
|
+
EXPECT_FALSE(message.has_optional_nested_message());
|
|
2026
|
+
EXPECT_FALSE(message.has_optional_foreign_message());
|
|
2027
|
+
EXPECT_FALSE(message.has_optional_import_message());
|
|
2028
|
+
EXPECT_FALSE(message.has_optional_public_import_message());
|
|
2029
|
+
EXPECT_FALSE(message.has_optional_lazy_message());
|
|
2030
|
+
EXPECT_FALSE(message.has_optional_unverified_lazy_message());
|
|
2031
|
+
|
|
2032
|
+
EXPECT_FALSE(message.has_optional_nested_enum());
|
|
2033
|
+
EXPECT_FALSE(message.has_optional_foreign_enum());
|
|
2034
|
+
EXPECT_FALSE(message.has_optional_import_enum());
|
|
2035
|
+
|
|
2036
|
+
EXPECT_FALSE(message.has_optional_string_piece());
|
|
2037
|
+
EXPECT_FALSE(message.has_optional_cord());
|
|
2038
|
+
EXPECT_FALSE(message.has_optional_bytes_cord());
|
|
2039
|
+
|
|
2040
|
+
// Optional fields without defaults are set to zero or something like it.
|
|
2041
|
+
EXPECT_EQ(0, message.optional_int32());
|
|
2042
|
+
EXPECT_EQ(0, message.optional_int64());
|
|
2043
|
+
EXPECT_EQ(0, message.optional_uint32());
|
|
2044
|
+
EXPECT_EQ(0, message.optional_uint64());
|
|
2045
|
+
EXPECT_EQ(0, message.optional_sint32());
|
|
2046
|
+
EXPECT_EQ(0, message.optional_sint64());
|
|
2047
|
+
EXPECT_EQ(0, message.optional_fixed32());
|
|
2048
|
+
EXPECT_EQ(0, message.optional_fixed64());
|
|
2049
|
+
EXPECT_EQ(0, message.optional_sfixed32());
|
|
2050
|
+
EXPECT_EQ(0, message.optional_sfixed64());
|
|
2051
|
+
EXPECT_EQ(0, message.optional_float());
|
|
2052
|
+
EXPECT_EQ(0, message.optional_double());
|
|
2053
|
+
EXPECT_FALSE(message.optional_bool());
|
|
2054
|
+
EXPECT_EQ("", message.optional_string());
|
|
2055
|
+
EXPECT_EQ("", message.optional_bytes());
|
|
2056
|
+
|
|
2057
|
+
// Embedded messages should also be clear.
|
|
2058
|
+
EXPECT_FALSE(message.optionalgroup().has_a());
|
|
2059
|
+
EXPECT_FALSE(message.optional_nested_message().has_bb());
|
|
2060
|
+
EXPECT_FALSE(message.optional_foreign_message().has_c());
|
|
2061
|
+
EXPECT_FALSE(message.optional_import_message().has_d());
|
|
2062
|
+
EXPECT_FALSE(message.optional_public_import_message().has_e());
|
|
2063
|
+
EXPECT_FALSE(message.optional_lazy_message().has_bb());
|
|
2064
|
+
EXPECT_FALSE(message.optional_unverified_lazy_message().has_bb());
|
|
2065
|
+
|
|
2066
|
+
EXPECT_EQ(0, message.optionalgroup().a());
|
|
2067
|
+
EXPECT_EQ(0, message.optional_nested_message().bb());
|
|
2068
|
+
EXPECT_EQ(0, message.optional_foreign_message().c());
|
|
2069
|
+
EXPECT_EQ(0, message.optional_import_message().d());
|
|
2070
|
+
EXPECT_EQ(0, message.optional_public_import_message().e());
|
|
2071
|
+
EXPECT_EQ(0, message.optional_lazy_message().bb());
|
|
2072
|
+
EXPECT_EQ(0, message.optional_unverified_lazy_message().bb());
|
|
2073
|
+
|
|
2074
|
+
// Enums without defaults are set to the first value in the enum.
|
|
2075
|
+
EXPECT_EQ(TestAllTypes::FOO, message.optional_nested_enum());
|
|
2076
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_FOO,
|
|
2077
|
+
message.optional_foreign_enum());
|
|
2078
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_FOO,
|
|
2079
|
+
message.optional_import_enum());
|
|
2080
|
+
|
|
2081
|
+
EXPECT_EQ("", message.optional_bytes_cord());
|
|
2082
|
+
|
|
2083
|
+
// Repeated fields are empty.
|
|
2084
|
+
EXPECT_EQ(0, message.repeated_int32_size());
|
|
2085
|
+
EXPECT_EQ(0, message.repeated_int64_size());
|
|
2086
|
+
EXPECT_EQ(0, message.repeated_uint32_size());
|
|
2087
|
+
EXPECT_EQ(0, message.repeated_uint64_size());
|
|
2088
|
+
EXPECT_EQ(0, message.repeated_sint32_size());
|
|
2089
|
+
EXPECT_EQ(0, message.repeated_sint64_size());
|
|
2090
|
+
EXPECT_EQ(0, message.repeated_fixed32_size());
|
|
2091
|
+
EXPECT_EQ(0, message.repeated_fixed64_size());
|
|
2092
|
+
EXPECT_EQ(0, message.repeated_sfixed32_size());
|
|
2093
|
+
EXPECT_EQ(0, message.repeated_sfixed64_size());
|
|
2094
|
+
EXPECT_EQ(0, message.repeated_float_size());
|
|
2095
|
+
EXPECT_EQ(0, message.repeated_double_size());
|
|
2096
|
+
EXPECT_EQ(0, message.repeated_bool_size());
|
|
2097
|
+
EXPECT_EQ(0, message.repeated_string_size());
|
|
2098
|
+
EXPECT_EQ(0, message.repeated_bytes_size());
|
|
2099
|
+
|
|
2100
|
+
EXPECT_EQ(0, message.repeatedgroup_size());
|
|
2101
|
+
EXPECT_EQ(0, message.repeated_nested_message_size());
|
|
2102
|
+
EXPECT_EQ(0, message.repeated_foreign_message_size());
|
|
2103
|
+
EXPECT_EQ(0, message.repeated_import_message_size());
|
|
2104
|
+
EXPECT_EQ(0, message.repeated_lazy_message_size());
|
|
2105
|
+
EXPECT_EQ(0, message.repeated_nested_enum_size());
|
|
2106
|
+
EXPECT_EQ(0, message.repeated_foreign_enum_size());
|
|
2107
|
+
EXPECT_EQ(0, message.repeated_import_enum_size());
|
|
2108
|
+
|
|
2109
|
+
EXPECT_EQ(0, message.repeated_string_piece_size());
|
|
2110
|
+
EXPECT_EQ(0, message.repeated_cord_size());
|
|
2111
|
+
|
|
2112
|
+
// has_blah() should also be false for all default fields.
|
|
2113
|
+
EXPECT_FALSE(message.has_default_int32());
|
|
2114
|
+
EXPECT_FALSE(message.has_default_int64());
|
|
2115
|
+
EXPECT_FALSE(message.has_default_uint32());
|
|
2116
|
+
EXPECT_FALSE(message.has_default_uint64());
|
|
2117
|
+
EXPECT_FALSE(message.has_default_sint32());
|
|
2118
|
+
EXPECT_FALSE(message.has_default_sint64());
|
|
2119
|
+
EXPECT_FALSE(message.has_default_fixed32());
|
|
2120
|
+
EXPECT_FALSE(message.has_default_fixed64());
|
|
2121
|
+
EXPECT_FALSE(message.has_default_sfixed32());
|
|
2122
|
+
EXPECT_FALSE(message.has_default_sfixed64());
|
|
2123
|
+
EXPECT_FALSE(message.has_default_float());
|
|
2124
|
+
EXPECT_FALSE(message.has_default_double());
|
|
2125
|
+
EXPECT_FALSE(message.has_default_bool());
|
|
2126
|
+
EXPECT_FALSE(message.has_default_string());
|
|
2127
|
+
EXPECT_FALSE(message.has_default_bytes());
|
|
2128
|
+
|
|
2129
|
+
EXPECT_FALSE(message.has_default_nested_enum());
|
|
2130
|
+
EXPECT_FALSE(message.has_default_foreign_enum());
|
|
2131
|
+
EXPECT_FALSE(message.has_default_import_enum());
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
// Fields with defaults have their default values (duh).
|
|
2135
|
+
EXPECT_EQ(41, message.default_int32());
|
|
2136
|
+
EXPECT_EQ(42, message.default_int64());
|
|
2137
|
+
EXPECT_EQ(43, message.default_uint32());
|
|
2138
|
+
EXPECT_EQ(44, message.default_uint64());
|
|
2139
|
+
EXPECT_EQ(-45, message.default_sint32());
|
|
2140
|
+
EXPECT_EQ(46, message.default_sint64());
|
|
2141
|
+
EXPECT_EQ(47, message.default_fixed32());
|
|
2142
|
+
EXPECT_EQ(48, message.default_fixed64());
|
|
2143
|
+
EXPECT_EQ(49, message.default_sfixed32());
|
|
2144
|
+
EXPECT_EQ(-50, message.default_sfixed64());
|
|
2145
|
+
EXPECT_EQ(51.5, message.default_float());
|
|
2146
|
+
EXPECT_EQ(52e3, message.default_double());
|
|
2147
|
+
EXPECT_TRUE(message.default_bool());
|
|
2148
|
+
EXPECT_EQ("hello", message.default_string());
|
|
2149
|
+
EXPECT_EQ("world", message.default_bytes());
|
|
2150
|
+
|
|
2151
|
+
EXPECT_EQ(TestAllTypes::BAR, message.default_nested_enum());
|
|
2152
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_BAR,
|
|
2153
|
+
message.default_foreign_enum());
|
|
2154
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_BAR,
|
|
2155
|
+
message.default_import_enum());
|
|
2156
|
+
|
|
2157
|
+
|
|
2158
|
+
EXPECT_FALSE(message.has_oneof_uint32());
|
|
2159
|
+
EXPECT_FALSE(message.has_oneof_nested_message());
|
|
2160
|
+
EXPECT_FALSE(message.has_oneof_string());
|
|
2161
|
+
EXPECT_FALSE(message.has_oneof_bytes());
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
template <typename TestAllTypes>
|
|
2165
|
+
void ExpectRepeatedFieldsModified(const TestAllTypes& message) {
|
|
2166
|
+
// ModifyRepeatedFields only sets the second repeated element of each
|
|
2167
|
+
// field. In addition to verifying this, we also verify that the first
|
|
2168
|
+
// element and size were *not* modified.
|
|
2169
|
+
ASSERT_EQ(2, message.repeated_int32_size());
|
|
2170
|
+
ASSERT_EQ(2, message.repeated_int64_size());
|
|
2171
|
+
ASSERT_EQ(2, message.repeated_uint32_size());
|
|
2172
|
+
ASSERT_EQ(2, message.repeated_uint64_size());
|
|
2173
|
+
ASSERT_EQ(2, message.repeated_sint32_size());
|
|
2174
|
+
ASSERT_EQ(2, message.repeated_sint64_size());
|
|
2175
|
+
ASSERT_EQ(2, message.repeated_fixed32_size());
|
|
2176
|
+
ASSERT_EQ(2, message.repeated_fixed64_size());
|
|
2177
|
+
ASSERT_EQ(2, message.repeated_sfixed32_size());
|
|
2178
|
+
ASSERT_EQ(2, message.repeated_sfixed64_size());
|
|
2179
|
+
ASSERT_EQ(2, message.repeated_float_size());
|
|
2180
|
+
ASSERT_EQ(2, message.repeated_double_size());
|
|
2181
|
+
ASSERT_EQ(2, message.repeated_bool_size());
|
|
2182
|
+
ASSERT_EQ(2, message.repeated_string_size());
|
|
2183
|
+
ASSERT_EQ(2, message.repeated_bytes_size());
|
|
2184
|
+
|
|
2185
|
+
ASSERT_EQ(2, message.repeatedgroup_size());
|
|
2186
|
+
ASSERT_EQ(2, message.repeated_nested_message_size());
|
|
2187
|
+
ASSERT_EQ(2, message.repeated_foreign_message_size());
|
|
2188
|
+
ASSERT_EQ(2, message.repeated_import_message_size());
|
|
2189
|
+
ASSERT_EQ(2, message.repeated_lazy_message_size());
|
|
2190
|
+
ASSERT_EQ(2, message.repeated_nested_enum_size());
|
|
2191
|
+
ASSERT_EQ(2, message.repeated_foreign_enum_size());
|
|
2192
|
+
ASSERT_EQ(2, message.repeated_import_enum_size());
|
|
2193
|
+
|
|
2194
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
2195
|
+
ASSERT_EQ(2, message.repeated_string_piece_size());
|
|
2196
|
+
ASSERT_EQ(2, message.repeated_cord_size());
|
|
2197
|
+
#endif
|
|
2198
|
+
|
|
2199
|
+
EXPECT_EQ(201, message.repeated_int32(0));
|
|
2200
|
+
EXPECT_EQ(202, message.repeated_int64(0));
|
|
2201
|
+
EXPECT_EQ(203, message.repeated_uint32(0));
|
|
2202
|
+
EXPECT_EQ(204, message.repeated_uint64(0));
|
|
2203
|
+
EXPECT_EQ(205, message.repeated_sint32(0));
|
|
2204
|
+
EXPECT_EQ(206, message.repeated_sint64(0));
|
|
2205
|
+
EXPECT_EQ(207, message.repeated_fixed32(0));
|
|
2206
|
+
EXPECT_EQ(208, message.repeated_fixed64(0));
|
|
2207
|
+
EXPECT_EQ(209, message.repeated_sfixed32(0));
|
|
2208
|
+
EXPECT_EQ(210, message.repeated_sfixed64(0));
|
|
2209
|
+
EXPECT_EQ(211, message.repeated_float(0));
|
|
2210
|
+
EXPECT_EQ(212, message.repeated_double(0));
|
|
2211
|
+
EXPECT_TRUE(message.repeated_bool(0));
|
|
2212
|
+
EXPECT_EQ("215", message.repeated_string(0));
|
|
2213
|
+
EXPECT_EQ("216", message.repeated_bytes(0));
|
|
2214
|
+
|
|
2215
|
+
EXPECT_EQ(217, message.repeatedgroup(0).a());
|
|
2216
|
+
EXPECT_EQ(218, message.repeated_nested_message(0).bb());
|
|
2217
|
+
EXPECT_EQ(219, message.repeated_foreign_message(0).c());
|
|
2218
|
+
EXPECT_EQ(220, message.repeated_import_message(0).d());
|
|
2219
|
+
EXPECT_EQ(227, message.repeated_lazy_message(0).bb());
|
|
2220
|
+
|
|
2221
|
+
EXPECT_EQ(TestAllTypes::BAR, message.repeated_nested_enum(0));
|
|
2222
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_BAR,
|
|
2223
|
+
message.repeated_foreign_enum(0));
|
|
2224
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_BAR,
|
|
2225
|
+
message.repeated_import_enum(0));
|
|
2226
|
+
|
|
2227
|
+
|
|
2228
|
+
// Actually verify the second (modified) elements now.
|
|
2229
|
+
EXPECT_EQ(501, message.repeated_int32(1));
|
|
2230
|
+
EXPECT_EQ(502, message.repeated_int64(1));
|
|
2231
|
+
EXPECT_EQ(503, message.repeated_uint32(1));
|
|
2232
|
+
EXPECT_EQ(504, message.repeated_uint64(1));
|
|
2233
|
+
EXPECT_EQ(505, message.repeated_sint32(1));
|
|
2234
|
+
EXPECT_EQ(506, message.repeated_sint64(1));
|
|
2235
|
+
EXPECT_EQ(507, message.repeated_fixed32(1));
|
|
2236
|
+
EXPECT_EQ(508, message.repeated_fixed64(1));
|
|
2237
|
+
EXPECT_EQ(509, message.repeated_sfixed32(1));
|
|
2238
|
+
EXPECT_EQ(510, message.repeated_sfixed64(1));
|
|
2239
|
+
EXPECT_EQ(511, message.repeated_float(1));
|
|
2240
|
+
EXPECT_EQ(512, message.repeated_double(1));
|
|
2241
|
+
EXPECT_TRUE(message.repeated_bool(1));
|
|
2242
|
+
EXPECT_EQ("515", message.repeated_string(1));
|
|
2243
|
+
EXPECT_EQ("516", message.repeated_bytes(1));
|
|
2244
|
+
|
|
2245
|
+
EXPECT_EQ(517, message.repeatedgroup(1).a());
|
|
2246
|
+
EXPECT_EQ(518, message.repeated_nested_message(1).bb());
|
|
2247
|
+
EXPECT_EQ(519, message.repeated_foreign_message(1).c());
|
|
2248
|
+
EXPECT_EQ(520, message.repeated_import_message(1).d());
|
|
2249
|
+
EXPECT_EQ(527, message.repeated_lazy_message(1).bb());
|
|
2250
|
+
|
|
2251
|
+
EXPECT_EQ(TestAllTypes::FOO, message.repeated_nested_enum(1));
|
|
2252
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_FOO,
|
|
2253
|
+
message.repeated_foreign_enum(1));
|
|
2254
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_FOO,
|
|
2255
|
+
message.repeated_import_enum(1));
|
|
2256
|
+
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2259
|
+
template <typename TestAllTypes>
|
|
2260
|
+
void ExpectLastRepeatedsRemoved(const TestAllTypes& message) {
|
|
2261
|
+
ASSERT_EQ(1, message.repeated_int32_size());
|
|
2262
|
+
ASSERT_EQ(1, message.repeated_int64_size());
|
|
2263
|
+
ASSERT_EQ(1, message.repeated_uint32_size());
|
|
2264
|
+
ASSERT_EQ(1, message.repeated_uint64_size());
|
|
2265
|
+
ASSERT_EQ(1, message.repeated_sint32_size());
|
|
2266
|
+
ASSERT_EQ(1, message.repeated_sint64_size());
|
|
2267
|
+
ASSERT_EQ(1, message.repeated_fixed32_size());
|
|
2268
|
+
ASSERT_EQ(1, message.repeated_fixed64_size());
|
|
2269
|
+
ASSERT_EQ(1, message.repeated_sfixed32_size());
|
|
2270
|
+
ASSERT_EQ(1, message.repeated_sfixed64_size());
|
|
2271
|
+
ASSERT_EQ(1, message.repeated_float_size());
|
|
2272
|
+
ASSERT_EQ(1, message.repeated_double_size());
|
|
2273
|
+
ASSERT_EQ(1, message.repeated_bool_size());
|
|
2274
|
+
ASSERT_EQ(1, message.repeated_string_size());
|
|
2275
|
+
ASSERT_EQ(1, message.repeated_bytes_size());
|
|
2276
|
+
|
|
2277
|
+
ASSERT_EQ(1, message.repeatedgroup_size());
|
|
2278
|
+
ASSERT_EQ(1, message.repeated_nested_message_size());
|
|
2279
|
+
ASSERT_EQ(1, message.repeated_foreign_message_size());
|
|
2280
|
+
ASSERT_EQ(1, message.repeated_import_message_size());
|
|
2281
|
+
ASSERT_EQ(1, message.repeated_import_message_size());
|
|
2282
|
+
ASSERT_EQ(1, message.repeated_nested_enum_size());
|
|
2283
|
+
ASSERT_EQ(1, message.repeated_foreign_enum_size());
|
|
2284
|
+
ASSERT_EQ(1, message.repeated_import_enum_size());
|
|
2285
|
+
|
|
2286
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
2287
|
+
ASSERT_EQ(1, message.repeated_string_piece_size());
|
|
2288
|
+
ASSERT_EQ(1, message.repeated_cord_size());
|
|
2289
|
+
#endif
|
|
2290
|
+
|
|
2291
|
+
// Test that the remaining element is the correct one.
|
|
2292
|
+
EXPECT_EQ(201, message.repeated_int32(0));
|
|
2293
|
+
EXPECT_EQ(202, message.repeated_int64(0));
|
|
2294
|
+
EXPECT_EQ(203, message.repeated_uint32(0));
|
|
2295
|
+
EXPECT_EQ(204, message.repeated_uint64(0));
|
|
2296
|
+
EXPECT_EQ(205, message.repeated_sint32(0));
|
|
2297
|
+
EXPECT_EQ(206, message.repeated_sint64(0));
|
|
2298
|
+
EXPECT_EQ(207, message.repeated_fixed32(0));
|
|
2299
|
+
EXPECT_EQ(208, message.repeated_fixed64(0));
|
|
2300
|
+
EXPECT_EQ(209, message.repeated_sfixed32(0));
|
|
2301
|
+
EXPECT_EQ(210, message.repeated_sfixed64(0));
|
|
2302
|
+
EXPECT_EQ(211, message.repeated_float(0));
|
|
2303
|
+
EXPECT_EQ(212, message.repeated_double(0));
|
|
2304
|
+
EXPECT_TRUE(message.repeated_bool(0));
|
|
2305
|
+
EXPECT_EQ("215", message.repeated_string(0));
|
|
2306
|
+
EXPECT_EQ("216", message.repeated_bytes(0));
|
|
2307
|
+
|
|
2308
|
+
EXPECT_EQ(217, message.repeatedgroup(0).a());
|
|
2309
|
+
EXPECT_EQ(218, message.repeated_nested_message(0).bb());
|
|
2310
|
+
EXPECT_EQ(219, message.repeated_foreign_message(0).c());
|
|
2311
|
+
EXPECT_EQ(220, message.repeated_import_message(0).d());
|
|
2312
|
+
EXPECT_EQ(220, message.repeated_import_message(0).d());
|
|
2313
|
+
|
|
2314
|
+
EXPECT_EQ(TestAllTypes::BAR, message.repeated_nested_enum(0));
|
|
2315
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_BAR,
|
|
2316
|
+
message.repeated_foreign_enum(0));
|
|
2317
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_BAR,
|
|
2318
|
+
message.repeated_import_enum(0));
|
|
2319
|
+
}
|
|
2320
|
+
|
|
2321
|
+
template <typename TestAllTypes>
|
|
2322
|
+
void ExpectRepeatedsSwapped(const TestAllTypes& message) {
|
|
2323
|
+
ASSERT_EQ(2, message.repeated_int32_size());
|
|
2324
|
+
ASSERT_EQ(2, message.repeated_int64_size());
|
|
2325
|
+
ASSERT_EQ(2, message.repeated_uint32_size());
|
|
2326
|
+
ASSERT_EQ(2, message.repeated_uint64_size());
|
|
2327
|
+
ASSERT_EQ(2, message.repeated_sint32_size());
|
|
2328
|
+
ASSERT_EQ(2, message.repeated_sint64_size());
|
|
2329
|
+
ASSERT_EQ(2, message.repeated_fixed32_size());
|
|
2330
|
+
ASSERT_EQ(2, message.repeated_fixed64_size());
|
|
2331
|
+
ASSERT_EQ(2, message.repeated_sfixed32_size());
|
|
2332
|
+
ASSERT_EQ(2, message.repeated_sfixed64_size());
|
|
2333
|
+
ASSERT_EQ(2, message.repeated_float_size());
|
|
2334
|
+
ASSERT_EQ(2, message.repeated_double_size());
|
|
2335
|
+
ASSERT_EQ(2, message.repeated_bool_size());
|
|
2336
|
+
ASSERT_EQ(2, message.repeated_string_size());
|
|
2337
|
+
ASSERT_EQ(2, message.repeated_bytes_size());
|
|
2338
|
+
|
|
2339
|
+
ASSERT_EQ(2, message.repeatedgroup_size());
|
|
2340
|
+
ASSERT_EQ(2, message.repeated_nested_message_size());
|
|
2341
|
+
ASSERT_EQ(2, message.repeated_foreign_message_size());
|
|
2342
|
+
ASSERT_EQ(2, message.repeated_import_message_size());
|
|
2343
|
+
ASSERT_EQ(2, message.repeated_import_message_size());
|
|
2344
|
+
ASSERT_EQ(2, message.repeated_nested_enum_size());
|
|
2345
|
+
ASSERT_EQ(2, message.repeated_foreign_enum_size());
|
|
2346
|
+
ASSERT_EQ(2, message.repeated_import_enum_size());
|
|
2347
|
+
|
|
2348
|
+
#ifndef PROTOBUF_TEST_NO_DESCRIPTORS
|
|
2349
|
+
ASSERT_EQ(2, message.repeated_string_piece_size());
|
|
2350
|
+
ASSERT_EQ(2, message.repeated_cord_size());
|
|
2351
|
+
#endif
|
|
2352
|
+
|
|
2353
|
+
// Test that the first element and second element are flipped.
|
|
2354
|
+
EXPECT_EQ(201, message.repeated_int32(1));
|
|
2355
|
+
EXPECT_EQ(202, message.repeated_int64(1));
|
|
2356
|
+
EXPECT_EQ(203, message.repeated_uint32(1));
|
|
2357
|
+
EXPECT_EQ(204, message.repeated_uint64(1));
|
|
2358
|
+
EXPECT_EQ(205, message.repeated_sint32(1));
|
|
2359
|
+
EXPECT_EQ(206, message.repeated_sint64(1));
|
|
2360
|
+
EXPECT_EQ(207, message.repeated_fixed32(1));
|
|
2361
|
+
EXPECT_EQ(208, message.repeated_fixed64(1));
|
|
2362
|
+
EXPECT_EQ(209, message.repeated_sfixed32(1));
|
|
2363
|
+
EXPECT_EQ(210, message.repeated_sfixed64(1));
|
|
2364
|
+
EXPECT_EQ(211, message.repeated_float(1));
|
|
2365
|
+
EXPECT_EQ(212, message.repeated_double(1));
|
|
2366
|
+
EXPECT_TRUE(message.repeated_bool(1));
|
|
2367
|
+
EXPECT_EQ("215", message.repeated_string(1));
|
|
2368
|
+
EXPECT_EQ("216", message.repeated_bytes(1));
|
|
2369
|
+
|
|
2370
|
+
EXPECT_EQ(217, message.repeatedgroup(1).a());
|
|
2371
|
+
EXPECT_EQ(218, message.repeated_nested_message(1).bb());
|
|
2372
|
+
EXPECT_EQ(219, message.repeated_foreign_message(1).c());
|
|
2373
|
+
EXPECT_EQ(220, message.repeated_import_message(1).d());
|
|
2374
|
+
EXPECT_EQ(220, message.repeated_import_message(1).d());
|
|
2375
|
+
|
|
2376
|
+
EXPECT_EQ(TestAllTypes::BAR, message.repeated_nested_enum(1));
|
|
2377
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_BAR,
|
|
2378
|
+
message.repeated_foreign_enum(1));
|
|
2379
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_BAR,
|
|
2380
|
+
message.repeated_import_enum(1));
|
|
2381
|
+
|
|
2382
|
+
EXPECT_EQ(301, message.repeated_int32(0));
|
|
2383
|
+
EXPECT_EQ(302, message.repeated_int64(0));
|
|
2384
|
+
EXPECT_EQ(303, message.repeated_uint32(0));
|
|
2385
|
+
EXPECT_EQ(304, message.repeated_uint64(0));
|
|
2386
|
+
EXPECT_EQ(305, message.repeated_sint32(0));
|
|
2387
|
+
EXPECT_EQ(306, message.repeated_sint64(0));
|
|
2388
|
+
EXPECT_EQ(307, message.repeated_fixed32(0));
|
|
2389
|
+
EXPECT_EQ(308, message.repeated_fixed64(0));
|
|
2390
|
+
EXPECT_EQ(309, message.repeated_sfixed32(0));
|
|
2391
|
+
EXPECT_EQ(310, message.repeated_sfixed64(0));
|
|
2392
|
+
EXPECT_EQ(311, message.repeated_float(0));
|
|
2393
|
+
EXPECT_EQ(312, message.repeated_double(0));
|
|
2394
|
+
EXPECT_FALSE(message.repeated_bool(0));
|
|
2395
|
+
EXPECT_EQ("315", message.repeated_string(0));
|
|
2396
|
+
EXPECT_EQ("316", message.repeated_bytes(0));
|
|
2397
|
+
|
|
2398
|
+
EXPECT_EQ(317, message.repeatedgroup(0).a());
|
|
2399
|
+
EXPECT_EQ(318, message.repeated_nested_message(0).bb());
|
|
2400
|
+
EXPECT_EQ(319, message.repeated_foreign_message(0).c());
|
|
2401
|
+
EXPECT_EQ(320, message.repeated_import_message(0).d());
|
|
2402
|
+
EXPECT_EQ(320, message.repeated_import_message(0).d());
|
|
2403
|
+
|
|
2404
|
+
EXPECT_EQ(TestAllTypes::BAZ, message.repeated_nested_enum(0));
|
|
2405
|
+
EXPECT_EQ(ForeignEnum<TestAllTypes>::FOREIGN_BAZ,
|
|
2406
|
+
message.repeated_foreign_enum(0));
|
|
2407
|
+
EXPECT_EQ(ImportEnum<TestAllTypes>::IMPORT_BAZ,
|
|
2408
|
+
message.repeated_import_enum(0));
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
template <typename TestPackedTypes>
|
|
2412
|
+
void SetPackedFields(TestPackedTypes* message) {
|
|
2413
|
+
message->add_packed_int32(601);
|
|
2414
|
+
message->add_packed_int64(602);
|
|
2415
|
+
message->add_packed_uint32(603);
|
|
2416
|
+
message->add_packed_uint64(604);
|
|
2417
|
+
message->add_packed_sint32(605);
|
|
2418
|
+
message->add_packed_sint64(606);
|
|
2419
|
+
message->add_packed_fixed32(607);
|
|
2420
|
+
message->add_packed_fixed64(608);
|
|
2421
|
+
message->add_packed_sfixed32(609);
|
|
2422
|
+
message->add_packed_sfixed64(610);
|
|
2423
|
+
message->add_packed_float(611);
|
|
2424
|
+
message->add_packed_double(612);
|
|
2425
|
+
message->add_packed_bool(true);
|
|
2426
|
+
message->add_packed_enum(ForeignEnum<TestPackedTypes>::FOREIGN_BAR);
|
|
2427
|
+
// add a second one of each field
|
|
2428
|
+
message->add_packed_int32(701);
|
|
2429
|
+
message->add_packed_int64(702);
|
|
2430
|
+
message->add_packed_uint32(703);
|
|
2431
|
+
message->add_packed_uint64(704);
|
|
2432
|
+
message->add_packed_sint32(705);
|
|
2433
|
+
message->add_packed_sint64(706);
|
|
2434
|
+
message->add_packed_fixed32(707);
|
|
2435
|
+
message->add_packed_fixed64(708);
|
|
2436
|
+
message->add_packed_sfixed32(709);
|
|
2437
|
+
message->add_packed_sfixed64(710);
|
|
2438
|
+
message->add_packed_float(711);
|
|
2439
|
+
message->add_packed_double(712);
|
|
2440
|
+
message->add_packed_bool(false);
|
|
2441
|
+
message->add_packed_enum(ForeignEnum<TestPackedTypes>::FOREIGN_BAZ);
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
template <typename TestPackedTypes>
|
|
2445
|
+
void ExpectPackedFieldsSet(const TestPackedTypes& message) {
|
|
2446
|
+
ASSERT_EQ(2, message.packed_int32_size());
|
|
2447
|
+
ASSERT_EQ(2, message.packed_int64_size());
|
|
2448
|
+
ASSERT_EQ(2, message.packed_uint32_size());
|
|
2449
|
+
ASSERT_EQ(2, message.packed_uint64_size());
|
|
2450
|
+
ASSERT_EQ(2, message.packed_sint32_size());
|
|
2451
|
+
ASSERT_EQ(2, message.packed_sint64_size());
|
|
2452
|
+
ASSERT_EQ(2, message.packed_fixed32_size());
|
|
2453
|
+
ASSERT_EQ(2, message.packed_fixed64_size());
|
|
2454
|
+
ASSERT_EQ(2, message.packed_sfixed32_size());
|
|
2455
|
+
ASSERT_EQ(2, message.packed_sfixed64_size());
|
|
2456
|
+
ASSERT_EQ(2, message.packed_float_size());
|
|
2457
|
+
ASSERT_EQ(2, message.packed_double_size());
|
|
2458
|
+
ASSERT_EQ(2, message.packed_bool_size());
|
|
2459
|
+
ASSERT_EQ(2, message.packed_enum_size());
|
|
2460
|
+
|
|
2461
|
+
EXPECT_EQ(601, message.packed_int32(0));
|
|
2462
|
+
EXPECT_EQ(602, message.packed_int64(0));
|
|
2463
|
+
EXPECT_EQ(603, message.packed_uint32(0));
|
|
2464
|
+
EXPECT_EQ(604, message.packed_uint64(0));
|
|
2465
|
+
EXPECT_EQ(605, message.packed_sint32(0));
|
|
2466
|
+
EXPECT_EQ(606, message.packed_sint64(0));
|
|
2467
|
+
EXPECT_EQ(607, message.packed_fixed32(0));
|
|
2468
|
+
EXPECT_EQ(608, message.packed_fixed64(0));
|
|
2469
|
+
EXPECT_EQ(609, message.packed_sfixed32(0));
|
|
2470
|
+
EXPECT_EQ(610, message.packed_sfixed64(0));
|
|
2471
|
+
EXPECT_EQ(611, message.packed_float(0));
|
|
2472
|
+
EXPECT_EQ(612, message.packed_double(0));
|
|
2473
|
+
EXPECT_TRUE(message.packed_bool(0));
|
|
2474
|
+
EXPECT_EQ(ForeignEnum<TestPackedTypes>::FOREIGN_BAR, message.packed_enum(0));
|
|
2475
|
+
|
|
2476
|
+
EXPECT_EQ(701, message.packed_int32(1));
|
|
2477
|
+
EXPECT_EQ(702, message.packed_int64(1));
|
|
2478
|
+
EXPECT_EQ(703, message.packed_uint32(1));
|
|
2479
|
+
EXPECT_EQ(704, message.packed_uint64(1));
|
|
2480
|
+
EXPECT_EQ(705, message.packed_sint32(1));
|
|
2481
|
+
EXPECT_EQ(706, message.packed_sint64(1));
|
|
2482
|
+
EXPECT_EQ(707, message.packed_fixed32(1));
|
|
2483
|
+
EXPECT_EQ(708, message.packed_fixed64(1));
|
|
2484
|
+
EXPECT_EQ(709, message.packed_sfixed32(1));
|
|
2485
|
+
EXPECT_EQ(710, message.packed_sfixed64(1));
|
|
2486
|
+
EXPECT_EQ(711, message.packed_float(1));
|
|
2487
|
+
EXPECT_EQ(712, message.packed_double(1));
|
|
2488
|
+
EXPECT_FALSE(message.packed_bool(1));
|
|
2489
|
+
EXPECT_EQ(ForeignEnum<TestPackedTypes>::FOREIGN_BAZ, message.packed_enum(1));
|
|
2490
|
+
}
|
|
2491
|
+
|
|
2492
|
+
template <typename TestUnpackedTypes>
|
|
2493
|
+
void SetUnpackedFields(TestUnpackedTypes* message) {
|
|
2494
|
+
// The values applied here must match those of SetPackedFields.
|
|
2495
|
+
|
|
2496
|
+
message->add_unpacked_int32(601);
|
|
2497
|
+
message->add_unpacked_int64(602);
|
|
2498
|
+
message->add_unpacked_uint32(603);
|
|
2499
|
+
message->add_unpacked_uint64(604);
|
|
2500
|
+
message->add_unpacked_sint32(605);
|
|
2501
|
+
message->add_unpacked_sint64(606);
|
|
2502
|
+
message->add_unpacked_fixed32(607);
|
|
2503
|
+
message->add_unpacked_fixed64(608);
|
|
2504
|
+
message->add_unpacked_sfixed32(609);
|
|
2505
|
+
message->add_unpacked_sfixed64(610);
|
|
2506
|
+
message->add_unpacked_float(611);
|
|
2507
|
+
message->add_unpacked_double(612);
|
|
2508
|
+
message->add_unpacked_bool(true);
|
|
2509
|
+
message->add_unpacked_enum(ForeignEnum<TestUnpackedTypes>::FOREIGN_BAR);
|
|
2510
|
+
// add a second one of each field
|
|
2511
|
+
message->add_unpacked_int32(701);
|
|
2512
|
+
message->add_unpacked_int64(702);
|
|
2513
|
+
message->add_unpacked_uint32(703);
|
|
2514
|
+
message->add_unpacked_uint64(704);
|
|
2515
|
+
message->add_unpacked_sint32(705);
|
|
2516
|
+
message->add_unpacked_sint64(706);
|
|
2517
|
+
message->add_unpacked_fixed32(707);
|
|
2518
|
+
message->add_unpacked_fixed64(708);
|
|
2519
|
+
message->add_unpacked_sfixed32(709);
|
|
2520
|
+
message->add_unpacked_sfixed64(710);
|
|
2521
|
+
message->add_unpacked_float(711);
|
|
2522
|
+
message->add_unpacked_double(712);
|
|
2523
|
+
message->add_unpacked_bool(false);
|
|
2524
|
+
message->add_unpacked_enum(ForeignEnum<TestUnpackedTypes>::FOREIGN_BAZ);
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
// -------------------------------------------------------------------
|
|
2528
|
+
|
|
2529
|
+
template <typename TestUnpackedTypes>
|
|
2530
|
+
void ExpectUnpackedFieldsSet(const TestUnpackedTypes& message) {
|
|
2531
|
+
// The values expected here must match those of ExpectPackedFieldsSet.
|
|
2532
|
+
|
|
2533
|
+
ASSERT_EQ(2, message.unpacked_int32_size());
|
|
2534
|
+
ASSERT_EQ(2, message.unpacked_int64_size());
|
|
2535
|
+
ASSERT_EQ(2, message.unpacked_uint32_size());
|
|
2536
|
+
ASSERT_EQ(2, message.unpacked_uint64_size());
|
|
2537
|
+
ASSERT_EQ(2, message.unpacked_sint32_size());
|
|
2538
|
+
ASSERT_EQ(2, message.unpacked_sint64_size());
|
|
2539
|
+
ASSERT_EQ(2, message.unpacked_fixed32_size());
|
|
2540
|
+
ASSERT_EQ(2, message.unpacked_fixed64_size());
|
|
2541
|
+
ASSERT_EQ(2, message.unpacked_sfixed32_size());
|
|
2542
|
+
ASSERT_EQ(2, message.unpacked_sfixed64_size());
|
|
2543
|
+
ASSERT_EQ(2, message.unpacked_float_size());
|
|
2544
|
+
ASSERT_EQ(2, message.unpacked_double_size());
|
|
2545
|
+
ASSERT_EQ(2, message.unpacked_bool_size());
|
|
2546
|
+
ASSERT_EQ(2, message.unpacked_enum_size());
|
|
2547
|
+
|
|
2548
|
+
EXPECT_EQ(601, message.unpacked_int32(0));
|
|
2549
|
+
EXPECT_EQ(602, message.unpacked_int64(0));
|
|
2550
|
+
EXPECT_EQ(603, message.unpacked_uint32(0));
|
|
2551
|
+
EXPECT_EQ(604, message.unpacked_uint64(0));
|
|
2552
|
+
EXPECT_EQ(605, message.unpacked_sint32(0));
|
|
2553
|
+
EXPECT_EQ(606, message.unpacked_sint64(0));
|
|
2554
|
+
EXPECT_EQ(607, message.unpacked_fixed32(0));
|
|
2555
|
+
EXPECT_EQ(608, message.unpacked_fixed64(0));
|
|
2556
|
+
EXPECT_EQ(609, message.unpacked_sfixed32(0));
|
|
2557
|
+
EXPECT_EQ(610, message.unpacked_sfixed64(0));
|
|
2558
|
+
EXPECT_EQ(611, message.unpacked_float(0));
|
|
2559
|
+
EXPECT_EQ(612, message.unpacked_double(0));
|
|
2560
|
+
EXPECT_TRUE(message.unpacked_bool(0));
|
|
2561
|
+
EXPECT_EQ(ForeignEnum<TestUnpackedTypes>::FOREIGN_BAR,
|
|
2562
|
+
message.unpacked_enum(0));
|
|
2563
|
+
|
|
2564
|
+
EXPECT_EQ(701, message.unpacked_int32(1));
|
|
2565
|
+
EXPECT_EQ(702, message.unpacked_int64(1));
|
|
2566
|
+
EXPECT_EQ(703, message.unpacked_uint32(1));
|
|
2567
|
+
EXPECT_EQ(704, message.unpacked_uint64(1));
|
|
2568
|
+
EXPECT_EQ(705, message.unpacked_sint32(1));
|
|
2569
|
+
EXPECT_EQ(706, message.unpacked_sint64(1));
|
|
2570
|
+
EXPECT_EQ(707, message.unpacked_fixed32(1));
|
|
2571
|
+
EXPECT_EQ(708, message.unpacked_fixed64(1));
|
|
2572
|
+
EXPECT_EQ(709, message.unpacked_sfixed32(1));
|
|
2573
|
+
EXPECT_EQ(710, message.unpacked_sfixed64(1));
|
|
2574
|
+
EXPECT_EQ(711, message.unpacked_float(1));
|
|
2575
|
+
EXPECT_EQ(712, message.unpacked_double(1));
|
|
2576
|
+
EXPECT_FALSE(message.unpacked_bool(1));
|
|
2577
|
+
EXPECT_EQ(ForeignEnum<TestUnpackedTypes>::FOREIGN_BAZ,
|
|
2578
|
+
message.unpacked_enum(1));
|
|
2579
|
+
}
|
|
2580
|
+
|
|
2581
|
+
template <typename TestOneof2>
|
|
2582
|
+
void ExpectAtMostOneFieldSetInOneof(const TestOneof2& message) {
|
|
2583
|
+
int count = 0;
|
|
2584
|
+
if (message.has_foo_int()) count++;
|
|
2585
|
+
if (message.has_foo_string()) count++;
|
|
2586
|
+
if (message.has_foo_bytes()) count++;
|
|
2587
|
+
if (message.has_foo_enum()) count++;
|
|
2588
|
+
if (message.has_foo_message()) count++;
|
|
2589
|
+
if (message.has_foogroup()) count++;
|
|
2590
|
+
if (message.has_foo_lazy_message()) count++;
|
|
2591
|
+
if (message.has_foo_bytes_cord()) count++;
|
|
2592
|
+
EXPECT_LE(count, 1);
|
|
2593
|
+
count = 0;
|
|
2594
|
+
if (message.has_bar_int()) count++;
|
|
2595
|
+
if (message.has_bar_string()) count++;
|
|
2596
|
+
if (message.has_bar_bytes()) count++;
|
|
2597
|
+
if (message.has_bar_enum()) count++;
|
|
2598
|
+
EXPECT_TRUE(count == 0 || count == 1);
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
template <typename TestOneof2>
|
|
2602
|
+
void SetOneof1(TestOneof2* message) {
|
|
2603
|
+
message->mutable_foo_lazy_message()->set_moo_int(100);
|
|
2604
|
+
message->set_bar_string("101");
|
|
2605
|
+
message->set_baz_int(102);
|
|
2606
|
+
message->set_baz_string("103");
|
|
2607
|
+
}
|
|
2608
|
+
|
|
2609
|
+
template <typename TestOneof2>
|
|
2610
|
+
void SetOneof2(TestOneof2* message) {
|
|
2611
|
+
message->set_foo_int(200);
|
|
2612
|
+
message->set_bar_enum(TestOneof2::BAZ);
|
|
2613
|
+
message->set_baz_int(202);
|
|
2614
|
+
message->set_baz_string("203");
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
template <typename TestOneof2>
|
|
2618
|
+
void ExpectOneofSet1(const TestOneof2& message) {
|
|
2619
|
+
ExpectAtMostOneFieldSetInOneof(message);
|
|
2620
|
+
|
|
2621
|
+
EXPECT_TRUE(message.has_foo_lazy_message());
|
|
2622
|
+
EXPECT_TRUE(message.foo_lazy_message().has_moo_int());
|
|
2623
|
+
|
|
2624
|
+
EXPECT_TRUE(message.has_bar_string());
|
|
2625
|
+
EXPECT_TRUE(message.has_baz_int());
|
|
2626
|
+
EXPECT_TRUE(message.has_baz_string());
|
|
2627
|
+
|
|
2628
|
+
ASSERT_EQ(0, message.foo_lazy_message().corge_int_size());
|
|
2629
|
+
|
|
2630
|
+
EXPECT_EQ(100, message.foo_lazy_message().moo_int());
|
|
2631
|
+
EXPECT_EQ("101", message.bar_string());
|
|
2632
|
+
EXPECT_EQ(102, message.baz_int());
|
|
2633
|
+
EXPECT_EQ("103", message.baz_string());
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
template <typename TestOneof2>
|
|
2637
|
+
void ExpectOneofSet2(const TestOneof2& message) {
|
|
2638
|
+
ExpectAtMostOneFieldSetInOneof(message);
|
|
2639
|
+
|
|
2640
|
+
EXPECT_TRUE(message.has_foo_int());
|
|
2641
|
+
EXPECT_TRUE(message.has_bar_enum());
|
|
2642
|
+
EXPECT_TRUE(message.has_baz_int());
|
|
2643
|
+
EXPECT_TRUE(message.has_baz_string());
|
|
2644
|
+
|
|
2645
|
+
EXPECT_EQ(200, message.foo_int());
|
|
2646
|
+
EXPECT_EQ(TestOneof2::BAZ, message.bar_enum());
|
|
2647
|
+
EXPECT_EQ(202, message.baz_int());
|
|
2648
|
+
EXPECT_EQ("203", message.baz_string());
|
|
2649
|
+
}
|
|
2650
|
+
|
|
2651
|
+
template <typename TestOneof2>
|
|
2652
|
+
void ExpectOneofClear(const TestOneof2& message) {
|
|
2653
|
+
EXPECT_FALSE(message.has_foo_int());
|
|
2654
|
+
EXPECT_FALSE(message.has_foo_string());
|
|
2655
|
+
EXPECT_FALSE(message.has_foo_bytes());
|
|
2656
|
+
EXPECT_FALSE(message.has_foo_enum());
|
|
2657
|
+
EXPECT_FALSE(message.has_foo_message());
|
|
2658
|
+
EXPECT_FALSE(message.has_foogroup());
|
|
2659
|
+
EXPECT_FALSE(message.has_foo_lazy_message());
|
|
2660
|
+
EXPECT_FALSE(message.has_foo_bytes_cord());
|
|
2661
|
+
|
|
2662
|
+
EXPECT_FALSE(message.has_bar_int());
|
|
2663
|
+
EXPECT_FALSE(message.has_bar_string());
|
|
2664
|
+
EXPECT_FALSE(message.has_bar_bytes());
|
|
2665
|
+
EXPECT_FALSE(message.has_bar_enum());
|
|
2666
|
+
|
|
2667
|
+
EXPECT_FALSE(message.has_baz_int());
|
|
2668
|
+
EXPECT_FALSE(message.has_baz_string());
|
|
2669
|
+
|
|
2670
|
+
EXPECT_EQ(TestOneof2::FOO_NOT_SET, message.foo_case());
|
|
2671
|
+
EXPECT_EQ(TestOneof2::BAR_NOT_SET, message.bar_case());
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
template <typename TestAllExtensions>
|
|
2675
|
+
void SetAllExtensions(TestAllExtensions* message) {
|
|
2676
|
+
using Traits = TestUtilTraits<TestAllExtensions>;
|
|
2677
|
+
message->SetExtension(Traits::optional_int32_extension, 101);
|
|
2678
|
+
message->SetExtension(Traits::optional_int64_extension, 102);
|
|
2679
|
+
message->SetExtension(Traits::optional_uint32_extension, 103);
|
|
2680
|
+
message->SetExtension(Traits::optional_uint64_extension, 104);
|
|
2681
|
+
message->SetExtension(Traits::optional_sint32_extension, 105);
|
|
2682
|
+
message->SetExtension(Traits::optional_sint64_extension, 106);
|
|
2683
|
+
message->SetExtension(Traits::optional_fixed32_extension, 107);
|
|
2684
|
+
message->SetExtension(Traits::optional_fixed64_extension, 108);
|
|
2685
|
+
message->SetExtension(Traits::optional_sfixed32_extension, 109);
|
|
2686
|
+
message->SetExtension(Traits::optional_sfixed64_extension, 110);
|
|
2687
|
+
message->SetExtension(Traits::optional_float_extension, 111);
|
|
2688
|
+
message->SetExtension(Traits::optional_double_extension, 112);
|
|
2689
|
+
message->SetExtension(Traits::optional_bool_extension, true);
|
|
2690
|
+
message->SetExtension(Traits::optional_string_extension, "115");
|
|
2691
|
+
message->SetExtension(Traits::optional_bytes_extension, "116");
|
|
2692
|
+
|
|
2693
|
+
message->MutableExtension(Traits::optionalgroup_extension)->set_a(117);
|
|
2694
|
+
message->MutableExtension(Traits::optional_nested_message_extension)
|
|
2695
|
+
->set_bb(118);
|
|
2696
|
+
message->MutableExtension(Traits::optional_foreign_message_extension)
|
|
2697
|
+
->set_c(119);
|
|
2698
|
+
message->MutableExtension(Traits::optional_import_message_extension)
|
|
2699
|
+
->set_d(120);
|
|
2700
|
+
|
|
2701
|
+
message->SetExtension(Traits::optional_nested_enum_extension,
|
|
2702
|
+
Traits::TestAllTypes::BAZ);
|
|
2703
|
+
message->SetExtension(Traits::optional_foreign_enum_extension,
|
|
2704
|
+
Traits::FOREIGN_BAZ);
|
|
2705
|
+
message->SetExtension(Traits::optional_import_enum_extension,
|
|
2706
|
+
Traits::IMPORT_BAZ);
|
|
2707
|
+
|
|
2708
|
+
message->SetExtension(Traits::optional_string_piece_extension, "124");
|
|
2709
|
+
message->SetExtension(Traits::optional_cord_extension, "125");
|
|
2710
|
+
message->SetExtension(Traits::optional_bytes_cord_extension,
|
|
2711
|
+
"optional bytes cord");
|
|
2712
|
+
|
|
2713
|
+
message->MutableExtension(Traits::optional_public_import_message_extension)
|
|
2714
|
+
->set_e(126);
|
|
2715
|
+
message->MutableExtension(Traits::optional_lazy_message_extension)
|
|
2716
|
+
->set_bb(127);
|
|
2717
|
+
message->MutableExtension(Traits::optional_unverified_lazy_message_extension)
|
|
2718
|
+
->set_bb(128);
|
|
2719
|
+
|
|
2720
|
+
// -----------------------------------------------------------------
|
|
2721
|
+
|
|
2722
|
+
message->AddExtension(Traits::repeated_int32_extension, 201);
|
|
2723
|
+
message->AddExtension(Traits::repeated_int64_extension, 202);
|
|
2724
|
+
message->AddExtension(Traits::repeated_uint32_extension, 203);
|
|
2725
|
+
message->AddExtension(Traits::repeated_uint64_extension, 204);
|
|
2726
|
+
message->AddExtension(Traits::repeated_sint32_extension, 205);
|
|
2727
|
+
message->AddExtension(Traits::repeated_sint64_extension, 206);
|
|
2728
|
+
message->AddExtension(Traits::repeated_fixed32_extension, 207);
|
|
2729
|
+
message->AddExtension(Traits::repeated_fixed64_extension, 208);
|
|
2730
|
+
message->AddExtension(Traits::repeated_sfixed32_extension, 209);
|
|
2731
|
+
message->AddExtension(Traits::repeated_sfixed64_extension, 210);
|
|
2732
|
+
message->AddExtension(Traits::repeated_float_extension, 211);
|
|
2733
|
+
message->AddExtension(Traits::repeated_double_extension, 212);
|
|
2734
|
+
message->AddExtension(Traits::repeated_bool_extension, true);
|
|
2735
|
+
message->AddExtension(Traits::repeated_string_extension, "215");
|
|
2736
|
+
message->AddExtension(Traits::repeated_bytes_extension, "216");
|
|
2737
|
+
|
|
2738
|
+
message->AddExtension(Traits::repeatedgroup_extension)->set_a(217);
|
|
2739
|
+
message->AddExtension(Traits::repeated_nested_message_extension)->set_bb(218);
|
|
2740
|
+
message->AddExtension(Traits::repeated_foreign_message_extension)->set_c(219);
|
|
2741
|
+
message->AddExtension(Traits::repeated_import_message_extension)->set_d(220);
|
|
2742
|
+
message->AddExtension(Traits::repeated_lazy_message_extension)->set_bb(227);
|
|
2743
|
+
|
|
2744
|
+
message->AddExtension(Traits::repeated_nested_enum_extension,
|
|
2745
|
+
Traits::TestAllTypes::BAR);
|
|
2746
|
+
message->AddExtension(Traits::repeated_foreign_enum_extension,
|
|
2747
|
+
Traits::FOREIGN_BAR);
|
|
2748
|
+
message->AddExtension(Traits::repeated_import_enum_extension,
|
|
2749
|
+
Traits::IMPORT_BAR);
|
|
2750
|
+
|
|
2751
|
+
message->AddExtension(Traits::repeated_string_piece_extension, "224");
|
|
2752
|
+
message->AddExtension(Traits::repeated_cord_extension, "225");
|
|
2753
|
+
|
|
2754
|
+
// Add a second one of each field.
|
|
2755
|
+
message->AddExtension(Traits::repeated_int32_extension, 301);
|
|
2756
|
+
message->AddExtension(Traits::repeated_int64_extension, 302);
|
|
2757
|
+
message->AddExtension(Traits::repeated_uint32_extension, 303);
|
|
2758
|
+
message->AddExtension(Traits::repeated_uint64_extension, 304);
|
|
2759
|
+
message->AddExtension(Traits::repeated_sint32_extension, 305);
|
|
2760
|
+
message->AddExtension(Traits::repeated_sint64_extension, 306);
|
|
2761
|
+
message->AddExtension(Traits::repeated_fixed32_extension, 307);
|
|
2762
|
+
message->AddExtension(Traits::repeated_fixed64_extension, 308);
|
|
2763
|
+
message->AddExtension(Traits::repeated_sfixed32_extension, 309);
|
|
2764
|
+
message->AddExtension(Traits::repeated_sfixed64_extension, 310);
|
|
2765
|
+
message->AddExtension(Traits::repeated_float_extension, 311);
|
|
2766
|
+
message->AddExtension(Traits::repeated_double_extension, 312);
|
|
2767
|
+
message->AddExtension(Traits::repeated_bool_extension, false);
|
|
2768
|
+
message->AddExtension(Traits::repeated_string_extension, "315");
|
|
2769
|
+
message->AddExtension(Traits::repeated_bytes_extension, "316");
|
|
2770
|
+
|
|
2771
|
+
message->AddExtension(Traits::repeatedgroup_extension)->set_a(317);
|
|
2772
|
+
message->AddExtension(Traits::repeated_nested_message_extension)->set_bb(318);
|
|
2773
|
+
message->AddExtension(Traits::repeated_foreign_message_extension)->set_c(319);
|
|
2774
|
+
message->AddExtension(Traits::repeated_import_message_extension)->set_d(320);
|
|
2775
|
+
message->AddExtension(Traits::repeated_lazy_message_extension)->set_bb(327);
|
|
2776
|
+
|
|
2777
|
+
message->AddExtension(Traits::repeated_nested_enum_extension,
|
|
2778
|
+
Traits::TestAllTypes::BAZ);
|
|
2779
|
+
message->AddExtension(Traits::repeated_foreign_enum_extension,
|
|
2780
|
+
Traits::FOREIGN_BAZ);
|
|
2781
|
+
message->AddExtension(Traits::repeated_import_enum_extension,
|
|
2782
|
+
Traits::IMPORT_BAZ);
|
|
2783
|
+
|
|
2784
|
+
message->AddExtension(Traits::repeated_string_piece_extension, "324");
|
|
2785
|
+
message->AddExtension(Traits::repeated_cord_extension, "325");
|
|
2786
|
+
|
|
2787
|
+
// -----------------------------------------------------------------
|
|
2788
|
+
|
|
2789
|
+
message->SetExtension(Traits::default_int32_extension, 401);
|
|
2790
|
+
message->SetExtension(Traits::default_int64_extension, 402);
|
|
2791
|
+
message->SetExtension(Traits::default_uint32_extension, 403);
|
|
2792
|
+
message->SetExtension(Traits::default_uint64_extension, 404);
|
|
2793
|
+
message->SetExtension(Traits::default_sint32_extension, 405);
|
|
2794
|
+
message->SetExtension(Traits::default_sint64_extension, 406);
|
|
2795
|
+
message->SetExtension(Traits::default_fixed32_extension, 407);
|
|
2796
|
+
message->SetExtension(Traits::default_fixed64_extension, 408);
|
|
2797
|
+
message->SetExtension(Traits::default_sfixed32_extension, 409);
|
|
2798
|
+
message->SetExtension(Traits::default_sfixed64_extension, 410);
|
|
2799
|
+
message->SetExtension(Traits::default_float_extension, 411);
|
|
2800
|
+
message->SetExtension(Traits::default_double_extension, 412);
|
|
2801
|
+
message->SetExtension(Traits::default_bool_extension, false);
|
|
2802
|
+
message->SetExtension(Traits::default_string_extension, "415");
|
|
2803
|
+
message->SetExtension(Traits::default_bytes_extension, "416");
|
|
2804
|
+
|
|
2805
|
+
message->SetExtension(Traits::default_nested_enum_extension,
|
|
2806
|
+
Traits::TestAllTypes::FOO);
|
|
2807
|
+
message->SetExtension(Traits::default_foreign_enum_extension,
|
|
2808
|
+
Traits::FOREIGN_FOO);
|
|
2809
|
+
message->SetExtension(Traits::default_import_enum_extension,
|
|
2810
|
+
Traits::IMPORT_FOO);
|
|
2811
|
+
|
|
2812
|
+
message->SetExtension(Traits::default_string_piece_extension, "424");
|
|
2813
|
+
message->SetExtension(Traits::default_cord_extension, "425");
|
|
2814
|
+
|
|
2815
|
+
SetOneofFieldsExtensions(message);
|
|
2816
|
+
}
|
|
2817
|
+
|
|
2818
|
+
template <typename TestAllExtensions>
|
|
2819
|
+
void SetOneofFieldsExtensions(TestAllExtensions* message) {
|
|
2820
|
+
using Traits = TestUtilTraits<TestAllExtensions>;
|
|
2821
|
+
message->SetExtension(Traits::oneof_uint32_extension, 601);
|
|
2822
|
+
message->MutableExtension(Traits::oneof_nested_message_extension)
|
|
2823
|
+
->set_bb(602);
|
|
2824
|
+
message->SetExtension(Traits::oneof_string_extension, "603");
|
|
2825
|
+
message->SetExtension(Traits::oneof_bytes_extension, "604");
|
|
2826
|
+
}
|
|
2827
|
+
|
|
2828
|
+
template <typename TestAllExtensions>
|
|
2829
|
+
void ModifyRepeatedExtensions(TestAllExtensions* message) {
|
|
2830
|
+
using Traits = TestUtilTraits<TestAllExtensions>;
|
|
2831
|
+
message->SetExtension(Traits::repeated_int32_extension, 1, 501);
|
|
2832
|
+
message->SetExtension(Traits::repeated_int64_extension, 1, 502);
|
|
2833
|
+
message->SetExtension(Traits::repeated_uint32_extension, 1, 503);
|
|
2834
|
+
message->SetExtension(Traits::repeated_uint64_extension, 1, 504);
|
|
2835
|
+
message->SetExtension(Traits::repeated_sint32_extension, 1, 505);
|
|
2836
|
+
message->SetExtension(Traits::repeated_sint64_extension, 1, 506);
|
|
2837
|
+
message->SetExtension(Traits::repeated_fixed32_extension, 1, 507);
|
|
2838
|
+
message->SetExtension(Traits::repeated_fixed64_extension, 1, 508);
|
|
2839
|
+
message->SetExtension(Traits::repeated_sfixed32_extension, 1, 509);
|
|
2840
|
+
message->SetExtension(Traits::repeated_sfixed64_extension, 1, 510);
|
|
2841
|
+
message->SetExtension(Traits::repeated_float_extension, 1, 511);
|
|
2842
|
+
message->SetExtension(Traits::repeated_double_extension, 1, 512);
|
|
2843
|
+
message->SetExtension(Traits::repeated_bool_extension, 1, true);
|
|
2844
|
+
message->SetExtension(Traits::repeated_string_extension, 1, "515");
|
|
2845
|
+
message->SetExtension(Traits::repeated_bytes_extension, 1, "516");
|
|
2846
|
+
|
|
2847
|
+
message->MutableExtension(Traits::repeatedgroup_extension, 1)->set_a(517);
|
|
2848
|
+
message->MutableExtension(Traits::repeated_nested_message_extension, 1)
|
|
2849
|
+
->set_bb(518);
|
|
2850
|
+
message->MutableExtension(Traits::repeated_foreign_message_extension, 1)
|
|
2851
|
+
->set_c(519);
|
|
2852
|
+
message->MutableExtension(Traits::repeated_import_message_extension, 1)
|
|
2853
|
+
->set_d(520);
|
|
2854
|
+
message->MutableExtension(Traits::repeated_lazy_message_extension, 1)
|
|
2855
|
+
->set_bb(527);
|
|
2856
|
+
|
|
2857
|
+
message->SetExtension(Traits::repeated_nested_enum_extension, 1,
|
|
2858
|
+
Traits::TestAllTypes::FOO);
|
|
2859
|
+
message->SetExtension(Traits::repeated_foreign_enum_extension, 1,
|
|
2860
|
+
Traits::FOREIGN_FOO);
|
|
2861
|
+
message->SetExtension(Traits::repeated_import_enum_extension, 1,
|
|
2862
|
+
Traits::IMPORT_FOO);
|
|
2863
|
+
|
|
2864
|
+
message->SetExtension(Traits::repeated_string_piece_extension, 1, "524");
|
|
2865
|
+
message->SetExtension(Traits::repeated_cord_extension, 1, "525");
|
|
2866
|
+
}
|
|
2867
|
+
|
|
2868
|
+
template <typename TestAllExtensions>
|
|
2869
|
+
void ExpectAllExtensionsSet(const TestAllExtensions& message) {
|
|
2870
|
+
using Traits = TestUtilTraits<TestAllExtensions>;
|
|
2871
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_int32_extension));
|
|
2872
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_int64_extension));
|
|
2873
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_uint32_extension));
|
|
2874
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_uint64_extension));
|
|
2875
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_sint32_extension));
|
|
2876
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_sint64_extension));
|
|
2877
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_fixed32_extension));
|
|
2878
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_fixed64_extension));
|
|
2879
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_sfixed32_extension));
|
|
2880
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_sfixed64_extension));
|
|
2881
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_float_extension));
|
|
2882
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_double_extension));
|
|
2883
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_bool_extension));
|
|
2884
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_string_extension));
|
|
2885
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_bytes_extension));
|
|
2886
|
+
|
|
2887
|
+
EXPECT_TRUE(message.HasExtension(Traits::optionalgroup_extension));
|
|
2888
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_nested_message_extension));
|
|
2889
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_foreign_message_extension));
|
|
2890
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_import_message_extension));
|
|
2891
|
+
EXPECT_TRUE(
|
|
2892
|
+
message.HasExtension(Traits::optional_public_import_message_extension));
|
|
2893
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_lazy_message_extension));
|
|
2894
|
+
EXPECT_TRUE(
|
|
2895
|
+
message.HasExtension(Traits::optional_unverified_lazy_message_extension));
|
|
2896
|
+
|
|
2897
|
+
EXPECT_TRUE(message.GetExtension(Traits::optionalgroup_extension).has_a());
|
|
2898
|
+
EXPECT_TRUE(
|
|
2899
|
+
message.GetExtension(Traits::optional_nested_message_extension).has_bb());
|
|
2900
|
+
EXPECT_TRUE(
|
|
2901
|
+
message.GetExtension(Traits::optional_foreign_message_extension).has_c());
|
|
2902
|
+
EXPECT_TRUE(
|
|
2903
|
+
message.GetExtension(Traits::optional_import_message_extension).has_d());
|
|
2904
|
+
EXPECT_TRUE(
|
|
2905
|
+
message.GetExtension(Traits::optional_public_import_message_extension)
|
|
2906
|
+
.has_e());
|
|
2907
|
+
EXPECT_TRUE(
|
|
2908
|
+
message.GetExtension(Traits::optional_lazy_message_extension).has_bb());
|
|
2909
|
+
EXPECT_TRUE(
|
|
2910
|
+
message.GetExtension(Traits::optional_unverified_lazy_message_extension)
|
|
2911
|
+
.has_bb());
|
|
2912
|
+
|
|
2913
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_nested_enum_extension));
|
|
2914
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_foreign_enum_extension));
|
|
2915
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_import_enum_extension));
|
|
2916
|
+
|
|
2917
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_string_piece_extension));
|
|
2918
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_cord_extension));
|
|
2919
|
+
EXPECT_TRUE(message.HasExtension(Traits::optional_bytes_cord_extension));
|
|
2920
|
+
|
|
2921
|
+
EXPECT_EQ(101, message.GetExtension(Traits::optional_int32_extension));
|
|
2922
|
+
EXPECT_EQ(102, message.GetExtension(Traits::optional_int64_extension));
|
|
2923
|
+
EXPECT_EQ(103, message.GetExtension(Traits::optional_uint32_extension));
|
|
2924
|
+
EXPECT_EQ(104, message.GetExtension(Traits::optional_uint64_extension));
|
|
2925
|
+
EXPECT_EQ(105, message.GetExtension(Traits::optional_sint32_extension));
|
|
2926
|
+
EXPECT_EQ(106, message.GetExtension(Traits::optional_sint64_extension));
|
|
2927
|
+
EXPECT_EQ(107, message.GetExtension(Traits::optional_fixed32_extension));
|
|
2928
|
+
EXPECT_EQ(108, message.GetExtension(Traits::optional_fixed64_extension));
|
|
2929
|
+
EXPECT_EQ(109, message.GetExtension(Traits::optional_sfixed32_extension));
|
|
2930
|
+
EXPECT_EQ(110, message.GetExtension(Traits::optional_sfixed64_extension));
|
|
2931
|
+
EXPECT_EQ(111, message.GetExtension(Traits::optional_float_extension));
|
|
2932
|
+
EXPECT_EQ(112, message.GetExtension(Traits::optional_double_extension));
|
|
2933
|
+
EXPECT_TRUE(message.GetExtension(Traits::optional_bool_extension));
|
|
2934
|
+
EXPECT_EQ("115", message.GetExtension(Traits::optional_string_extension));
|
|
2935
|
+
EXPECT_EQ("116", message.GetExtension(Traits::optional_bytes_extension));
|
|
2936
|
+
|
|
2937
|
+
EXPECT_EQ(117, message.GetExtension(Traits::optionalgroup_extension).a());
|
|
2938
|
+
EXPECT_EQ(
|
|
2939
|
+
118,
|
|
2940
|
+
message.GetExtension(Traits::optional_nested_message_extension).bb());
|
|
2941
|
+
EXPECT_EQ(
|
|
2942
|
+
119,
|
|
2943
|
+
message.GetExtension(Traits::optional_foreign_message_extension).c());
|
|
2944
|
+
EXPECT_EQ(
|
|
2945
|
+
120, message.GetExtension(Traits::optional_import_message_extension).d());
|
|
2946
|
+
|
|
2947
|
+
EXPECT_EQ(Traits::TestAllTypes::BAZ,
|
|
2948
|
+
message.GetExtension(Traits::optional_nested_enum_extension));
|
|
2949
|
+
EXPECT_EQ(Traits::FOREIGN_BAZ,
|
|
2950
|
+
message.GetExtension(Traits::optional_foreign_enum_extension));
|
|
2951
|
+
EXPECT_EQ(Traits::IMPORT_BAZ,
|
|
2952
|
+
message.GetExtension(Traits::optional_import_enum_extension));
|
|
2953
|
+
|
|
2954
|
+
EXPECT_EQ("124",
|
|
2955
|
+
message.GetExtension(Traits::optional_string_piece_extension));
|
|
2956
|
+
EXPECT_EQ("125", message.GetExtension(Traits::optional_cord_extension));
|
|
2957
|
+
EXPECT_EQ("optional bytes cord",
|
|
2958
|
+
message.GetExtension(Traits::optional_bytes_cord_extension));
|
|
2959
|
+
EXPECT_EQ(
|
|
2960
|
+
126,
|
|
2961
|
+
message.GetExtension(Traits::optional_public_import_message_extension)
|
|
2962
|
+
.e());
|
|
2963
|
+
EXPECT_EQ(127,
|
|
2964
|
+
message.GetExtension(Traits::optional_lazy_message_extension).bb());
|
|
2965
|
+
EXPECT_EQ(
|
|
2966
|
+
128,
|
|
2967
|
+
message.GetExtension(Traits::optional_unverified_lazy_message_extension)
|
|
2968
|
+
.bb());
|
|
2969
|
+
|
|
2970
|
+
// -----------------------------------------------------------------
|
|
2971
|
+
|
|
2972
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_int32_extension));
|
|
2973
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_int64_extension));
|
|
2974
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_uint32_extension));
|
|
2975
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_uint64_extension));
|
|
2976
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sint32_extension));
|
|
2977
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sint64_extension));
|
|
2978
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_fixed32_extension));
|
|
2979
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_fixed64_extension));
|
|
2980
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sfixed32_extension));
|
|
2981
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sfixed64_extension));
|
|
2982
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_float_extension));
|
|
2983
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_double_extension));
|
|
2984
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_bool_extension));
|
|
2985
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_string_extension));
|
|
2986
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_bytes_extension));
|
|
2987
|
+
|
|
2988
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeatedgroup_extension));
|
|
2989
|
+
ASSERT_EQ(2,
|
|
2990
|
+
message.ExtensionSize(Traits::repeated_nested_message_extension));
|
|
2991
|
+
ASSERT_EQ(2,
|
|
2992
|
+
message.ExtensionSize(Traits::repeated_foreign_message_extension));
|
|
2993
|
+
ASSERT_EQ(2,
|
|
2994
|
+
message.ExtensionSize(Traits::repeated_import_message_extension));
|
|
2995
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_lazy_message_extension));
|
|
2996
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_nested_enum_extension));
|
|
2997
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_foreign_enum_extension));
|
|
2998
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_import_enum_extension));
|
|
2999
|
+
|
|
3000
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_string_piece_extension));
|
|
3001
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_cord_extension));
|
|
3002
|
+
|
|
3003
|
+
EXPECT_EQ(201, message.GetExtension(Traits::repeated_int32_extension, 0));
|
|
3004
|
+
EXPECT_EQ(202, message.GetExtension(Traits::repeated_int64_extension, 0));
|
|
3005
|
+
EXPECT_EQ(203, message.GetExtension(Traits::repeated_uint32_extension, 0));
|
|
3006
|
+
EXPECT_EQ(204, message.GetExtension(Traits::repeated_uint64_extension, 0));
|
|
3007
|
+
EXPECT_EQ(205, message.GetExtension(Traits::repeated_sint32_extension, 0));
|
|
3008
|
+
EXPECT_EQ(206, message.GetExtension(Traits::repeated_sint64_extension, 0));
|
|
3009
|
+
EXPECT_EQ(207, message.GetExtension(Traits::repeated_fixed32_extension, 0));
|
|
3010
|
+
EXPECT_EQ(208, message.GetExtension(Traits::repeated_fixed64_extension, 0));
|
|
3011
|
+
EXPECT_EQ(209, message.GetExtension(Traits::repeated_sfixed32_extension, 0));
|
|
3012
|
+
EXPECT_EQ(210, message.GetExtension(Traits::repeated_sfixed64_extension, 0));
|
|
3013
|
+
EXPECT_EQ(211, message.GetExtension(Traits::repeated_float_extension, 0));
|
|
3014
|
+
EXPECT_EQ(212, message.GetExtension(Traits::repeated_double_extension, 0));
|
|
3015
|
+
EXPECT_TRUE(message.GetExtension(Traits::repeated_bool_extension, 0));
|
|
3016
|
+
EXPECT_EQ("215", message.GetExtension(Traits::repeated_string_extension, 0));
|
|
3017
|
+
EXPECT_EQ("216", message.GetExtension(Traits::repeated_bytes_extension, 0));
|
|
3018
|
+
|
|
3019
|
+
EXPECT_EQ(217, message.GetExtension(Traits::repeatedgroup_extension, 0).a());
|
|
3020
|
+
EXPECT_EQ(
|
|
3021
|
+
218,
|
|
3022
|
+
message.GetExtension(Traits::repeated_nested_message_extension, 0).bb());
|
|
3023
|
+
EXPECT_EQ(
|
|
3024
|
+
219,
|
|
3025
|
+
message.GetExtension(Traits::repeated_foreign_message_extension, 0).c());
|
|
3026
|
+
EXPECT_EQ(
|
|
3027
|
+
220,
|
|
3028
|
+
message.GetExtension(Traits::repeated_import_message_extension, 0).d());
|
|
3029
|
+
EXPECT_EQ(
|
|
3030
|
+
227,
|
|
3031
|
+
message.GetExtension(Traits::repeated_lazy_message_extension, 0).bb());
|
|
3032
|
+
|
|
3033
|
+
EXPECT_EQ(Traits::TestAllTypes::BAR,
|
|
3034
|
+
message.GetExtension(Traits::repeated_nested_enum_extension, 0));
|
|
3035
|
+
EXPECT_EQ(Traits::FOREIGN_BAR,
|
|
3036
|
+
message.GetExtension(Traits::repeated_foreign_enum_extension, 0));
|
|
3037
|
+
EXPECT_EQ(Traits::IMPORT_BAR,
|
|
3038
|
+
message.GetExtension(Traits::repeated_import_enum_extension, 0));
|
|
3039
|
+
|
|
3040
|
+
EXPECT_EQ("224",
|
|
3041
|
+
message.GetExtension(Traits::repeated_string_piece_extension, 0));
|
|
3042
|
+
EXPECT_EQ("225", message.GetExtension(Traits::repeated_cord_extension, 0));
|
|
3043
|
+
|
|
3044
|
+
EXPECT_EQ(301, message.GetExtension(Traits::repeated_int32_extension, 1));
|
|
3045
|
+
EXPECT_EQ(302, message.GetExtension(Traits::repeated_int64_extension, 1));
|
|
3046
|
+
EXPECT_EQ(303, message.GetExtension(Traits::repeated_uint32_extension, 1));
|
|
3047
|
+
EXPECT_EQ(304, message.GetExtension(Traits::repeated_uint64_extension, 1));
|
|
3048
|
+
EXPECT_EQ(305, message.GetExtension(Traits::repeated_sint32_extension, 1));
|
|
3049
|
+
EXPECT_EQ(306, message.GetExtension(Traits::repeated_sint64_extension, 1));
|
|
3050
|
+
EXPECT_EQ(307, message.GetExtension(Traits::repeated_fixed32_extension, 1));
|
|
3051
|
+
EXPECT_EQ(308, message.GetExtension(Traits::repeated_fixed64_extension, 1));
|
|
3052
|
+
EXPECT_EQ(309, message.GetExtension(Traits::repeated_sfixed32_extension, 1));
|
|
3053
|
+
EXPECT_EQ(310, message.GetExtension(Traits::repeated_sfixed64_extension, 1));
|
|
3054
|
+
EXPECT_EQ(311, message.GetExtension(Traits::repeated_float_extension, 1));
|
|
3055
|
+
EXPECT_EQ(312, message.GetExtension(Traits::repeated_double_extension, 1));
|
|
3056
|
+
EXPECT_FALSE(message.GetExtension(Traits::repeated_bool_extension, 1));
|
|
3057
|
+
EXPECT_EQ("315", message.GetExtension(Traits::repeated_string_extension, 1));
|
|
3058
|
+
EXPECT_EQ("316", message.GetExtension(Traits::repeated_bytes_extension, 1));
|
|
3059
|
+
|
|
3060
|
+
EXPECT_EQ(317, message.GetExtension(Traits::repeatedgroup_extension, 1).a());
|
|
3061
|
+
EXPECT_EQ(
|
|
3062
|
+
318,
|
|
3063
|
+
message.GetExtension(Traits::repeated_nested_message_extension, 1).bb());
|
|
3064
|
+
EXPECT_EQ(
|
|
3065
|
+
319,
|
|
3066
|
+
message.GetExtension(Traits::repeated_foreign_message_extension, 1).c());
|
|
3067
|
+
EXPECT_EQ(
|
|
3068
|
+
320,
|
|
3069
|
+
message.GetExtension(Traits::repeated_import_message_extension, 1).d());
|
|
3070
|
+
EXPECT_EQ(
|
|
3071
|
+
327,
|
|
3072
|
+
message.GetExtension(Traits::repeated_lazy_message_extension, 1).bb());
|
|
3073
|
+
|
|
3074
|
+
EXPECT_EQ(Traits::TestAllTypes::BAZ,
|
|
3075
|
+
message.GetExtension(Traits::repeated_nested_enum_extension, 1));
|
|
3076
|
+
EXPECT_EQ(Traits::FOREIGN_BAZ,
|
|
3077
|
+
message.GetExtension(Traits::repeated_foreign_enum_extension, 1));
|
|
3078
|
+
EXPECT_EQ(Traits::IMPORT_BAZ,
|
|
3079
|
+
message.GetExtension(Traits::repeated_import_enum_extension, 1));
|
|
3080
|
+
|
|
3081
|
+
EXPECT_EQ("324",
|
|
3082
|
+
message.GetExtension(Traits::repeated_string_piece_extension, 1));
|
|
3083
|
+
EXPECT_EQ("325", message.GetExtension(Traits::repeated_cord_extension, 1));
|
|
3084
|
+
|
|
3085
|
+
// -----------------------------------------------------------------
|
|
3086
|
+
|
|
3087
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_int32_extension));
|
|
3088
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_int64_extension));
|
|
3089
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_uint32_extension));
|
|
3090
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_uint64_extension));
|
|
3091
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_sint32_extension));
|
|
3092
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_sint64_extension));
|
|
3093
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_fixed32_extension));
|
|
3094
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_fixed64_extension));
|
|
3095
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_sfixed32_extension));
|
|
3096
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_sfixed64_extension));
|
|
3097
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_float_extension));
|
|
3098
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_double_extension));
|
|
3099
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_bool_extension));
|
|
3100
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_string_extension));
|
|
3101
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_bytes_extension));
|
|
3102
|
+
|
|
3103
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_nested_enum_extension));
|
|
3104
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_foreign_enum_extension));
|
|
3105
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_import_enum_extension));
|
|
3106
|
+
|
|
3107
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_string_piece_extension));
|
|
3108
|
+
EXPECT_TRUE(message.HasExtension(Traits::default_cord_extension));
|
|
3109
|
+
|
|
3110
|
+
EXPECT_EQ(401, message.GetExtension(Traits::default_int32_extension));
|
|
3111
|
+
EXPECT_EQ(402, message.GetExtension(Traits::default_int64_extension));
|
|
3112
|
+
EXPECT_EQ(403, message.GetExtension(Traits::default_uint32_extension));
|
|
3113
|
+
EXPECT_EQ(404, message.GetExtension(Traits::default_uint64_extension));
|
|
3114
|
+
EXPECT_EQ(405, message.GetExtension(Traits::default_sint32_extension));
|
|
3115
|
+
EXPECT_EQ(406, message.GetExtension(Traits::default_sint64_extension));
|
|
3116
|
+
EXPECT_EQ(407, message.GetExtension(Traits::default_fixed32_extension));
|
|
3117
|
+
EXPECT_EQ(408, message.GetExtension(Traits::default_fixed64_extension));
|
|
3118
|
+
EXPECT_EQ(409, message.GetExtension(Traits::default_sfixed32_extension));
|
|
3119
|
+
EXPECT_EQ(410, message.GetExtension(Traits::default_sfixed64_extension));
|
|
3120
|
+
EXPECT_EQ(411, message.GetExtension(Traits::default_float_extension));
|
|
3121
|
+
EXPECT_EQ(412, message.GetExtension(Traits::default_double_extension));
|
|
3122
|
+
EXPECT_FALSE(message.GetExtension(Traits::default_bool_extension));
|
|
3123
|
+
EXPECT_EQ("415", message.GetExtension(Traits::default_string_extension));
|
|
3124
|
+
EXPECT_EQ("416", message.GetExtension(Traits::default_bytes_extension));
|
|
3125
|
+
|
|
3126
|
+
EXPECT_EQ(Traits::TestAllTypes::FOO,
|
|
3127
|
+
message.GetExtension(Traits::default_nested_enum_extension));
|
|
3128
|
+
EXPECT_EQ(Traits::FOREIGN_FOO,
|
|
3129
|
+
message.GetExtension(Traits::default_foreign_enum_extension));
|
|
3130
|
+
EXPECT_EQ(Traits::IMPORT_FOO,
|
|
3131
|
+
message.GetExtension(Traits::default_import_enum_extension));
|
|
3132
|
+
|
|
3133
|
+
EXPECT_EQ("424",
|
|
3134
|
+
message.GetExtension(Traits::default_string_piece_extension));
|
|
3135
|
+
EXPECT_EQ("425", message.GetExtension(Traits::default_cord_extension));
|
|
3136
|
+
|
|
3137
|
+
EXPECT_TRUE(message.HasExtension(Traits::oneof_uint32_extension));
|
|
3138
|
+
EXPECT_TRUE(
|
|
3139
|
+
message.GetExtension(Traits::oneof_nested_message_extension).has_bb());
|
|
3140
|
+
EXPECT_TRUE(message.HasExtension(Traits::oneof_string_extension));
|
|
3141
|
+
EXPECT_TRUE(message.HasExtension(Traits::oneof_bytes_extension));
|
|
3142
|
+
|
|
3143
|
+
EXPECT_EQ(601, message.GetExtension(Traits::oneof_uint32_extension));
|
|
3144
|
+
EXPECT_EQ(602,
|
|
3145
|
+
message.GetExtension(Traits::oneof_nested_message_extension).bb());
|
|
3146
|
+
EXPECT_EQ("603", message.GetExtension(Traits::oneof_string_extension));
|
|
3147
|
+
EXPECT_EQ("604", message.GetExtension(Traits::oneof_bytes_extension));
|
|
3148
|
+
}
|
|
3149
|
+
|
|
3150
|
+
template <typename TestAllExtensions>
|
|
3151
|
+
void ExpectExtensionsClear(const TestAllExtensions& message) {
|
|
3152
|
+
using Traits = TestUtilTraits<TestAllExtensions>;
|
|
3153
|
+
std::string serialized;
|
|
3154
|
+
ASSERT_TRUE(message.SerializeToString(&serialized));
|
|
3155
|
+
EXPECT_EQ("", serialized);
|
|
3156
|
+
EXPECT_EQ(0, message.ByteSizeLong());
|
|
3157
|
+
|
|
3158
|
+
// has_blah() should initially be false for all optional fields.
|
|
3159
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_int32_extension));
|
|
3160
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_int64_extension));
|
|
3161
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_uint32_extension));
|
|
3162
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_uint64_extension));
|
|
3163
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_sint32_extension));
|
|
3164
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_sint64_extension));
|
|
3165
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_fixed32_extension));
|
|
3166
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_fixed64_extension));
|
|
3167
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_sfixed32_extension));
|
|
3168
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_sfixed64_extension));
|
|
3169
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_float_extension));
|
|
3170
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_double_extension));
|
|
3171
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_bool_extension));
|
|
3172
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_string_extension));
|
|
3173
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_bytes_extension));
|
|
3174
|
+
|
|
3175
|
+
EXPECT_FALSE(message.HasExtension(Traits::optionalgroup_extension));
|
|
3176
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_nested_message_extension));
|
|
3177
|
+
EXPECT_FALSE(
|
|
3178
|
+
message.HasExtension(Traits::optional_foreign_message_extension));
|
|
3179
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_import_message_extension));
|
|
3180
|
+
EXPECT_FALSE(
|
|
3181
|
+
message.HasExtension(Traits::optional_public_import_message_extension));
|
|
3182
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_lazy_message_extension));
|
|
3183
|
+
EXPECT_FALSE(
|
|
3184
|
+
message.HasExtension(Traits::optional_unverified_lazy_message_extension));
|
|
3185
|
+
|
|
3186
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_nested_enum_extension));
|
|
3187
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_foreign_enum_extension));
|
|
3188
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_import_enum_extension));
|
|
3189
|
+
|
|
3190
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_string_piece_extension));
|
|
3191
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_cord_extension));
|
|
3192
|
+
EXPECT_FALSE(message.HasExtension(Traits::optional_bytes_cord_extension));
|
|
3193
|
+
|
|
3194
|
+
// Optional fields without defaults are set to zero or something like it.
|
|
3195
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_int32_extension));
|
|
3196
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_int64_extension));
|
|
3197
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_uint32_extension));
|
|
3198
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_uint64_extension));
|
|
3199
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_sint32_extension));
|
|
3200
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_sint64_extension));
|
|
3201
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_fixed32_extension));
|
|
3202
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_fixed64_extension));
|
|
3203
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_sfixed32_extension));
|
|
3204
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_sfixed64_extension));
|
|
3205
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_float_extension));
|
|
3206
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optional_double_extension));
|
|
3207
|
+
EXPECT_FALSE(message.GetExtension(Traits::optional_bool_extension));
|
|
3208
|
+
EXPECT_EQ("", message.GetExtension(Traits::optional_string_extension));
|
|
3209
|
+
EXPECT_EQ("", message.GetExtension(Traits::optional_bytes_extension));
|
|
3210
|
+
|
|
3211
|
+
// Embedded messages should also be clear.
|
|
3212
|
+
EXPECT_FALSE(message.GetExtension(Traits::optionalgroup_extension).has_a());
|
|
3213
|
+
EXPECT_FALSE(
|
|
3214
|
+
message.GetExtension(Traits::optional_nested_message_extension).has_bb());
|
|
3215
|
+
EXPECT_FALSE(
|
|
3216
|
+
message.GetExtension(Traits::optional_foreign_message_extension).has_c());
|
|
3217
|
+
EXPECT_FALSE(
|
|
3218
|
+
message.GetExtension(Traits::optional_import_message_extension).has_d());
|
|
3219
|
+
EXPECT_FALSE(
|
|
3220
|
+
message.GetExtension(Traits::optional_public_import_message_extension)
|
|
3221
|
+
.has_e());
|
|
3222
|
+
EXPECT_FALSE(
|
|
3223
|
+
message.GetExtension(Traits::optional_lazy_message_extension).has_bb());
|
|
3224
|
+
EXPECT_FALSE(
|
|
3225
|
+
message.GetExtension(Traits::optional_unverified_lazy_message_extension)
|
|
3226
|
+
.has_bb());
|
|
3227
|
+
|
|
3228
|
+
EXPECT_EQ(0, message.GetExtension(Traits::optionalgroup_extension).a());
|
|
3229
|
+
EXPECT_EQ(
|
|
3230
|
+
0, message.GetExtension(Traits::optional_nested_message_extension).bb());
|
|
3231
|
+
EXPECT_EQ(
|
|
3232
|
+
0, message.GetExtension(Traits::optional_foreign_message_extension).c());
|
|
3233
|
+
EXPECT_EQ(
|
|
3234
|
+
0, message.GetExtension(Traits::optional_import_message_extension).d());
|
|
3235
|
+
EXPECT_EQ(
|
|
3236
|
+
0, message.GetExtension(Traits::optional_public_import_message_extension)
|
|
3237
|
+
.e());
|
|
3238
|
+
EXPECT_EQ(0,
|
|
3239
|
+
message.GetExtension(Traits::optional_lazy_message_extension).bb());
|
|
3240
|
+
EXPECT_EQ(
|
|
3241
|
+
0,
|
|
3242
|
+
message.GetExtension(Traits::optional_unverified_lazy_message_extension)
|
|
3243
|
+
.bb());
|
|
3244
|
+
|
|
3245
|
+
// Enums without defaults are set to the first value in the enum.
|
|
3246
|
+
EXPECT_EQ(Traits::TestAllTypes::FOO,
|
|
3247
|
+
message.GetExtension(Traits::optional_nested_enum_extension));
|
|
3248
|
+
EXPECT_EQ(Traits::FOREIGN_FOO,
|
|
3249
|
+
message.GetExtension(Traits::optional_foreign_enum_extension));
|
|
3250
|
+
EXPECT_EQ(Traits::IMPORT_FOO,
|
|
3251
|
+
message.GetExtension(Traits::optional_import_enum_extension));
|
|
3252
|
+
|
|
3253
|
+
EXPECT_EQ("", message.GetExtension(Traits::optional_string_piece_extension));
|
|
3254
|
+
EXPECT_EQ("", message.GetExtension(Traits::optional_cord_extension));
|
|
3255
|
+
EXPECT_EQ("", message.GetExtension(Traits::optional_bytes_cord_extension));
|
|
3256
|
+
|
|
3257
|
+
// Repeated fields are empty.
|
|
3258
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_int32_extension));
|
|
3259
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_int64_extension));
|
|
3260
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_uint32_extension));
|
|
3261
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_uint64_extension));
|
|
3262
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_sint32_extension));
|
|
3263
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_sint64_extension));
|
|
3264
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_fixed32_extension));
|
|
3265
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_fixed64_extension));
|
|
3266
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_sfixed32_extension));
|
|
3267
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_sfixed64_extension));
|
|
3268
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_float_extension));
|
|
3269
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_double_extension));
|
|
3270
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_bool_extension));
|
|
3271
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_string_extension));
|
|
3272
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_bytes_extension));
|
|
3273
|
+
|
|
3274
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeatedgroup_extension));
|
|
3275
|
+
EXPECT_EQ(0,
|
|
3276
|
+
message.ExtensionSize(Traits::repeated_nested_message_extension));
|
|
3277
|
+
EXPECT_EQ(0,
|
|
3278
|
+
message.ExtensionSize(Traits::repeated_foreign_message_extension));
|
|
3279
|
+
EXPECT_EQ(0,
|
|
3280
|
+
message.ExtensionSize(Traits::repeated_import_message_extension));
|
|
3281
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_lazy_message_extension));
|
|
3282
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_nested_enum_extension));
|
|
3283
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_foreign_enum_extension));
|
|
3284
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_import_enum_extension));
|
|
3285
|
+
|
|
3286
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_string_piece_extension));
|
|
3287
|
+
EXPECT_EQ(0, message.ExtensionSize(Traits::repeated_cord_extension));
|
|
3288
|
+
|
|
3289
|
+
// has_blah() should also be false for all default fields.
|
|
3290
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_int32_extension));
|
|
3291
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_int64_extension));
|
|
3292
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_uint32_extension));
|
|
3293
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_uint64_extension));
|
|
3294
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_sint32_extension));
|
|
3295
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_sint64_extension));
|
|
3296
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_fixed32_extension));
|
|
3297
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_fixed64_extension));
|
|
3298
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_sfixed32_extension));
|
|
3299
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_sfixed64_extension));
|
|
3300
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_float_extension));
|
|
3301
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_double_extension));
|
|
3302
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_bool_extension));
|
|
3303
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_string_extension));
|
|
3304
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_bytes_extension));
|
|
3305
|
+
|
|
3306
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_nested_enum_extension));
|
|
3307
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_foreign_enum_extension));
|
|
3308
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_import_enum_extension));
|
|
3309
|
+
|
|
3310
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_string_piece_extension));
|
|
3311
|
+
EXPECT_FALSE(message.HasExtension(Traits::default_cord_extension));
|
|
3312
|
+
|
|
3313
|
+
// Fields with defaults have their default values (duh).
|
|
3314
|
+
EXPECT_EQ(41, message.GetExtension(Traits::default_int32_extension));
|
|
3315
|
+
EXPECT_EQ(42, message.GetExtension(Traits::default_int64_extension));
|
|
3316
|
+
EXPECT_EQ(43, message.GetExtension(Traits::default_uint32_extension));
|
|
3317
|
+
EXPECT_EQ(44, message.GetExtension(Traits::default_uint64_extension));
|
|
3318
|
+
EXPECT_EQ(-45, message.GetExtension(Traits::default_sint32_extension));
|
|
3319
|
+
EXPECT_EQ(46, message.GetExtension(Traits::default_sint64_extension));
|
|
3320
|
+
EXPECT_EQ(47, message.GetExtension(Traits::default_fixed32_extension));
|
|
3321
|
+
EXPECT_EQ(48, message.GetExtension(Traits::default_fixed64_extension));
|
|
3322
|
+
EXPECT_EQ(49, message.GetExtension(Traits::default_sfixed32_extension));
|
|
3323
|
+
EXPECT_EQ(-50, message.GetExtension(Traits::default_sfixed64_extension));
|
|
3324
|
+
EXPECT_EQ(51.5, message.GetExtension(Traits::default_float_extension));
|
|
3325
|
+
EXPECT_EQ(52e3, message.GetExtension(Traits::default_double_extension));
|
|
3326
|
+
EXPECT_TRUE(message.GetExtension(Traits::default_bool_extension));
|
|
3327
|
+
EXPECT_EQ("hello", message.GetExtension(Traits::default_string_extension));
|
|
3328
|
+
EXPECT_EQ("world", message.GetExtension(Traits::default_bytes_extension));
|
|
3329
|
+
|
|
3330
|
+
EXPECT_EQ(Traits::TestAllTypes::BAR,
|
|
3331
|
+
message.GetExtension(Traits::default_nested_enum_extension));
|
|
3332
|
+
EXPECT_EQ(Traits::FOREIGN_BAR,
|
|
3333
|
+
message.GetExtension(Traits::default_foreign_enum_extension));
|
|
3334
|
+
EXPECT_EQ(Traits::IMPORT_BAR,
|
|
3335
|
+
message.GetExtension(Traits::default_import_enum_extension));
|
|
3336
|
+
|
|
3337
|
+
EXPECT_EQ("abc",
|
|
3338
|
+
message.GetExtension(Traits::default_string_piece_extension));
|
|
3339
|
+
EXPECT_EQ("123", message.GetExtension(Traits::default_cord_extension));
|
|
3340
|
+
|
|
3341
|
+
EXPECT_FALSE(message.HasExtension(Traits::oneof_uint32_extension));
|
|
3342
|
+
EXPECT_FALSE(
|
|
3343
|
+
message.GetExtension(Traits::oneof_nested_message_extension).has_bb());
|
|
3344
|
+
EXPECT_FALSE(message.HasExtension(Traits::oneof_string_extension));
|
|
3345
|
+
EXPECT_FALSE(message.HasExtension(Traits::oneof_bytes_extension));
|
|
3346
|
+
}
|
|
3347
|
+
|
|
3348
|
+
template <typename TestAllExtensions>
|
|
3349
|
+
void ExpectRepeatedExtensionsModified(const TestAllExtensions& message) {
|
|
3350
|
+
using Traits = TestUtilTraits<TestAllExtensions>;
|
|
3351
|
+
// ModifyRepeatedFields only sets the second repeated element of each
|
|
3352
|
+
// field. In addition to verifying this, we also verify that the first
|
|
3353
|
+
// element and size were *not* modified.
|
|
3354
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_int32_extension));
|
|
3355
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_int64_extension));
|
|
3356
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_uint32_extension));
|
|
3357
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_uint64_extension));
|
|
3358
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sint32_extension));
|
|
3359
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sint64_extension));
|
|
3360
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_fixed32_extension));
|
|
3361
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_fixed64_extension));
|
|
3362
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sfixed32_extension));
|
|
3363
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sfixed64_extension));
|
|
3364
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_float_extension));
|
|
3365
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_double_extension));
|
|
3366
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_bool_extension));
|
|
3367
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_string_extension));
|
|
3368
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_bytes_extension));
|
|
3369
|
+
|
|
3370
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeatedgroup_extension));
|
|
3371
|
+
ASSERT_EQ(2,
|
|
3372
|
+
message.ExtensionSize(Traits::repeated_nested_message_extension));
|
|
3373
|
+
ASSERT_EQ(2,
|
|
3374
|
+
message.ExtensionSize(Traits::repeated_foreign_message_extension));
|
|
3375
|
+
ASSERT_EQ(2,
|
|
3376
|
+
message.ExtensionSize(Traits::repeated_import_message_extension));
|
|
3377
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_lazy_message_extension));
|
|
3378
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_nested_enum_extension));
|
|
3379
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_foreign_enum_extension));
|
|
3380
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_import_enum_extension));
|
|
3381
|
+
|
|
3382
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_string_piece_extension));
|
|
3383
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_cord_extension));
|
|
3384
|
+
|
|
3385
|
+
EXPECT_EQ(201, message.GetExtension(Traits::repeated_int32_extension, 0));
|
|
3386
|
+
EXPECT_EQ(202, message.GetExtension(Traits::repeated_int64_extension, 0));
|
|
3387
|
+
EXPECT_EQ(203, message.GetExtension(Traits::repeated_uint32_extension, 0));
|
|
3388
|
+
EXPECT_EQ(204, message.GetExtension(Traits::repeated_uint64_extension, 0));
|
|
3389
|
+
EXPECT_EQ(205, message.GetExtension(Traits::repeated_sint32_extension, 0));
|
|
3390
|
+
EXPECT_EQ(206, message.GetExtension(Traits::repeated_sint64_extension, 0));
|
|
3391
|
+
EXPECT_EQ(207, message.GetExtension(Traits::repeated_fixed32_extension, 0));
|
|
3392
|
+
EXPECT_EQ(208, message.GetExtension(Traits::repeated_fixed64_extension, 0));
|
|
3393
|
+
EXPECT_EQ(209, message.GetExtension(Traits::repeated_sfixed32_extension, 0));
|
|
3394
|
+
EXPECT_EQ(210, message.GetExtension(Traits::repeated_sfixed64_extension, 0));
|
|
3395
|
+
EXPECT_EQ(211, message.GetExtension(Traits::repeated_float_extension, 0));
|
|
3396
|
+
EXPECT_EQ(212, message.GetExtension(Traits::repeated_double_extension, 0));
|
|
3397
|
+
EXPECT_TRUE(message.GetExtension(Traits::repeated_bool_extension, 0));
|
|
3398
|
+
EXPECT_EQ("215", message.GetExtension(Traits::repeated_string_extension, 0));
|
|
3399
|
+
EXPECT_EQ("216", message.GetExtension(Traits::repeated_bytes_extension, 0));
|
|
3400
|
+
|
|
3401
|
+
EXPECT_EQ(217, message.GetExtension(Traits::repeatedgroup_extension, 0).a());
|
|
3402
|
+
EXPECT_EQ(
|
|
3403
|
+
218,
|
|
3404
|
+
message.GetExtension(Traits::repeated_nested_message_extension, 0).bb());
|
|
3405
|
+
EXPECT_EQ(
|
|
3406
|
+
219,
|
|
3407
|
+
message.GetExtension(Traits::repeated_foreign_message_extension, 0).c());
|
|
3408
|
+
EXPECT_EQ(
|
|
3409
|
+
220,
|
|
3410
|
+
message.GetExtension(Traits::repeated_import_message_extension, 0).d());
|
|
3411
|
+
EXPECT_EQ(
|
|
3412
|
+
227,
|
|
3413
|
+
message.GetExtension(Traits::repeated_lazy_message_extension, 0).bb());
|
|
3414
|
+
|
|
3415
|
+
EXPECT_EQ(Traits::TestAllTypes::BAR,
|
|
3416
|
+
message.GetExtension(Traits::repeated_nested_enum_extension, 0));
|
|
3417
|
+
EXPECT_EQ(Traits::FOREIGN_BAR,
|
|
3418
|
+
message.GetExtension(Traits::repeated_foreign_enum_extension, 0));
|
|
3419
|
+
EXPECT_EQ(Traits::IMPORT_BAR,
|
|
3420
|
+
message.GetExtension(Traits::repeated_import_enum_extension, 0));
|
|
3421
|
+
|
|
3422
|
+
EXPECT_EQ("224",
|
|
3423
|
+
message.GetExtension(Traits::repeated_string_piece_extension, 0));
|
|
3424
|
+
EXPECT_EQ("225", message.GetExtension(Traits::repeated_cord_extension, 0));
|
|
3425
|
+
|
|
3426
|
+
// Actually verify the second (modified) elements now.
|
|
3427
|
+
EXPECT_EQ(501, message.GetExtension(Traits::repeated_int32_extension, 1));
|
|
3428
|
+
EXPECT_EQ(502, message.GetExtension(Traits::repeated_int64_extension, 1));
|
|
3429
|
+
EXPECT_EQ(503, message.GetExtension(Traits::repeated_uint32_extension, 1));
|
|
3430
|
+
EXPECT_EQ(504, message.GetExtension(Traits::repeated_uint64_extension, 1));
|
|
3431
|
+
EXPECT_EQ(505, message.GetExtension(Traits::repeated_sint32_extension, 1));
|
|
3432
|
+
EXPECT_EQ(506, message.GetExtension(Traits::repeated_sint64_extension, 1));
|
|
3433
|
+
EXPECT_EQ(507, message.GetExtension(Traits::repeated_fixed32_extension, 1));
|
|
3434
|
+
EXPECT_EQ(508, message.GetExtension(Traits::repeated_fixed64_extension, 1));
|
|
3435
|
+
EXPECT_EQ(509, message.GetExtension(Traits::repeated_sfixed32_extension, 1));
|
|
3436
|
+
EXPECT_EQ(510, message.GetExtension(Traits::repeated_sfixed64_extension, 1));
|
|
3437
|
+
EXPECT_EQ(511, message.GetExtension(Traits::repeated_float_extension, 1));
|
|
3438
|
+
EXPECT_EQ(512, message.GetExtension(Traits::repeated_double_extension, 1));
|
|
3439
|
+
EXPECT_TRUE(message.GetExtension(Traits::repeated_bool_extension, 1));
|
|
3440
|
+
EXPECT_EQ("515", message.GetExtension(Traits::repeated_string_extension, 1));
|
|
3441
|
+
EXPECT_EQ("516", message.GetExtension(Traits::repeated_bytes_extension, 1));
|
|
3442
|
+
|
|
3443
|
+
EXPECT_EQ(517, message.GetExtension(Traits::repeatedgroup_extension, 1).a());
|
|
3444
|
+
EXPECT_EQ(
|
|
3445
|
+
518,
|
|
3446
|
+
message.GetExtension(Traits::repeated_nested_message_extension, 1).bb());
|
|
3447
|
+
EXPECT_EQ(
|
|
3448
|
+
519,
|
|
3449
|
+
message.GetExtension(Traits::repeated_foreign_message_extension, 1).c());
|
|
3450
|
+
EXPECT_EQ(
|
|
3451
|
+
520,
|
|
3452
|
+
message.GetExtension(Traits::repeated_import_message_extension, 1).d());
|
|
3453
|
+
EXPECT_EQ(
|
|
3454
|
+
527,
|
|
3455
|
+
message.GetExtension(Traits::repeated_lazy_message_extension, 1).bb());
|
|
3456
|
+
|
|
3457
|
+
EXPECT_EQ(Traits::TestAllTypes::FOO,
|
|
3458
|
+
message.GetExtension(Traits::repeated_nested_enum_extension, 1));
|
|
3459
|
+
EXPECT_EQ(Traits::FOREIGN_FOO,
|
|
3460
|
+
message.GetExtension(Traits::repeated_foreign_enum_extension, 1));
|
|
3461
|
+
EXPECT_EQ(Traits::IMPORT_FOO,
|
|
3462
|
+
message.GetExtension(Traits::repeated_import_enum_extension, 1));
|
|
3463
|
+
|
|
3464
|
+
EXPECT_EQ("524",
|
|
3465
|
+
message.GetExtension(Traits::repeated_string_piece_extension, 1));
|
|
3466
|
+
EXPECT_EQ("525", message.GetExtension(Traits::repeated_cord_extension, 1));
|
|
3467
|
+
}
|
|
3468
|
+
|
|
3469
|
+
template <typename TestAllExtensions>
|
|
3470
|
+
void ExpectLastRepeatedExtensionsRemoved(const TestAllExtensions& message) {
|
|
3471
|
+
using Traits = TestUtilTraits<TestAllExtensions>;
|
|
3472
|
+
// Test that one element was removed.
|
|
3473
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_int32_extension));
|
|
3474
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_int64_extension));
|
|
3475
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_uint32_extension));
|
|
3476
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_uint64_extension));
|
|
3477
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_sint32_extension));
|
|
3478
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_sint64_extension));
|
|
3479
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_fixed32_extension));
|
|
3480
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_fixed64_extension));
|
|
3481
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_sfixed32_extension));
|
|
3482
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_sfixed64_extension));
|
|
3483
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_float_extension));
|
|
3484
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_double_extension));
|
|
3485
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_bool_extension));
|
|
3486
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_string_extension));
|
|
3487
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_bytes_extension));
|
|
3488
|
+
|
|
3489
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeatedgroup_extension));
|
|
3490
|
+
ASSERT_EQ(1,
|
|
3491
|
+
message.ExtensionSize(Traits::repeated_nested_message_extension));
|
|
3492
|
+
ASSERT_EQ(1,
|
|
3493
|
+
message.ExtensionSize(Traits::repeated_foreign_message_extension));
|
|
3494
|
+
ASSERT_EQ(1,
|
|
3495
|
+
message.ExtensionSize(Traits::repeated_import_message_extension));
|
|
3496
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_lazy_message_extension));
|
|
3497
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_nested_enum_extension));
|
|
3498
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_foreign_enum_extension));
|
|
3499
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_import_enum_extension));
|
|
3500
|
+
|
|
3501
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_string_piece_extension));
|
|
3502
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_cord_extension));
|
|
3503
|
+
|
|
3504
|
+
// Test that the remaining element is the correct one.
|
|
3505
|
+
EXPECT_EQ(201, message.GetExtension(Traits::repeated_int32_extension, 0));
|
|
3506
|
+
EXPECT_EQ(202, message.GetExtension(Traits::repeated_int64_extension, 0));
|
|
3507
|
+
EXPECT_EQ(203, message.GetExtension(Traits::repeated_uint32_extension, 0));
|
|
3508
|
+
EXPECT_EQ(204, message.GetExtension(Traits::repeated_uint64_extension, 0));
|
|
3509
|
+
EXPECT_EQ(205, message.GetExtension(Traits::repeated_sint32_extension, 0));
|
|
3510
|
+
EXPECT_EQ(206, message.GetExtension(Traits::repeated_sint64_extension, 0));
|
|
3511
|
+
EXPECT_EQ(207, message.GetExtension(Traits::repeated_fixed32_extension, 0));
|
|
3512
|
+
EXPECT_EQ(208, message.GetExtension(Traits::repeated_fixed64_extension, 0));
|
|
3513
|
+
EXPECT_EQ(209, message.GetExtension(Traits::repeated_sfixed32_extension, 0));
|
|
3514
|
+
EXPECT_EQ(210, message.GetExtension(Traits::repeated_sfixed64_extension, 0));
|
|
3515
|
+
EXPECT_EQ(211, message.GetExtension(Traits::repeated_float_extension, 0));
|
|
3516
|
+
EXPECT_EQ(212, message.GetExtension(Traits::repeated_double_extension, 0));
|
|
3517
|
+
EXPECT_TRUE(message.GetExtension(Traits::repeated_bool_extension, 0));
|
|
3518
|
+
EXPECT_EQ("215", message.GetExtension(Traits::repeated_string_extension, 0));
|
|
3519
|
+
EXPECT_EQ("216", message.GetExtension(Traits::repeated_bytes_extension, 0));
|
|
3520
|
+
|
|
3521
|
+
EXPECT_EQ(217, message.GetExtension(Traits::repeatedgroup_extension, 0).a());
|
|
3522
|
+
EXPECT_EQ(
|
|
3523
|
+
218,
|
|
3524
|
+
message.GetExtension(Traits::repeated_nested_message_extension, 0).bb());
|
|
3525
|
+
EXPECT_EQ(
|
|
3526
|
+
219,
|
|
3527
|
+
message.GetExtension(Traits::repeated_foreign_message_extension, 0).c());
|
|
3528
|
+
EXPECT_EQ(
|
|
3529
|
+
220,
|
|
3530
|
+
message.GetExtension(Traits::repeated_import_message_extension, 0).d());
|
|
3531
|
+
EXPECT_EQ(
|
|
3532
|
+
227,
|
|
3533
|
+
message.GetExtension(Traits::repeated_lazy_message_extension, 0).bb());
|
|
3534
|
+
|
|
3535
|
+
EXPECT_EQ(Traits::TestAllTypes::BAR,
|
|
3536
|
+
message.GetExtension(Traits::repeated_nested_enum_extension, 0));
|
|
3537
|
+
EXPECT_EQ(Traits::FOREIGN_BAR,
|
|
3538
|
+
message.GetExtension(Traits::repeated_foreign_enum_extension, 0));
|
|
3539
|
+
EXPECT_EQ(Traits::IMPORT_BAR,
|
|
3540
|
+
message.GetExtension(Traits::repeated_import_enum_extension, 0));
|
|
3541
|
+
|
|
3542
|
+
EXPECT_EQ("224",
|
|
3543
|
+
message.GetExtension(Traits::repeated_string_piece_extension, 0));
|
|
3544
|
+
EXPECT_EQ("225", message.GetExtension(Traits::repeated_cord_extension, 0));
|
|
3545
|
+
}
|
|
3546
|
+
|
|
3547
|
+
template <typename TestAllExtensions>
|
|
3548
|
+
void ExpectRepeatedExtensionsSwapped(const TestAllExtensions& message) {
|
|
3549
|
+
using Traits = TestUtilTraits<TestAllExtensions>;
|
|
3550
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_int32_extension));
|
|
3551
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_int64_extension));
|
|
3552
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_uint32_extension));
|
|
3553
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_uint64_extension));
|
|
3554
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sint32_extension));
|
|
3555
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sint64_extension));
|
|
3556
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_fixed32_extension));
|
|
3557
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_fixed64_extension));
|
|
3558
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sfixed32_extension));
|
|
3559
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_sfixed64_extension));
|
|
3560
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_float_extension));
|
|
3561
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_double_extension));
|
|
3562
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_bool_extension));
|
|
3563
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_string_extension));
|
|
3564
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_bytes_extension));
|
|
3565
|
+
|
|
3566
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeatedgroup_extension));
|
|
3567
|
+
ASSERT_EQ(2,
|
|
3568
|
+
message.ExtensionSize(Traits::repeated_nested_message_extension));
|
|
3569
|
+
ASSERT_EQ(2,
|
|
3570
|
+
message.ExtensionSize(Traits::repeated_foreign_message_extension));
|
|
3571
|
+
ASSERT_EQ(2,
|
|
3572
|
+
message.ExtensionSize(Traits::repeated_import_message_extension));
|
|
3573
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_lazy_message_extension));
|
|
3574
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_nested_enum_extension));
|
|
3575
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_foreign_enum_extension));
|
|
3576
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_import_enum_extension));
|
|
3577
|
+
|
|
3578
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_string_piece_extension));
|
|
3579
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::repeated_cord_extension));
|
|
3580
|
+
|
|
3581
|
+
EXPECT_EQ(201, message.GetExtension(Traits::repeated_int32_extension, 1));
|
|
3582
|
+
EXPECT_EQ(202, message.GetExtension(Traits::repeated_int64_extension, 1));
|
|
3583
|
+
EXPECT_EQ(203, message.GetExtension(Traits::repeated_uint32_extension, 1));
|
|
3584
|
+
EXPECT_EQ(204, message.GetExtension(Traits::repeated_uint64_extension, 1));
|
|
3585
|
+
EXPECT_EQ(205, message.GetExtension(Traits::repeated_sint32_extension, 1));
|
|
3586
|
+
EXPECT_EQ(206, message.GetExtension(Traits::repeated_sint64_extension, 1));
|
|
3587
|
+
EXPECT_EQ(207, message.GetExtension(Traits::repeated_fixed32_extension, 1));
|
|
3588
|
+
EXPECT_EQ(208, message.GetExtension(Traits::repeated_fixed64_extension, 1));
|
|
3589
|
+
EXPECT_EQ(209, message.GetExtension(Traits::repeated_sfixed32_extension, 1));
|
|
3590
|
+
EXPECT_EQ(210, message.GetExtension(Traits::repeated_sfixed64_extension, 1));
|
|
3591
|
+
EXPECT_EQ(211, message.GetExtension(Traits::repeated_float_extension, 1));
|
|
3592
|
+
EXPECT_EQ(212, message.GetExtension(Traits::repeated_double_extension, 1));
|
|
3593
|
+
EXPECT_TRUE(message.GetExtension(Traits::repeated_bool_extension, 1));
|
|
3594
|
+
EXPECT_EQ("215", message.GetExtension(Traits::repeated_string_extension, 1));
|
|
3595
|
+
EXPECT_EQ("216", message.GetExtension(Traits::repeated_bytes_extension, 1));
|
|
3596
|
+
|
|
3597
|
+
EXPECT_EQ(217, message.GetExtension(Traits::repeatedgroup_extension, 1).a());
|
|
3598
|
+
EXPECT_EQ(
|
|
3599
|
+
218,
|
|
3600
|
+
message.GetExtension(Traits::repeated_nested_message_extension, 1).bb());
|
|
3601
|
+
EXPECT_EQ(
|
|
3602
|
+
219,
|
|
3603
|
+
message.GetExtension(Traits::repeated_foreign_message_extension, 1).c());
|
|
3604
|
+
EXPECT_EQ(
|
|
3605
|
+
220,
|
|
3606
|
+
message.GetExtension(Traits::repeated_import_message_extension, 1).d());
|
|
3607
|
+
EXPECT_EQ(
|
|
3608
|
+
227,
|
|
3609
|
+
message.GetExtension(Traits::repeated_lazy_message_extension, 1).bb());
|
|
3610
|
+
|
|
3611
|
+
EXPECT_EQ(Traits::TestAllTypes::BAR,
|
|
3612
|
+
message.GetExtension(Traits::repeated_nested_enum_extension, 1));
|
|
3613
|
+
EXPECT_EQ(Traits::FOREIGN_BAR,
|
|
3614
|
+
message.GetExtension(Traits::repeated_foreign_enum_extension, 1));
|
|
3615
|
+
EXPECT_EQ(Traits::IMPORT_BAR,
|
|
3616
|
+
message.GetExtension(Traits::repeated_import_enum_extension, 1));
|
|
3617
|
+
|
|
3618
|
+
EXPECT_EQ("224",
|
|
3619
|
+
message.GetExtension(Traits::repeated_string_piece_extension, 1));
|
|
3620
|
+
EXPECT_EQ("225", message.GetExtension(Traits::repeated_cord_extension, 1));
|
|
3621
|
+
|
|
3622
|
+
EXPECT_EQ(301, message.GetExtension(Traits::repeated_int32_extension, 0));
|
|
3623
|
+
EXPECT_EQ(302, message.GetExtension(Traits::repeated_int64_extension, 0));
|
|
3624
|
+
EXPECT_EQ(303, message.GetExtension(Traits::repeated_uint32_extension, 0));
|
|
3625
|
+
EXPECT_EQ(304, message.GetExtension(Traits::repeated_uint64_extension, 0));
|
|
3626
|
+
EXPECT_EQ(305, message.GetExtension(Traits::repeated_sint32_extension, 0));
|
|
3627
|
+
EXPECT_EQ(306, message.GetExtension(Traits::repeated_sint64_extension, 0));
|
|
3628
|
+
EXPECT_EQ(307, message.GetExtension(Traits::repeated_fixed32_extension, 0));
|
|
3629
|
+
EXPECT_EQ(308, message.GetExtension(Traits::repeated_fixed64_extension, 0));
|
|
3630
|
+
EXPECT_EQ(309, message.GetExtension(Traits::repeated_sfixed32_extension, 0));
|
|
3631
|
+
EXPECT_EQ(310, message.GetExtension(Traits::repeated_sfixed64_extension, 0));
|
|
3632
|
+
EXPECT_EQ(311, message.GetExtension(Traits::repeated_float_extension, 0));
|
|
3633
|
+
EXPECT_EQ(312, message.GetExtension(Traits::repeated_double_extension, 0));
|
|
3634
|
+
EXPECT_FALSE(message.GetExtension(Traits::repeated_bool_extension, 0));
|
|
3635
|
+
EXPECT_EQ("315", message.GetExtension(Traits::repeated_string_extension, 0));
|
|
3636
|
+
EXPECT_EQ("316", message.GetExtension(Traits::repeated_bytes_extension, 0));
|
|
3637
|
+
|
|
3638
|
+
EXPECT_EQ(317, message.GetExtension(Traits::repeatedgroup_extension, 0).a());
|
|
3639
|
+
EXPECT_EQ(
|
|
3640
|
+
318,
|
|
3641
|
+
message.GetExtension(Traits::repeated_nested_message_extension, 0).bb());
|
|
3642
|
+
EXPECT_EQ(
|
|
3643
|
+
319,
|
|
3644
|
+
message.GetExtension(Traits::repeated_foreign_message_extension, 0).c());
|
|
3645
|
+
EXPECT_EQ(
|
|
3646
|
+
320,
|
|
3647
|
+
message.GetExtension(Traits::repeated_import_message_extension, 0).d());
|
|
3648
|
+
EXPECT_EQ(
|
|
3649
|
+
327,
|
|
3650
|
+
message.GetExtension(Traits::repeated_lazy_message_extension, 0).bb());
|
|
3651
|
+
|
|
3652
|
+
EXPECT_EQ(Traits::TestAllTypes::BAZ,
|
|
3653
|
+
message.GetExtension(Traits::repeated_nested_enum_extension, 0));
|
|
3654
|
+
EXPECT_EQ(Traits::FOREIGN_BAZ,
|
|
3655
|
+
message.GetExtension(Traits::repeated_foreign_enum_extension, 0));
|
|
3656
|
+
EXPECT_EQ(Traits::IMPORT_BAZ,
|
|
3657
|
+
message.GetExtension(Traits::repeated_import_enum_extension, 0));
|
|
3658
|
+
|
|
3659
|
+
EXPECT_EQ("324",
|
|
3660
|
+
message.GetExtension(Traits::repeated_string_piece_extension, 0));
|
|
3661
|
+
EXPECT_EQ("325", message.GetExtension(Traits::repeated_cord_extension, 0));
|
|
3662
|
+
}
|
|
3663
|
+
|
|
3664
|
+
template <typename TestFieldOrderings>
|
|
3665
|
+
void SetAllFieldsAndExtensions(TestFieldOrderings* message) {
|
|
3666
|
+
using Traits = TestUtilTraits<TestFieldOrderings>;
|
|
3667
|
+
message->set_my_int(1);
|
|
3668
|
+
message->set_my_string("foo");
|
|
3669
|
+
message->set_my_float(1.0);
|
|
3670
|
+
message->SetExtension(Traits::my_extension_int, 23);
|
|
3671
|
+
message->SetExtension(Traits::my_extension_string, "bar");
|
|
3672
|
+
}
|
|
3673
|
+
|
|
3674
|
+
template <typename TestPackedExtensions>
|
|
3675
|
+
void SetPackedExtensions(TestPackedExtensions* message) {
|
|
3676
|
+
using Traits = TestUtilTraits<TestPackedExtensions>;
|
|
3677
|
+
message->AddExtension(Traits::packed_int32_extension, 601);
|
|
3678
|
+
message->AddExtension(Traits::packed_int64_extension, 602);
|
|
3679
|
+
message->AddExtension(Traits::packed_uint32_extension, 603);
|
|
3680
|
+
message->AddExtension(Traits::packed_uint64_extension, 604);
|
|
3681
|
+
message->AddExtension(Traits::packed_sint32_extension, 605);
|
|
3682
|
+
message->AddExtension(Traits::packed_sint64_extension, 606);
|
|
3683
|
+
message->AddExtension(Traits::packed_fixed32_extension, 607);
|
|
3684
|
+
message->AddExtension(Traits::packed_fixed64_extension, 608);
|
|
3685
|
+
message->AddExtension(Traits::packed_sfixed32_extension, 609);
|
|
3686
|
+
message->AddExtension(Traits::packed_sfixed64_extension, 610);
|
|
3687
|
+
message->AddExtension(Traits::packed_float_extension, 611);
|
|
3688
|
+
message->AddExtension(Traits::packed_double_extension, 612);
|
|
3689
|
+
message->AddExtension(Traits::packed_bool_extension, true);
|
|
3690
|
+
message->AddExtension(Traits::packed_enum_extension, Traits::FOREIGN_BAR);
|
|
3691
|
+
// add a second one of each field
|
|
3692
|
+
message->AddExtension(Traits::packed_int32_extension, 701);
|
|
3693
|
+
message->AddExtension(Traits::packed_int64_extension, 702);
|
|
3694
|
+
message->AddExtension(Traits::packed_uint32_extension, 703);
|
|
3695
|
+
message->AddExtension(Traits::packed_uint64_extension, 704);
|
|
3696
|
+
message->AddExtension(Traits::packed_sint32_extension, 705);
|
|
3697
|
+
message->AddExtension(Traits::packed_sint64_extension, 706);
|
|
3698
|
+
message->AddExtension(Traits::packed_fixed32_extension, 707);
|
|
3699
|
+
message->AddExtension(Traits::packed_fixed64_extension, 708);
|
|
3700
|
+
message->AddExtension(Traits::packed_sfixed32_extension, 709);
|
|
3701
|
+
message->AddExtension(Traits::packed_sfixed64_extension, 710);
|
|
3702
|
+
message->AddExtension(Traits::packed_float_extension, 711);
|
|
3703
|
+
message->AddExtension(Traits::packed_double_extension, 712);
|
|
3704
|
+
message->AddExtension(Traits::packed_bool_extension, false);
|
|
3705
|
+
message->AddExtension(Traits::packed_enum_extension, Traits::FOREIGN_BAZ);
|
|
3706
|
+
}
|
|
3707
|
+
|
|
3708
|
+
template <typename TestPackedExtensions>
|
|
3709
|
+
void ExpectPackedExtensionsSet(const TestPackedExtensions& message) {
|
|
3710
|
+
using Traits = TestUtilTraits<TestPackedExtensions>;
|
|
3711
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_int32_extension));
|
|
3712
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_int64_extension));
|
|
3713
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_uint32_extension));
|
|
3714
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_uint64_extension));
|
|
3715
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_sint32_extension));
|
|
3716
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_sint64_extension));
|
|
3717
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_fixed32_extension));
|
|
3718
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_fixed64_extension));
|
|
3719
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_sfixed32_extension));
|
|
3720
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_sfixed64_extension));
|
|
3721
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_float_extension));
|
|
3722
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_double_extension));
|
|
3723
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_bool_extension));
|
|
3724
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::packed_enum_extension));
|
|
3725
|
+
|
|
3726
|
+
EXPECT_EQ(601, message.GetExtension(Traits::packed_int32_extension, 0));
|
|
3727
|
+
EXPECT_EQ(602, message.GetExtension(Traits::packed_int64_extension, 0));
|
|
3728
|
+
EXPECT_EQ(603, message.GetExtension(Traits::packed_uint32_extension, 0));
|
|
3729
|
+
EXPECT_EQ(604, message.GetExtension(Traits::packed_uint64_extension, 0));
|
|
3730
|
+
EXPECT_EQ(605, message.GetExtension(Traits::packed_sint32_extension, 0));
|
|
3731
|
+
EXPECT_EQ(606, message.GetExtension(Traits::packed_sint64_extension, 0));
|
|
3732
|
+
EXPECT_EQ(607, message.GetExtension(Traits::packed_fixed32_extension, 0));
|
|
3733
|
+
EXPECT_EQ(608, message.GetExtension(Traits::packed_fixed64_extension, 0));
|
|
3734
|
+
EXPECT_EQ(609, message.GetExtension(Traits::packed_sfixed32_extension, 0));
|
|
3735
|
+
EXPECT_EQ(610, message.GetExtension(Traits::packed_sfixed64_extension, 0));
|
|
3736
|
+
EXPECT_EQ(611, message.GetExtension(Traits::packed_float_extension, 0));
|
|
3737
|
+
EXPECT_EQ(612, message.GetExtension(Traits::packed_double_extension, 0));
|
|
3738
|
+
EXPECT_TRUE(message.GetExtension(Traits::packed_bool_extension, 0));
|
|
3739
|
+
EXPECT_EQ(Traits::FOREIGN_BAR,
|
|
3740
|
+
message.GetExtension(Traits::packed_enum_extension, 0));
|
|
3741
|
+
EXPECT_EQ(701, message.GetExtension(Traits::packed_int32_extension, 1));
|
|
3742
|
+
EXPECT_EQ(702, message.GetExtension(Traits::packed_int64_extension, 1));
|
|
3743
|
+
EXPECT_EQ(703, message.GetExtension(Traits::packed_uint32_extension, 1));
|
|
3744
|
+
EXPECT_EQ(704, message.GetExtension(Traits::packed_uint64_extension, 1));
|
|
3745
|
+
EXPECT_EQ(705, message.GetExtension(Traits::packed_sint32_extension, 1));
|
|
3746
|
+
EXPECT_EQ(706, message.GetExtension(Traits::packed_sint64_extension, 1));
|
|
3747
|
+
EXPECT_EQ(707, message.GetExtension(Traits::packed_fixed32_extension, 1));
|
|
3748
|
+
EXPECT_EQ(708, message.GetExtension(Traits::packed_fixed64_extension, 1));
|
|
3749
|
+
EXPECT_EQ(709, message.GetExtension(Traits::packed_sfixed32_extension, 1));
|
|
3750
|
+
EXPECT_EQ(710, message.GetExtension(Traits::packed_sfixed64_extension, 1));
|
|
3751
|
+
EXPECT_EQ(711, message.GetExtension(Traits::packed_float_extension, 1));
|
|
3752
|
+
EXPECT_EQ(712, message.GetExtension(Traits::packed_double_extension, 1));
|
|
3753
|
+
EXPECT_FALSE(message.GetExtension(Traits::packed_bool_extension, 1));
|
|
3754
|
+
EXPECT_EQ(Traits::FOREIGN_BAZ,
|
|
3755
|
+
message.GetExtension(Traits::packed_enum_extension, 1));
|
|
3756
|
+
}
|
|
3757
|
+
|
|
3758
|
+
template <typename TestUnpackedExtensions>
|
|
3759
|
+
void ExpectUnpackedExtensionsSet(const TestUnpackedExtensions& message) {
|
|
3760
|
+
using Traits = TestUtilTraits<TestUnpackedExtensions>;
|
|
3761
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_int32_extension));
|
|
3762
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_int64_extension));
|
|
3763
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_uint32_extension));
|
|
3764
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_uint64_extension));
|
|
3765
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_sint32_extension));
|
|
3766
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_sint64_extension));
|
|
3767
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_fixed32_extension));
|
|
3768
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_fixed64_extension));
|
|
3769
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_sfixed32_extension));
|
|
3770
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_sfixed64_extension));
|
|
3771
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_float_extension));
|
|
3772
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_double_extension));
|
|
3773
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_bool_extension));
|
|
3774
|
+
ASSERT_EQ(2, message.ExtensionSize(Traits::unpacked_enum_extension));
|
|
3775
|
+
|
|
3776
|
+
EXPECT_EQ(601, message.GetExtension(Traits::unpacked_int32_extension, 0));
|
|
3777
|
+
EXPECT_EQ(602, message.GetExtension(Traits::unpacked_int64_extension, 0));
|
|
3778
|
+
EXPECT_EQ(603, message.GetExtension(Traits::unpacked_uint32_extension, 0));
|
|
3779
|
+
EXPECT_EQ(604, message.GetExtension(Traits::unpacked_uint64_extension, 0));
|
|
3780
|
+
EXPECT_EQ(605, message.GetExtension(Traits::unpacked_sint32_extension, 0));
|
|
3781
|
+
EXPECT_EQ(606, message.GetExtension(Traits::unpacked_sint64_extension, 0));
|
|
3782
|
+
EXPECT_EQ(607, message.GetExtension(Traits::unpacked_fixed32_extension, 0));
|
|
3783
|
+
EXPECT_EQ(608, message.GetExtension(Traits::unpacked_fixed64_extension, 0));
|
|
3784
|
+
EXPECT_EQ(609, message.GetExtension(Traits::unpacked_sfixed32_extension, 0));
|
|
3785
|
+
EXPECT_EQ(610, message.GetExtension(Traits::unpacked_sfixed64_extension, 0));
|
|
3786
|
+
EXPECT_EQ(611, message.GetExtension(Traits::unpacked_float_extension, 0));
|
|
3787
|
+
EXPECT_EQ(612, message.GetExtension(Traits::unpacked_double_extension, 0));
|
|
3788
|
+
EXPECT_EQ(true, message.GetExtension(Traits::unpacked_bool_extension, 0));
|
|
3789
|
+
EXPECT_EQ(Traits::FOREIGN_BAR,
|
|
3790
|
+
message.GetExtension(Traits::unpacked_enum_extension, 0));
|
|
3791
|
+
EXPECT_EQ(701, message.GetExtension(Traits::unpacked_int32_extension, 1));
|
|
3792
|
+
EXPECT_EQ(702, message.GetExtension(Traits::unpacked_int64_extension, 1));
|
|
3793
|
+
EXPECT_EQ(703, message.GetExtension(Traits::unpacked_uint32_extension, 1));
|
|
3794
|
+
EXPECT_EQ(704, message.GetExtension(Traits::unpacked_uint64_extension, 1));
|
|
3795
|
+
EXPECT_EQ(705, message.GetExtension(Traits::unpacked_sint32_extension, 1));
|
|
3796
|
+
EXPECT_EQ(706, message.GetExtension(Traits::unpacked_sint64_extension, 1));
|
|
3797
|
+
EXPECT_EQ(707, message.GetExtension(Traits::unpacked_fixed32_extension, 1));
|
|
3798
|
+
EXPECT_EQ(708, message.GetExtension(Traits::unpacked_fixed64_extension, 1));
|
|
3799
|
+
EXPECT_EQ(709, message.GetExtension(Traits::unpacked_sfixed32_extension, 1));
|
|
3800
|
+
EXPECT_EQ(710, message.GetExtension(Traits::unpacked_sfixed64_extension, 1));
|
|
3801
|
+
EXPECT_EQ(711, message.GetExtension(Traits::unpacked_float_extension, 1));
|
|
3802
|
+
EXPECT_EQ(712, message.GetExtension(Traits::unpacked_double_extension, 1));
|
|
3803
|
+
EXPECT_FALSE(message.GetExtension(Traits::unpacked_bool_extension, 1));
|
|
3804
|
+
EXPECT_EQ(Traits::FOREIGN_BAZ,
|
|
3805
|
+
message.GetExtension(Traits::unpacked_enum_extension, 1));
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3808
|
+
template <typename TestPackedExtensions>
|
|
3809
|
+
void ExpectLastRepeatedExtensionsRemovedPacked(
|
|
3810
|
+
const TestPackedExtensions& message) {
|
|
3811
|
+
using Traits = TestUtilTraits<TestPackedExtensions>;
|
|
3812
|
+
// Test that one element was removed.
|
|
3813
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_int32_extension));
|
|
3814
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_int64_extension));
|
|
3815
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_uint32_extension));
|
|
3816
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_uint64_extension));
|
|
3817
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_sint32_extension));
|
|
3818
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_sint64_extension));
|
|
3819
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_fixed32_extension));
|
|
3820
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_fixed64_extension));
|
|
3821
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_sfixed32_extension));
|
|
3822
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_sfixed64_extension));
|
|
3823
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_float_extension));
|
|
3824
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_double_extension));
|
|
3825
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_bool_extension));
|
|
3826
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::packed_enum_extension));
|
|
3827
|
+
|
|
3828
|
+
// Test that the remaining element is the correct one.
|
|
3829
|
+
EXPECT_EQ(601, message.GetExtension(Traits::packed_int32_extension, 0));
|
|
3830
|
+
EXPECT_EQ(602, message.GetExtension(Traits::packed_int64_extension, 0));
|
|
3831
|
+
EXPECT_EQ(603, message.GetExtension(Traits::packed_uint32_extension, 0));
|
|
3832
|
+
EXPECT_EQ(604, message.GetExtension(Traits::packed_uint64_extension, 0));
|
|
3833
|
+
EXPECT_EQ(605, message.GetExtension(Traits::packed_sint32_extension, 0));
|
|
3834
|
+
EXPECT_EQ(606, message.GetExtension(Traits::packed_sint64_extension, 0));
|
|
3835
|
+
EXPECT_EQ(607, message.GetExtension(Traits::packed_fixed32_extension, 0));
|
|
3836
|
+
EXPECT_EQ(608, message.GetExtension(Traits::packed_fixed64_extension, 0));
|
|
3837
|
+
EXPECT_EQ(609, message.GetExtension(Traits::packed_sfixed32_extension, 0));
|
|
3838
|
+
EXPECT_EQ(610, message.GetExtension(Traits::packed_sfixed64_extension, 0));
|
|
3839
|
+
EXPECT_EQ(611, message.GetExtension(Traits::packed_float_extension, 0));
|
|
3840
|
+
EXPECT_EQ(612, message.GetExtension(Traits::packed_double_extension, 0));
|
|
3841
|
+
EXPECT_TRUE(message.GetExtension(Traits::packed_bool_extension, 0));
|
|
3842
|
+
EXPECT_EQ(Traits::FOREIGN_BAR,
|
|
3843
|
+
message.GetExtension(Traits::packed_enum_extension, 0));
|
|
3844
|
+
}
|
|
3845
|
+
|
|
3846
|
+
template <typename TestAllTypes>
|
|
3847
|
+
void ExpectLastRepeatedsReleased(const TestAllTypes& message) {
|
|
3848
|
+
ASSERT_EQ(1, message.repeatedgroup_size());
|
|
3849
|
+
ASSERT_EQ(1, message.repeated_nested_message_size());
|
|
3850
|
+
ASSERT_EQ(1, message.repeated_foreign_message_size());
|
|
3851
|
+
ASSERT_EQ(1, message.repeated_import_message_size());
|
|
3852
|
+
ASSERT_EQ(1, message.repeated_import_message_size());
|
|
3853
|
+
|
|
3854
|
+
EXPECT_EQ(217, message.repeatedgroup(0).a());
|
|
3855
|
+
EXPECT_EQ(218, message.repeated_nested_message(0).bb());
|
|
3856
|
+
EXPECT_EQ(219, message.repeated_foreign_message(0).c());
|
|
3857
|
+
EXPECT_EQ(220, message.repeated_import_message(0).d());
|
|
3858
|
+
EXPECT_EQ(220, message.repeated_import_message(0).d());
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3861
|
+
template <typename TestAllExtensions>
|
|
3862
|
+
void ExpectLastRepeatedExtensionsReleased(const TestAllExtensions& message) {
|
|
3863
|
+
using Traits = TestUtilTraits<TestAllExtensions>;
|
|
3864
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeatedgroup_extension));
|
|
3865
|
+
ASSERT_EQ(1,
|
|
3866
|
+
message.ExtensionSize(Traits::repeated_nested_message_extension));
|
|
3867
|
+
ASSERT_EQ(1,
|
|
3868
|
+
message.ExtensionSize(Traits::repeated_foreign_message_extension));
|
|
3869
|
+
ASSERT_EQ(1,
|
|
3870
|
+
message.ExtensionSize(Traits::repeated_import_message_extension));
|
|
3871
|
+
ASSERT_EQ(1, message.ExtensionSize(Traits::repeated_lazy_message_extension));
|
|
3872
|
+
|
|
3873
|
+
EXPECT_EQ(217, message.GetExtension(Traits::repeatedgroup_extension, 0).a());
|
|
3874
|
+
EXPECT_EQ(
|
|
3875
|
+
218,
|
|
3876
|
+
message.GetExtension(Traits::repeated_nested_message_extension, 0).bb());
|
|
3877
|
+
EXPECT_EQ(
|
|
3878
|
+
219,
|
|
3879
|
+
message.GetExtension(Traits::repeated_foreign_message_extension, 0).c());
|
|
3880
|
+
EXPECT_EQ(
|
|
3881
|
+
220,
|
|
3882
|
+
message.GetExtension(Traits::repeated_import_message_extension, 0).d());
|
|
3883
|
+
EXPECT_EQ(
|
|
3884
|
+
227,
|
|
3885
|
+
message.GetExtension(Traits::repeated_lazy_message_extension, 0).bb());
|
|
3886
|
+
}
|
|
3887
|
+
|
|
3888
|
+
} // namespace TestUtil
|
|
3889
|
+
} // namespace protobuf
|
|
3890
|
+
} // namespace google
|
|
3891
|
+
|
|
3892
|
+
// Declare the default trait so that most users don't need to do it.
|
|
3893
|
+
PROTOBUF_TEST_UTIL_DECLARE_INPUT();
|
|
3894
|
+
|
|
3895
|
+
#include "google/protobuf/port_undef.inc"
|
|
3896
|
+
|
|
3897
|
+
#endif // GOOGLE_PROTOBUF_TEST_UTIL_H__
|