mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-14 14:26:55 +00:00
109 lines
4.3 KiB
TOML
109 lines
4.3 KiB
TOML
|
includes = ["queue"]
|
||
|
[cases]
|
||
|
[cases.int_empty]
|
||
|
param_types = ["const std::queue<int>&"]
|
||
|
setup = "return {};"
|
||
|
expect_json = '''[{
|
||
|
"typeName": "queue<int, std::deque<int, std::allocator<int> > >",
|
||
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4,
|
||
|
"members": [
|
||
|
{
|
||
|
"typeName": "deque<int, std::allocator<int> >",
|
||
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4
|
||
|
}
|
||
|
]}]'''
|
||
|
[cases.int_some]
|
||
|
param_types = ["const std::queue<int>&"]
|
||
|
setup = "return std::queue<int>({1,2,3});"
|
||
|
expect_json = '''[{
|
||
|
"typeName": "queue<int, std::deque<int, std::allocator<int> > >",
|
||
|
"staticSize": 80, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4,
|
||
|
"members": [
|
||
|
{
|
||
|
"typeName": "deque<int, std::allocator<int> >",
|
||
|
"staticSize": 80, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4
|
||
|
}
|
||
|
]}]'''
|
||
|
[cases.queue_int_empty]
|
||
|
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]
|
||
|
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": [
|
||
|
{
|
||
|
"typeName": "queue<int, std::deque<int, std::allocator<int> > >",
|
||
|
"staticSize": 80, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4,
|
||
|
"members": [
|
||
|
{
|
||
|
"typeName": "deque<int, std::allocator<int> >",
|
||
|
"staticSize": 80, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"typeName": "queue<int, std::deque<int, std::allocator<int> > >",
|
||
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4,
|
||
|
"members": [
|
||
|
{
|
||
|
"typeName": "deque<int, std::allocator<int> >",
|
||
|
"staticSize": 80, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"typeName": "queue<int, std::deque<int, std::allocator<int> > >",
|
||
|
"staticSize": 80, "dynamicSize": 8, "length": 2, "capacity": 2, "elementStaticSize": 4,
|
||
|
"members": [
|
||
|
{
|
||
|
"typeName": "deque<int, std::allocator<int> >",
|
||
|
"staticSize": 80, "dynamicSize": 8, "length": 2, "capacity": 2, "elementStaticSize": 4
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]}]'''
|
||
|
[cases.adapter_vector_empty]
|
||
|
param_types = ["const std::queue<int, std::vector<int>>&"]
|
||
|
setup = "return {};"
|
||
|
expect_json = '''[{
|
||
|
"typeName": "queue<int, std::vector<int, std::allocator<int> > >",
|
||
|
"staticSize": 24, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4,
|
||
|
"members": [
|
||
|
{
|
||
|
"typeName": "vector<int, std::allocator<int> >",
|
||
|
"staticSize": 24, "dynamicSize": 0, "length": 0, "capacity": 0, "elementStaticSize": 4
|
||
|
}
|
||
|
]}]'''
|
||
|
[cases.adapter_vector_some]
|
||
|
param_types = ["const std::queue<int, std::vector<int>>&"]
|
||
|
setup = "return std::queue<int, std::vector<int>>({1,2,3});"
|
||
|
expect_json = '''[{
|
||
|
"typeName": "queue<int, std::vector<int, std::allocator<int> > >",
|
||
|
"staticSize": 24, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4,
|
||
|
"members": [
|
||
|
{
|
||
|
"typeName": "vector<int, std::allocator<int> >",
|
||
|
"staticSize": 24, "dynamicSize": 12, "length": 3, "capacity": 3, "elementStaticSize": 4
|
||
|
}
|
||
|
]}]'''
|