object-introspection/test/integration/std_list_del_allocator.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.7 KiB
TOML
Raw Normal View History

2022-12-19 14:37:51 +00:00
definitions = '''
namespace nsA {
struct C {
int a;
};
}
namespace nsB {
struct C {
int b;
};
}
template<typename T>
class CustomAllocator: public std::allocator<T>
{
};
// Naming conflict will only work if OI deletes the allocator field
struct Foo {
std::list<nsA::C, CustomAllocator<nsA::C>> v1;
std::list<nsB::C, CustomAllocator<nsB::C>> v2;
};
'''
includes = ["list"]
[cases]
[cases.a]
2023-08-16 20:40:36 +01:00
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/315
2022-12-19 14:37:51 +00:00
param_types = ["const Foo&"]
setup = '''
Foo foo;
foo.v1.resize(1);
foo.v2.resize(2);
return {foo};
'''
expect_json = '''[{
"staticSize":48,
"dynamicSize":12,
"members":[
{"name":"v1", "staticSize":24, "dynamicSize":4, "length":1, "capacity":1, "elementStaticSize":4,
"members":[
{"name":"", "typeName": "C", "staticSize":4, "dynamicSize":0,
"members":[
{"name":"a", "typeName": "int", "staticSize":4, "dynamicSize":0}
]}
]},
{"name":"v2", "staticSize":24, "dynamicSize":8, "length":2, "capacity":2, "elementStaticSize":4,
"members":[
{"name":"", "typeName": "C", "staticSize":4, "dynamicSize":0,
"members":[
{"name":"b", "typeName": "int", "staticSize":4, "dynamicSize":0}
]},
{"name":"", "typeName": "C", "staticSize":4, "dynamicSize":0,
"members":[
{"name":"b", "typeName": "int", "staticSize":4, "dynamicSize":0}
]}
]}
]}]'''