1syntax = "proto2"; 2 3package com.google.common.truth.extensions.proto; 4 5import "google/protobuf/any.proto"; 6 7option java_package = "com.google.common.truth.extensions.proto"; 8option java_multiple_files = true; 9 10// For brevity: o_ means 'optional', r_ means 'repeated' 11 12// This file must be kept in sync with test_message3.proto for tests to work. 13// Field names and field numbers should all match. Features supported in one 14// syntax but not the other are commented out in the other file. 15 16message TestMessage2 { 17 enum TestEnum2 { 18 DEFAULT = 0; 19 ONE = 1; 20 TWO = 2; 21 } 22 23 optional int32 o_int = 1; 24 repeated string r_string = 2; 25 optional int64 o_long_defaults_to_42 = 3 [default = 42]; 26 optional TestEnum2 o_enum = 4; 27 optional float o_float = 5; 28 optional float o_float2 = 6; 29 optional double o_double = 7; 30 optional double o_double2 = 8; 31 optional float o_float_defaults_to_42 = 9 [default = 42.0]; 32 optional double o_double_defaults_to_42 = 10 [default = 42.0]; 33 34 optional RequiredStringMessage2 o_required_string_message = 11; 35 repeated RequiredStringMessage2 r_required_string_message = 12; 36 optional TestMessage2 o_test_message = 13; 37 repeated TestMessage2 r_test_message = 14; 38 optional SubTestMessage2 o_sub_test_message = 15; 39 repeated SubTestMessage2 r_sub_test_message = 16; 40 map<string, TestMessage2> test_message_map = 17; 41 optional .google.protobuf.Any o_any_message = 18; 42 repeated .google.protobuf.Any r_any_message = 19; 43 44 oneof oneof_field { 45 TestMessage2 oneof_message1 = 20; 46 TestMessage2 oneof_message2 = 21; 47 } 48} 49 50message RequiredStringMessage2 { 51 required string required_string = 1; 52} 53 54message SubTestMessage2 { 55 optional int32 o_int = 1; 56 repeated string r_string = 2; 57 optional float o_float = 3; 58 optional double o_double = 4; 59 60 optional TestMessage2 o_test_message = 5; 61 optional SubSubTestMessage2 o_sub_sub_test_message = 6; 62} 63 64message SubSubTestMessage2 { 65 optional int32 o_int = 1; 66 repeated string r_string = 2; 67 optional float o_float = 3; 68 optional double o_double = 4; 69} 70