2022-12-19 14:37:51 +00:00
|
|
|
includes = ["array", "cstdint", "vector"]
|
|
|
|
[cases]
|
2023-03-28 16:15:09 +01:00
|
|
|
[cases.uint64_length_0]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["std::array<std::uint64_t, 0>&"]
|
|
|
|
setup = "return {{}};"
|
|
|
|
expect_json = '''
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"staticSize": 1,
|
|
|
|
"dynamicSize": 0,
|
2023-03-03 20:09:51 +00:00
|
|
|
"exclusiveSize": 1,
|
2022-12-19 14:37:51 +00:00
|
|
|
"length": 0,
|
|
|
|
"capacity": 0,
|
|
|
|
"elementStaticSize": 8
|
|
|
|
}
|
|
|
|
]
|
|
|
|
'''
|
2023-03-28 16:15:09 +01:00
|
|
|
[cases.uint64_length_1]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["std::array<std::uint64_t, 1>&"]
|
|
|
|
setup = "return {{1}};"
|
|
|
|
expect_json = '''
|
|
|
|
[
|
|
|
|
{
|
|
|
|
"staticSize": 8,
|
|
|
|
"dynamicSize": 0,
|
2023-03-03 20:09:51 +00:00
|
|
|
"exclusiveSize": 8,
|
2022-12-19 14:37:51 +00:00
|
|
|
"length": 1,
|
|
|
|
"capacity": 1,
|
|
|
|
"elementStaticSize": 8
|
|
|
|
}
|
|
|
|
]
|
|
|
|
'''
|
2023-03-28 16:15:09 +01:00
|
|
|
[cases.uint64_length_8]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
|
2022-12-19 14:37:51 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
]
|
|
|
|
'''
|
2023-03-28 16:15:09 +01:00
|
|
|
[cases.vector_length_1]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
|
2022-12-19 14:37:51 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
'''
|
2023-03-28 16:15:09 +01:00
|
|
|
[cases.vector_length_2]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
|
2022-12-19 14:37:51 +00:00
|
|
|
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,
|
2023-03-03 20:09:51 +00:00
|
|
|
"exclusiveSize": 0,
|
2022-12-19 14:37:51 +00:00
|
|
|
"length": 2,
|
|
|
|
"capacity": 2,
|
|
|
|
"elementStaticSize": 24,
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"staticSize": 24,
|
2023-03-03 20:09:51 +00:00
|
|
|
"dynamicSize": 40,
|
|
|
|
"exclusiveSize": 64
|
2022-12-19 14:37:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"staticSize": 24,
|
2023-03-03 20:09:51 +00:00
|
|
|
"dynamicSize": 32,
|
|
|
|
"exclusiveSize": 56
|
2022-12-19 14:37:51 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
]
|
|
|
|
'''
|