Fix: to_dict returns wrong enum fields when numbering is not consecutive (#102)
Fixes #93 to_dict returns wrong enum fields when numbering is not consecutive
This commit is contained in:
15
tests/inputs/enum/enum.proto
Normal file
15
tests/inputs/enum/enum.proto
Normal file
@@ -0,0 +1,15 @@
|
||||
syntax = "proto3";
|
||||
|
||||
// Tests that enums are correctly serialized and that it correctly handles skipped and out-of-order enum values
|
||||
message Test {
|
||||
Choice choice = 1;
|
||||
repeated Choice choices = 2;
|
||||
}
|
||||
|
||||
enum Choice {
|
||||
ZERO = 0;
|
||||
ONE = 1;
|
||||
// TWO = 2;
|
||||
FOUR = 4;
|
||||
THREE = 3;
|
||||
}
|
||||
Reference in New Issue
Block a user