2022-12-19 14:37:51 +00:00
|
|
|
includes = ["queue"]
|
|
|
|
[cases]
|
|
|
|
[cases.int_empty]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/308
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::queue<int>&"]
|
|
|
|
setup = "return {};"
|
|
|
|
expect_json = '''[{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::queue<int32_t, std::deque<int32_t, std::allocator<int32_t>>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4,
|
|
|
|
"members": [
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::deque<int32_t, std::allocator<int32_t>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4
|
|
|
|
}
|
|
|
|
]}]'''
|
|
|
|
[cases.int_some]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/308
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::queue<int>&"]
|
|
|
|
setup = "return std::queue<int>({1,2,3});"
|
|
|
|
expect_json = '''[{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::queue<int32_t, std::deque<int32_t, std::allocator<int32_t>>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4,
|
|
|
|
"members": [
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::deque<int32_t, std::allocator<int32_t>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4
|
|
|
|
}
|
|
|
|
]}]'''
|
|
|
|
[cases.queue_int_empty]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/308
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::queue<std::queue<int>>&"]
|
|
|
|
setup = "return {};"
|
|
|
|
expect_json = '''[{
|
|
|
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 80,
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 80
|
|
|
|
}
|
|
|
|
]}]'''
|
|
|
|
[cases.queue_int_some]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/308
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::queue<std::queue<int>>&"]
|
|
|
|
setup = '''
|
|
|
|
return std::queue<std::queue<int>>({
|
|
|
|
std::queue<int>({1,2,3}),
|
|
|
|
std::queue<int>(),
|
|
|
|
std::queue<int>({4,5})
|
|
|
|
});
|
|
|
|
'''
|
|
|
|
expect_json = '''[{
|
|
|
|
"staticSize": 80, "dynamicSize": 260, "length": 3, "capacity": 3, "elementStaticSize": 80,
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"staticSize": 80, "dynamicSize": 260, "length": 3, "capacity": 3, "elementStaticSize": 80,
|
|
|
|
"members": [
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::queue<int32_t, std::deque<int32_t, std::allocator<int32_t>>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4,
|
|
|
|
"members": [
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::deque<int32_t, std::allocator<int32_t>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::queue<int32_t, std::deque<int32_t, std::allocator<int32_t>>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4,
|
|
|
|
"members": [
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::deque<int32_t, std::allocator<int32_t>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::queue<int32_t, std::deque<int32_t, std::allocator<int32_t>>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 8, "length": 2, "capacity": 2, "elementStaticSize": 4,
|
|
|
|
"members": [
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::deque<int32_t, std::allocator<int32_t>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 80, "dynamicSize": 8, "length": 2, "capacity": 2, "elementStaticSize": 4
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]}]'''
|
|
|
|
[cases.adapter_vector_empty]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/308
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::queue<int, std::vector<int>>&"]
|
|
|
|
setup = "return {};"
|
|
|
|
expect_json = '''[{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::queue<int32_t, std::vector<int32_t, std::allocator<int32_t>>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 24, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4,
|
|
|
|
"members": [
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::vector<int32_t, std::allocator<int32_t>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 24, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4
|
|
|
|
}
|
|
|
|
]}]'''
|
|
|
|
[cases.adapter_vector_some]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/308
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::queue<int, std::vector<int>>&"]
|
|
|
|
setup = "return std::queue<int, std::vector<int>>({1,2,3});"
|
|
|
|
expect_json = '''[{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::queue<int32_t, std::vector<int32_t, std::allocator<int32_t>>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 24, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4,
|
|
|
|
"members": [
|
|
|
|
{
|
2023-12-13 16:49:41 +00:00
|
|
|
"typeName": "std::vector<int32_t, std::allocator<int32_t>>",
|
2022-12-19 14:37:51 +00:00
|
|
|
"staticSize": 24, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4
|
|
|
|
}
|
|
|
|
]}]'''
|