unittest_lazy_dependencies.proto 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. // Author: trafacz@google.com (Todd Rafacz)
  8. // Based on original Protocol Buffers design by
  9. // Sanjay Ghemawat, Jeff Dean, and others.
  10. //
  11. // A proto file we will use for unit testing.
  12. edition = "2023";
  13. import "google/protobuf/unittest_lazy_dependencies_custom_option.proto";
  14. // Some generic_services option(s) added automatically.
  15. // See: http://go/proto2-generic-services-default
  16. option cc_generic_services = true; // auto-added
  17. option java_generic_services = true; // auto-added
  18. option py_generic_services = true; // auto-added
  19. option cc_enable_arenas = true;
  20. // We don't put this in a package within proto2 because we need to make sure
  21. // that the generated code doesn't depend on being in the proto2 namespace.
  22. // In test_util.h we do "using namespace unittest = protobuf_unittest".
  23. package protobuf_unittest.lazy_imports;
  24. // Protos optimized for SPEED use a strict superset of the generated code
  25. // of equivalent ones optimized for CODE_SIZE, so we should optimize all our
  26. // tests for speed unless explicitly testing code size optimization.
  27. option optimize_for = SPEED;
  28. option java_outer_classname = "UnittestLazyImportsProto";
  29. // The following are used to test that the proto file
  30. // with the definition of the following field types is
  31. // not built when this proto file is built. Then test
  32. // that calling message_type() etc will build the correct
  33. // descriptor lazily and return it.
  34. message ImportedMessage {
  35. LazyMessage lazy_message = 1;
  36. }
  37. message MessageCustomOption {}
  38. message MessageCustomOption2 {
  39. option (lazy_enum_option) = LAZY_ENUM_0;
  40. }