Skip to content

Commit

Permalink
feat: include _unknownFields as a field (#806)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzeng0 committed Mar 26, 2023
1 parent 069dc01 commit 6b4ba39
Show file tree
Hide file tree
Showing 10 changed files with 576 additions and 449 deletions.
5 changes: 0 additions & 5 deletions integration/groups/groups-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@ describe('groups-test', () => {
const result = GroupsOptionalTest.decode(data);

expect(result).toEqual({
int1: 0,
group: {
key: '',
value: 'key',
_unknownFields: {
[(15 << 3) | 2]: [Buffer.from([2, 1, 2])]
Expand Down Expand Up @@ -79,14 +77,12 @@ describe('groups-test', () => {
int1: [1, 2, 3, 4],
group: [
{
key: [],
value: ['key'],
_unknownFields: {
[(10 << 3) | 2]: [Buffer.from([2, 0xa, 0xb])]
}
},
],
int3: [],
_unknownFields: {
[(27 << 3) | 2]: [Buffer.from([2, 0x10, 0x20])]
}
Expand Down Expand Up @@ -133,7 +129,6 @@ describe('groups-test', () => {
const result = GroupsNestedTest.decode(data);

expect(result).toEqual({
int1: [],
...test
});
});
Expand Down
2 changes: 1 addition & 1 deletion integration/groups/parameters.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
useOptionals=all,unknownFields=true
useOptionals=all,unknownFields=true,initializeFieldsAsUndefined=false
Loading

0 comments on commit 6b4ba39

Please sign in to comment.