Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
jhump committed Mar 6, 2024
1 parent 086468c commit 0f6ac24
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion private/bufpkg/bufcheck/buflint/buflint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,8 @@ func TestRunProtovalidateRules(t *testing.T) {
bufanalysistesting.NewFileAnnotation(t, "number.proto", 35, 5, 35, 43, "PROTOVALIDATE"),
bufanalysistesting.NewFileAnnotation(t, "number.proto", 39, 5, 39, 43, "PROTOVALIDATE"),
bufanalysistesting.NewFileAnnotation(t, "number.proto", 42, 5, 42, 42, "PROTOVALIDATE"),
bufanalysistesting.NewFileAnnotation(t, "number.proto", 45, 48, 48, 4, "PROTOVALIDATE"),
bufanalysistesting.NewFileAnnotation(t, "number.proto", 46, 5, 46, 11, "PROTOVALIDATE"),
bufanalysistesting.NewFileAnnotation(t, "number.proto", 47, 5, 47, 12, "PROTOVALIDATE"),
bufanalysistesting.NewFileAnnotation(t, "number.proto", 56, 5, 56, 39, "PROTOVALIDATE"),
bufanalysistesting.NewFileAnnotation(t, "number.proto", 65, 5, 65, 41, "PROTOVALIDATE"),
bufanalysistesting.NewFileAnnotation(t, "number.proto", 74, 5, 74, 40, "PROTOVALIDATE"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ message Int32Test {
// the next line should be annotated
(buf.validate.field).sfixed64.gt = 10
];
// the entire option should be annotated. (45, 48) to (48, 4)
// annotating items inside an option value
fixed32 invalid_bound_aggregate_syntax = 11 [(buf.validate.field).fixed32 = {
lt: 10
gte: 10
lt: 10 // this line should be annotated
gte: 10 // and this one, too
}];
// valid
google.protobuf.Int32Value int32_value_match = 12 [
Expand Down

0 comments on commit 0f6ac24

Please sign in to comment.