mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-13 22:06:55 +00:00
94 lines
2.1 KiB
TOML
94 lines
2.1 KiB
TOML
includes = ["array", "cstdint", "vector"]
|
|
[cases]
|
|
[cases.uint64_length_0]
|
|
param_types = ["std::array<std::uint64_t, 0>&"]
|
|
setup = "return {{}};"
|
|
expect_json = '''
|
|
[
|
|
{
|
|
"staticSize": 1,
|
|
"dynamicSize": 0,
|
|
"exclusiveSize": 1,
|
|
"length": 0,
|
|
"capacity": 0,
|
|
"elementStaticSize": 8
|
|
}
|
|
]
|
|
'''
|
|
[cases.uint64_length_1]
|
|
param_types = ["std::array<std::uint64_t, 1>&"]
|
|
setup = "return {{1}};"
|
|
expect_json = '''
|
|
[
|
|
{
|
|
"staticSize": 8,
|
|
"dynamicSize": 0,
|
|
"exclusiveSize": 8,
|
|
"length": 1,
|
|
"capacity": 1,
|
|
"elementStaticSize": 8
|
|
}
|
|
]
|
|
'''
|
|
[cases.uint64_length_8]
|
|
param_types = ["std::array<std::uint64_t, 8>&"]
|
|
setup = "return {{0,1,2,3,4,5,6,7}};"
|
|
expect_json = '''
|
|
[
|
|
{
|
|
"staticSize": 64,
|
|
"dynamicSize": 0,
|
|
"length": 8,
|
|
"capacity": 8,
|
|
"elementStaticSize": 8
|
|
}
|
|
]
|
|
'''
|
|
[cases.vector_length_1]
|
|
param_types = ["std::array<std::vector<std::uint64_t>, 1>&"]
|
|
setup = "return {{std::initializer_list<std::uint64_t>({1,2,3,4,5})}};"
|
|
expect_json = '''
|
|
[
|
|
{
|
|
"staticSize": 24,
|
|
"dynamicSize": 40,
|
|
"length": 1,
|
|
"capacity": 1,
|
|
"elementStaticSize": 24,
|
|
"members": [
|
|
{
|
|
"staticSize": 24,
|
|
"dynamicSize": 40
|
|
}
|
|
]
|
|
}
|
|
]
|
|
'''
|
|
[cases.vector_length_2]
|
|
param_types = ["std::array<std::vector<std::uint64_t>, 2>&"]
|
|
setup = "return {{std::initializer_list<std::uint64_t>({1,2,3,4,5}), std::initializer_list<std::uint64_t>({6,7,8,9})}};"
|
|
expect_json = '''
|
|
[
|
|
{
|
|
"staticSize": 48,
|
|
"dynamicSize": 72,
|
|
"exclusiveSize": 0,
|
|
"length": 2,
|
|
"capacity": 2,
|
|
"elementStaticSize": 24,
|
|
"members": [
|
|
{
|
|
"staticSize": 24,
|
|
"dynamicSize": 40,
|
|
"exclusiveSize": 64
|
|
},
|
|
{
|
|
"staticSize": 24,
|
|
"dynamicSize": 32,
|
|
"exclusiveSize": 56
|
|
}
|
|
]
|
|
}
|
|
]
|
|
'''
|