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