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:
Bouke Versteegh
2020-07-12 15:06:55 +02:00
committed by GitHub
parent 0ba0692dec
commit 6c29771f4c
7 changed files with 166 additions and 56 deletions

View 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;
}