Skip to content

Commit

Permalink
Merge pull request protocolbuffers#460 from haberman/encode-required
Browse files Browse the repository at this point in the history
Added required field checking into the encoder
  • Loading branch information
haberman authored Dec 6, 2021
2 parents c98f8dd + f27b3d5 commit e90d080
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions upb/msg_test.proto
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,68 @@ message TestRequiredFields {
message SubMessageHasRequired {
optional TestRequiredFields optional_message = 1;
}

message TestMaxRequiredFields {
required int32 required_int32_1 = 1;
required int32 required_int32_2 = 2;
required int32 required_int32_3 = 3;
required int32 required_int32_4 = 4;
required int32 required_int32_5 = 5;
required int32 required_int32_6 = 6;
required int32 required_int32_7 = 7;
required int32 required_int32_8 = 8;
required int32 required_int32_9 = 9;
required int32 required_int32_10 = 10;
required int32 required_int32_11 = 11;
required int32 required_int32_12 = 12;
required int32 required_int32_13 = 13;
required int32 required_int32_14 = 14;
required int32 required_int32_15 = 15;
required int32 required_int32_16 = 16;
required int32 required_int32_17 = 17;
required int32 required_int32_18 = 18;
required int32 required_int32_19 = 19;
required int32 required_int32_20 = 20;
required int32 required_int32_21 = 21;
required int32 required_int32_22 = 22;
required int32 required_int32_23 = 23;
required int32 required_int32_24 = 24;
required int32 required_int32_25 = 25;
required int32 required_int32_26 = 26;
required int32 required_int32_27 = 27;
required int32 required_int32_28 = 28;
required int32 required_int32_29 = 29;
required int32 required_int32_30 = 30;
required int32 required_int32_31 = 31;
required int32 required_int32_32 = 32;
required int32 required_int32_33 = 33;
required int32 required_int32_34 = 34;
required int32 required_int32_35 = 35;
required int32 required_int32_36 = 36;
required int32 required_int32_37 = 37;
required int32 required_int32_38 = 38;
required int32 required_int32_39 = 39;
required int32 required_int32_40 = 40;
required int32 required_int32_41 = 41;
required int32 required_int32_42 = 42;
required int32 required_int32_43 = 43;
required int32 required_int32_44 = 44;
required int32 required_int32_45 = 45;
required int32 required_int32_46 = 46;
required int32 required_int32_47 = 47;
required int32 required_int32_48 = 48;
required int32 required_int32_49 = 49;
required int32 required_int32_50 = 50;
required int32 required_int32_51 = 51;
required int32 required_int32_52 = 52;
required int32 required_int32_53 = 53;
required int32 required_int32_54 = 54;
required int32 required_int32_55 = 55;
required int32 required_int32_56 = 56;
required int32 required_int32_57 = 57;
required int32 required_int32_58 = 58;
required int32 required_int32_59 = 59;
required int32 required_int32_60 = 60;
required int32 required_int32_61 = 61;
required int32 required_int32_62 = 62;
}

0 comments on commit e90d080

Please sign in to comment.