Skip to content

Commit

Permalink
Add conformance tests for repeated wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
jchadwick-buf committed Oct 1, 2024
1 parent e41b4a0 commit abd0f7b
Show file tree
Hide file tree
Showing 7 changed files with 3,344 additions and 914 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,42 @@ message PredefinedWrappedBytesRuleProto2 {
optional google.protobuf.BytesValue val = 1 [(buf.validate.field).bytes.(bytes_valid_path_proto2) = true];
}

message PredefinedRepeatedWrappedFloatRuleProto2 {
repeated google.protobuf.FloatValue val = 1 [(buf.validate.field).repeated.items.float.(float_abs_range_proto2) = 1.0];
}

message PredefinedRepeatedWrappedDoubleRuleProto2 {
repeated google.protobuf.DoubleValue val = 1 [(buf.validate.field).repeated.items.double.(double_abs_range_proto2) = 1.0];
}

message PredefinedRepeatedWrappedInt32RuleProto2 {
repeated google.protobuf.Int32Value val = 1 [(buf.validate.field).repeated.items.int32.(int32_abs_in_proto2) = -2];
}

message PredefinedRepeatedWrappedInt64RuleProto2 {
repeated google.protobuf.Int64Value val = 1 [(buf.validate.field).repeated.items.int64.(int64_abs_in_proto2) = {value: -2}];
}

message PredefinedRepeatedWrappedUInt32RuleProto2 {
repeated google.protobuf.UInt32Value val = 1 [(buf.validate.field).repeated.items.uint32.(uint32_even_proto2) = true];
}

message PredefinedRepeatedWrappedUInt64RuleProto2 {
repeated google.protobuf.UInt64Value val = 1 [(buf.validate.field).repeated.items.uint64.(uint64_even_proto2) = true];
}

message PredefinedRepeatedWrappedBoolRuleProto2 {
repeated google.protobuf.BoolValue val = 1 [(buf.validate.field).repeated.items.bool.(bool_false_proto2) = true];
}

message PredefinedRepeatedWrappedStringRuleProto2 {
repeated google.protobuf.StringValue val = 1 [(buf.validate.field).repeated.items.string.(string_valid_path_proto2) = true];
}

message PredefinedRepeatedWrappedBytesRuleProto2 {
repeated google.protobuf.BytesValue val = 1 [(buf.validate.field).repeated.items.bytes.(bytes_valid_path_proto2) = true];
}

message PredefinedAndCustomRuleProto2 {
optional sint32 a = 1 [
(field).cel = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,42 @@ message PredefinedWrappedBytesRuleProto3 {
google.protobuf.BytesValue val = 1 [(buf.validate.field).bytes.(bytes_valid_path_proto2) = true];
}

message PredefinedRepeatedWrappedFloatRuleProto3 {
repeated google.protobuf.FloatValue val = 1 [(buf.validate.field).repeated.items.float.(float_abs_range_proto2) = 1.0];
}

message PredefinedRepeatedWrappedDoubleRuleProto3 {
repeated google.protobuf.DoubleValue val = 1 [(buf.validate.field).repeated.items.double.(double_abs_range_proto2) = 1.0];
}

message PredefinedRepeatedWrappedInt32RuleProto3 {
repeated google.protobuf.Int32Value val = 1 [(buf.validate.field).repeated.items.int32.(int32_abs_in_proto2) = -2];
}

message PredefinedRepeatedWrappedInt64RuleProto3 {
repeated google.protobuf.Int64Value val = 1 [(buf.validate.field).repeated.items.int64.(int64_abs_in_proto2) = {value: -2}];
}

message PredefinedRepeatedWrappedUInt32RuleProto3 {
repeated google.protobuf.UInt32Value val = 1 [(buf.validate.field).repeated.items.uint32.(uint32_even_proto2) = true];
}

message PredefinedRepeatedWrappedUInt64RuleProto3 {
repeated google.protobuf.UInt64Value val = 1 [(buf.validate.field).repeated.items.uint64.(uint64_even_proto2) = true];
}

message PredefinedRepeatedWrappedBoolRuleProto3 {
repeated google.protobuf.BoolValue val = 1 [(buf.validate.field).repeated.items.bool.(bool_false_proto2) = true];
}

message PredefinedRepeatedWrappedStringRuleProto3 {
repeated google.protobuf.StringValue val = 1 [(buf.validate.field).repeated.items.string.(string_valid_path_proto2) = true];
}

message PredefinedRepeatedWrappedBytesRuleProto3 {
repeated google.protobuf.BytesValue val = 1 [(buf.validate.field).repeated.items.bytes.(bytes_valid_path_proto2) = true];
}

message PredefinedAndCustomRuleProto3 {
sint32 a = 1 [
(field).cel = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,42 @@ message PredefinedWrappedBytesRuleEdition2023 {
google.protobuf.BytesValue val = 1 [(buf.validate.field).bytes.(bytes_valid_path_edition_2023) = true];
}

message PredefinedRepeatedWrappedFloatRuleEdition2023 {
repeated google.protobuf.FloatValue val = 1 [(buf.validate.field).repeated.items.float.(float_abs_range_edition_2023) = 1.0];
}

message PredefinedRepeatedWrappedDoubleRuleEdition2023 {
repeated google.protobuf.DoubleValue val = 1 [(buf.validate.field).repeated.items.double.(double_abs_range_edition_2023) = 1.0];
}

message PredefinedRepeatedWrappedInt32RuleEdition2023 {
repeated google.protobuf.Int32Value val = 1 [(buf.validate.field).repeated.items.int32.(int32_abs_in_edition_2023) = -2];
}

message PredefinedRepeatedWrappedInt64RuleEdition2023 {
repeated google.protobuf.Int64Value val = 1 [(buf.validate.field).repeated.items.int64.(int64_abs_in_edition_2023) = {value: -2}];
}

message PredefinedRepeatedWrappedUInt32RuleEdition2023 {
repeated google.protobuf.UInt32Value val = 1 [(buf.validate.field).repeated.items.uint32.(uint32_even_edition_2023) = true];
}

message PredefinedRepeatedWrappedUInt64RuleEdition2023 {
repeated google.protobuf.UInt64Value val = 1 [(buf.validate.field).repeated.items.uint64.(uint64_even_edition_2023) = true];
}

message PredefinedRepeatedWrappedBoolRuleEdition2023 {
repeated google.protobuf.BoolValue val = 1 [(buf.validate.field).repeated.items.bool.(bool_false_edition_2023) = true];
}

message PredefinedRepeatedWrappedStringRuleEdition2023 {
repeated google.protobuf.StringValue val = 1 [(buf.validate.field).repeated.items.string.(string_valid_path_edition_2023) = true];
}

message PredefinedRepeatedWrappedBytesRuleEdition2023 {
repeated google.protobuf.BytesValue val = 1 [(buf.validate.field).repeated.items.bytes.(bytes_valid_path_edition_2023) = true];
}

message PredefinedAndCustomRuleEdition2023 {
sint32 a = 1 [
(field).cel = {
Expand Down
Loading

0 comments on commit abd0f7b

Please sign in to comment.