Skip to content

Commit 9fff31d

Browse files
roblablakalzoo
authored andcommitted
Add test with optional enum
1 parent 1bc9673 commit 9fff31d

File tree

4 files changed

+30
-5
lines changed

4 files changed

+30
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
{
2-
"test1": null,
3-
"test2": null,
4-
"test3": null,
5-
"test4": null,
6-
"test5": null
2+
"test1": 128,
3+
"test2": true,
4+
"test3": "A value",
5+
"test4": "aGVsbG8=",
6+
"test5": {
7+
"test": "Hello"
8+
},
9+
"test6": "B"
710
}

tests/inputs/proto3_field_presence/proto3_field_presence.proto

+6
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,10 @@ message Test {
1010
optional string test3 = 3;
1111
optional bytes test4 = 4;
1212
optional InnerTest test5 = 5;
13+
optional TestEnum test6 = 6;
14+
}
15+
16+
enum TestEnum {
17+
A = 0;
18+
B = 1;
1319
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"test1": null,
3+
"test2": null,
4+
"test3": null,
5+
"test4": null,
6+
"test5": null,
7+
"test6": null
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"test1": 0,
3+
"test2": false,
4+
"test3": "",
5+
"test4": "",
6+
"test5": null,
7+
"test6": "A"
8+
}

0 commit comments

Comments
 (0)