2 * Copyright (c) Facebook, Inc. and its affiliates.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 namespace cpp thrift.test.debug
18 namespace py thrift.test.UnionTest
20 typedef binary (cpp.type = "folly::IOBuf") IOBuf
26 4: i16 integer16 = 32767;
28 6: i64 integer64 = 1000000000;
29 7: double double_precision;
30 8: string some_characters;
31 9: string zomg_unicode;
34 12: list<byte> byte_list = [1, 2, 3];
35 13: list<i16> i16_list = [1, 2, 3];
36 14: list<i64> i64_list = [1, 2, 3];
45 5: list<i32> myintlist;
54 1: string string_field;
56 3: OneOfEach struct_field;
57 4: list<RandomStuff> struct_list;
58 5: i32 other_i32_field;
59 6: OneOfEach ref_field (cpp.ref = "true");
62 struct StructWithAUnion {
63 1: TestUnion test_union;
66 struct NonCopyableStruct {
70 union NonCopyableUnion {
73 3: NonCopyableStruct ncs;
74 } (cpp.noncopyable, cpp.noncomparable)
76 union NoExceptMoveUnion {
77 1: string string_field;
79 3: OneOfEach struct_field;
82 union CppRefContainers {
83 1: list<CppRefContainers> values (cpp.ref);