File: test_union.golden

package info (click to toggle)
flatbuffers 2.0.8%2Bdfsg1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 14,308 kB
  • sloc: cpp: 44,808; python: 6,544; cs: 4,852; java: 4,389; ansic: 1,615; php: 1,455; xml: 973; javascript: 938; sh: 806; makefile: 35
file content (77 lines) | stat: -rw-r--r-- 1,292 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Generated from test.proto

namespace proto.test;

/// Enum doc comment.
enum ProtoEnum : int {
  NUL = 0,
  FOO = 1,
  /// Enum 2nd value doc comment misaligned.
  BAR = 5,
}

namespace proto.test.ProtoMessage_.OtherMessage_;

enum ProtoEnum : int {
  NUL = 0,
  FOO = 1,
  BAR = 2,
  BAZ = 3,
}

namespace proto.test.ProtoMessage_;

union RUnion {
  /// doc comment for s.
  proto.test.ImportedMessage,
  /// doc comment for t on 2
  /// lines.
  proto.test.ProtoMessage_.OtherMessage,
}

namespace proto.test;

table ImportedMessage {
  a:int;
}

/// 2nd table doc comment with
/// many lines.
table ProtoMessage {
  c:int = 16;
  d:long;
  p:uint;
  e:ulong;
  /// doc comment for f.
  f:int = -1;
  g:long;
  h:uint;
  q:ulong;
  i:int;
  j:long;
  /// doc comment for k.
  k:bool;
  /// doc comment for l on 2
  /// lines
  l:string (required);
  m:[ubyte];
  n:proto.test.ProtoMessage_.OtherMessage;
  o:[string];
  z:proto.test.ImportedMessage;
  /// doc comment for r.
  r:proto.test.ProtoMessage_.RUnion;
  outer_enum:proto.test.ProtoEnum;
  u:float = +inf;
  v:float = +inf;
  w:float = -inf;
}

namespace proto.test.ProtoMessage_;

table OtherMessage {
  a:double;
  /// doc comment for b.
  b:float = 3.14149;
  foo_bar_baz:proto.test.ProtoMessage_.OtherMessage_.ProtoEnum;
}