mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-13 22:06:55 +00:00
2060a0491e
Create DrgnExporter to translate Type Graph "Type" nodes into drgn_type structs, suitable for use in OICache and TreeBuilder.
55 lines
2.8 KiB
TOML
55 lines
2.8 KiB
TOML
includes = ["queue"]
|
|
[cases]
|
|
[cases.int_empty]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/309
|
|
param_types = ["const std::priority_queue<int>&"]
|
|
setup = "return {};"
|
|
expect_json = '''[{
|
|
"typeName": "std::priority_queue<int32_t, std::vector<int32_t, std::allocator<int32_t>>, less<int>>",
|
|
"staticSize": 32, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4,
|
|
"members": [
|
|
{
|
|
"typeName": "std::vector<int32_t, std::allocator<int32_t>>",
|
|
"staticSize": 24, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4
|
|
}
|
|
]}]'''
|
|
[cases.int_some]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/309
|
|
param_types = ["const std::priority_queue<int>&"]
|
|
setup = "return std::priority_queue<int>({}, {3,2,1});"
|
|
expect_json = '''[{
|
|
"typeName": "std::priority_queue<int32_t, std::vector<int32_t, std::allocator<int32_t>>, less<int>>",
|
|
"staticSize": 32, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4,
|
|
"members": [
|
|
{
|
|
"typeName": "std::vector<int32_t, std::allocator<int32_t>>",
|
|
"staticSize": 24, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4
|
|
}
|
|
]}]'''
|
|
[cases.adapter_deque_empty]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/309
|
|
param_types = ["const std::priority_queue<int, std::deque<int>>&"]
|
|
setup = "return {};"
|
|
expect_json = '''[{
|
|
"typeName": "std::priority_queue<int32_t, std::deque<int32_t, std::allocator<int32_t>>, less<int>>",
|
|
"staticSize": 88, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4,
|
|
"members": [
|
|
{
|
|
"typeName": "std::deque<int32_t, std::allocator<int32_t>>",
|
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4
|
|
}
|
|
]}]'''
|
|
[cases.adapter_deque_some]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/309
|
|
param_types = ["const std::priority_queue<int, std::deque<int>>&"]
|
|
setup = "return std::priority_queue<int, std::deque<int>>({}, {3,2,1});"
|
|
expect_json = '''[{
|
|
"typeName": "std::priority_queue<int32_t, std::deque<int32_t, std::allocator<int32_t>>, less<int>>",
|
|
"staticSize": 88, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4,
|
|
"members": [
|
|
{
|
|
"typeName": "std::deque<int32_t, std::allocator<int32_t>>",
|
|
"staticSize": 80, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4
|
|
}
|
|
]}]'''
|