object-introspection/test/integration/std_array.toml
Jake Hillion 5071519e45 oil v2
2023-08-23 15:59:53 +01:00

99 lines
2.7 KiB
TOML

includes = ["array", "cstdint", "vector"]
[cases]
[cases.uint64_length_0]
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
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]
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
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]
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
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]
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
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]
oil_skip = 'needs updating for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/318
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
}
]
}
]
'''