mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-10 05:26:56 +00:00
28b813c6db
Summary: Stubbing tuple without alignment info can cause failures. I added a test case for this which failed before this fix but works now. Test Plan: Ran the test.
37 lines
642 B
TOML
37 lines
642 B
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
|
|
}
|
|
]
|
|
}
|
|
]
|
|
'''
|