1syntax = "proto2"; 2package protobuf_mutator; 3 4message Msg { 5 enum Enum { 6 ENUM_0 = 0; 7 ENUM_1 = 1; 8 ENUM_2 = 2; 9 ENUM_3 = 3; 10 ENUM_4 = 4; 11 ENUM_5 = 5; 12 ENUM_6 = 6; 13 ENUM_7 = 7; 14 ENUM_8 = 8; 15 ENUM_9 = 9; 16 } 17 18 message SubMsg { 19 optional int64 optional_int64 = 1; 20 } 21 22 required double required_double = 1; 23 required float required_float = 2; 24 required int32 required_int32 = 3; 25 required int64 required_int64 = 4; 26 required uint32 required_uint32 = 5; 27 required uint64 required_uint64 = 6; 28 required sint32 required_sint32 = 7; 29 required sint64 required_sint64 = 8; 30 required fixed32 required_fixed32 = 9; 31 required fixed64 required_fixed64 = 10; 32 required sfixed32 required_sfixed32 = 11; 33 required sfixed64 required_sfixed64 = 12; 34 required bool required_bool = 13; 35 required string required_string = 14; 36 required bytes required_bytes = 15; 37 required Enum required_enum = 16; 38 required SubMsg required_msg = 17; 39 40 optional double optional_double = 18; 41 optional float optional_float = 19; 42 optional int32 optional_int32 = 20; 43 optional int64 optional_int64 = 21; 44 optional uint32 optional_uint32 = 22; 45 optional uint64 optional_uint64 = 23; 46 optional sint32 optional_sint32 = 24; 47 optional sint64 optional_sint64 = 25; 48 optional fixed32 optional_fixed32 = 26; 49 optional fixed64 optional_fixed64 = 27; 50 optional sfixed32 optional_sfixed32 = 28; 51 optional sfixed64 optional_sfixed64 = 29; 52 optional bool optional_bool = 30; 53 optional string optional_string = 31; 54 optional bytes optional_bytes = 32; 55 optional Enum optional_enum = 33; 56 optional Msg optional_msg = 34; 57 58 repeated double repeated_double = 35; 59 repeated float repeated_float = 36; 60 repeated int32 repeated_int32 = 37; 61 repeated int64 repeated_int64 = 38; 62 repeated uint32 repeated_uint32 = 39; 63 repeated uint64 repeated_uint64 = 40; 64 repeated sint32 repeated_sint32 = 41; 65 repeated sint64 repeated_sint64 = 42; 66 repeated fixed32 repeated_fixed32 = 43; 67 repeated fixed64 repeated_fixed64 = 44; 68 repeated sfixed32 repeated_sfixed32 = 45; 69 repeated sfixed64 repeated_sfixed64 = 46; 70 repeated bool repeated_bool = 47; 71 repeated string repeated_string = 48; 72 repeated bytes repeated_bytes = 49; 73 repeated Enum repeated_enum = 50; 74 repeated Msg repeated_msg = 51; 75 76 oneof OneOf { 77 double oneof_double = 52; 78 float oneof_float = 53; 79 int32 oneof_int32 = 54; 80 int64 oneof_int64 = 55; 81 uint32 oneof_uint32 = 56; 82 uint64 oneof_uint64 = 57; 83 sint32 oneof_sint32 = 58; 84 sint64 oneof_sint64 = 59; 85 fixed32 oneof_fixed32 = 60; 86 fixed64 oneof_fixed64 = 61; 87 sfixed32 oneof_sfixed32 = 62; 88 sfixed64 oneof_sfixed64 = 63; 89 bool oneof_bool = 64; 90 string oneof_string = 65; 91 bytes oneof_bytes = 66; 92 Enum oneof_enum = 67; 93 Msg oneof_msg = 68; 94 } 95 96 // TODO(vitalybuka): Tests maps. 97 // map<string, uint64> map = 69; 98 // map<int32, bytes> map2 = 71; 99 100 required group Group = 70 { 101 required bool required_bool = 1; 102 optional bool optional_bool = 2; 103 repeated bool repeated_bool = 3; 104 } 105} 106 107message SmallMessage { 108 enum Enum { 109 ENUM_0 = 0; 110 ENUM_1 = 1; 111 ENUM_2 = 2; 112 ENUM_3 = 3; 113 } 114 115 optional bool opt_bool = 1; 116 optional Enum opt_enum = 2; 117} 118 119message RegressionMessage { 120 enum SingleValueEnum { ENUM_0 = 0; } 121 optional SingleValueEnum enum = 2; 122} 123 124message EmptyMessage { 125} 126