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// This file contains messages for testing repeated field comparison 13// LINT: ALLOW_GROUPS 14 15syntax = "proto2"; 16 17package protobuf_unittest; 18 19import "google/protobuf/any.proto"; 20 21option optimize_for = SPEED; 22 23message TestField { 24 optional int32 a = 3; 25 optional int32 b = 4; 26 optional int32 c = 1; 27 repeated int32 rc = 2; 28 optional TestField m = 5; 29 repeated TestField rm = 6; 30 31 extend TestDiffMessage { 32 optional TestField tf = 100; 33 } 34} 35 36message TestDiffMessage { 37 repeated group Item = 1 { 38 optional int32 a = 2; // Test basic repeated field comparison. 39 optional string b = 4; // Test basic repeated field comparison. 40 repeated int32 ra = 3; // Test SetOfSet Comparison. 41 repeated string rb = 5; // Test TreatAsMap when key is repeated 42 optional TestField m = 6; // Test TreatAsMap when key is a message 43 repeated TestField rm = 7; // Test TreatAsMap when key is a repeated 44 // message 45 map<string, int32> mp = 8; // Test for map comparisons 46 } 47 48 optional int32 v = 13 [deprecated = true]; 49 optional string w = 14; 50 optional TestField m = 15; 51 repeated int32 rv = 11; // Test for combinations 52 repeated string rw = 10; // Test for combinations 53 repeated TestField rm = 12 [deprecated = true]; // Test for combinations 54 repeated google.protobuf.Any rany = 55 16; // Test for repeated Any type resolution 56 extensions 100 to 199; 57} 58