2023-07-11 17:10:40 +01:00
|
|
|
includes = ["tuple"]
|
|
|
|
definitions = '''
|
|
|
|
struct Foo {
|
|
|
|
std::tuple<uint64_t, uint64_t> t;
|
|
|
|
};
|
|
|
|
struct Bar {
|
|
|
|
std::optional<Foo> f;
|
|
|
|
};
|
|
|
|
'''
|
|
|
|
[cases]
|
|
|
|
[cases.uint64_uint64]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = "std::tuple is not implemented for treebuilder v2" # https://github.com/facebookexperimental/object-introspection/issues/304
|
2023-07-11 17:10:40 +01:00
|
|
|
param_types = ["Bar&"]
|
|
|
|
setup = '''
|
|
|
|
Foo f;
|
|
|
|
f.t = std::make_tuple<uint64_t, uint64_t>(1,2);
|
|
|
|
Bar b;
|
|
|
|
b.f = f;
|
|
|
|
return b;
|
|
|
|
'''
|
|
|
|
expect_json = '''
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"staticSize": 24,
|
|
|
|
"dynamicSize": 0,
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"staticSize": 24,
|
|
|
|
"dynamicSize": 0,
|
|
|
|
"length": 1,
|
|
|
|
"capacity": 1,
|
|
|
|
"elementStaticSize": 16
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
'''
|