File: enum.proto

package info (click to toggle)
python-aristaproto 1.2%2B20240521-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 1,484 kB
  • sloc: python: 5,915; java: 106; xml: 84; makefile: 6
file content (25 lines) | stat: -rw-r--r-- 553 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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;
}