-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(textproto indexer): implement and test repeated extension fields (#…
…50)
- Loading branch information
1 parent
e9b68f1
commit e658b1c
Showing
4 changed files
with
48 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
kythe/cxx/indexer/textproto/testdata/repeated_extension.pbtxt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# proto-file: repeated_extension.proto | ||
# proto-message: repeated_extension_test.Extendee | ||
|
||
#- @"repeated_extension_test.Extension.ext" ref Ext | ||
[repeated_extension_test.Extension.ext] { | ||
#- @str_field ref ExtensionStrField | ||
str_field: "test" | ||
} | ||
|
||
#- @"repeated_extension_test.Extension.ext" ref Ext | ||
[repeated_extension_test.Extension.ext] { | ||
#- @str_field ref ExtensionStrField | ||
str_field: "test2" | ||
} |
17 changes: 17 additions & 0 deletions
17
kythe/cxx/indexer/textproto/testdata/repeated_extension.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
syntax = "proto2"; | ||
|
||
package repeated_extension_test; | ||
|
||
message Extendee { | ||
extensions 100 to max; | ||
} | ||
|
||
message Extension { | ||
extend Extendee { | ||
//- @ext defines/binding Ext? | ||
repeated Extension ext = 1000; | ||
} | ||
|
||
//- @str_field defines/binding ExtensionStrField? | ||
optional string str_field = 1; | ||
} |