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// A proto file which is imported by unittest.proto to test importing. 13 14syntax = "proto2"; 15 16// We don't put this in a package within proto2 because we need to make sure 17// that the generated code doesn't depend on being in the proto2 namespace. 18// In test_util.h we do 19// "using namespace unittest_import = protobuf_unittest_import". 20package protobuf_unittest_import; 21 22option optimize_for = SPEED; 23option cc_enable_arenas = true; 24 25// Exercise the java_package option. 26option java_package = "com.google.protobuf.test"; 27 28// Do not set a java_outer_classname here to verify that Proto2 works without 29// one. 30 31// Test public import 32import public "google/protobuf/unittest_import_public.proto"; 33 34message ImportMessage { 35 optional int32 d = 1; 36} 37 38enum ImportEnum { 39 IMPORT_FOO = 7; 40 IMPORT_BAR = 8; 41 IMPORT_BAZ = 9; 42} 43 44// To use an enum in a map, it must has the first value as 0. 45enum ImportEnumForMap { 46 UNKNOWN = 0; 47 FOO = 1; 48 BAR = 2; 49} 50