object-introspection/test/integration/std_tuple.toml
Jake Hillion a9afb25248 tbv2: update tuple test
This test is a bit odd, but this change adds the full set of size/member checks
for the hierarchy for TreeBuilder v2 and enables it.

Closes #304

Test Plan:
- CI
2024-01-11 13:39:19 +00:00

49 lines
1.1 KiB
TOML

includes = ["tuple"]
definitions = '''
struct Foo {
std::tuple<uint64_t, uint64_t> t;
};
struct Bar {
std::optional<Foo> f;
};
'''
[cases]
[cases.uint64_uint64]
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
}
]
}
]
'''
expect_json_v2 = '''[
{ "size":24, "staticSize":24, "exclusiveSize":0, "members":[
{"size":24, "staticSize":24, "exclusiveSize":8, "members":[
{"size":16, "staticSize":16, "exclusiveSize":0, "members": [
{"size":16, "staticSize":16, "exclusiveSize":0, "members": [
{"size":8, "staticSize":8, "exclusiveSize":8, "members":[]},
{"size":8, "staticSize":8, "exclusiveSize":8, "members":[]}
]}
]}
]}
]}
]'''