diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-29 09:40:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-07-29 09:40:12 +0000 |
commit | 14b40ec77a4bf8605789cc3aff0eb87625510a41 (patch) | |
tree | 4064d27144d6deaabfcd96df01bd996baa8b51a0 /tests/inputs/enum/enum.proto | |
parent | Initial commit. (diff) | |
download | python-aristaproto-14b40ec77a4bf8605789cc3aff0eb87625510a41.tar.xz python-aristaproto-14b40ec77a4bf8605789cc3aff0eb87625510a41.zip |
Adding upstream version 1.2+20240521.upstream/1.2+20240521upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/inputs/enum/enum.proto')
-rw-r--r-- | tests/inputs/enum/enum.proto | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/inputs/enum/enum.proto b/tests/inputs/enum/enum.proto new file mode 100644 index 0000000..5e2e80c --- /dev/null +++ b/tests/inputs/enum/enum.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package enum; + +// 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; +} + +// A "C" like enum with the enum name prefixed onto members, these should be stripped +enum ArithmeticOperator { + ARITHMETIC_OPERATOR_NONE = 0; + ARITHMETIC_OPERATOR_PLUS = 1; + ARITHMETIC_OPERATOR_MINUS = 2; + ARITHMETIC_OPERATOR_0_PREFIXED = 3; +} |