mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-10 05:26:56 +00:00
75 lines
2.0 KiB
TOML
75 lines
2.0 KiB
TOML
includes = ["optional", "cstdint", "vector"]
|
|
[cases]
|
|
[cases.uint64_empty]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/312
|
|
param_types = ["std::optional<std::uint64_t>&"]
|
|
setup = "return std::nullopt;"
|
|
expect_json = '''
|
|
[
|
|
{
|
|
"staticSize": 16,
|
|
"dynamicSize": 0,
|
|
"exclusiveSize": 16,
|
|
"length": 0,
|
|
"capacity": 1,
|
|
"elementStaticSize": 8
|
|
}
|
|
]
|
|
'''
|
|
[cases.uint64_present]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/312
|
|
param_types = ["std::optional<std::uint64_t>&"]
|
|
setup = "return 64;"
|
|
expect_json = '''
|
|
[
|
|
{
|
|
"staticSize": 16,
|
|
"dynamicSize": 0,
|
|
"exclusiveSize": 16,
|
|
"length": 1,
|
|
"capacity": 1,
|
|
"elementStaticSize": 8
|
|
}
|
|
]
|
|
'''
|
|
[cases.vector_empty]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/312
|
|
param_types = ["std::optional<std::vector<std::uint64_t>>&"]
|
|
setup = "return std::nullopt;"
|
|
expect_json = '''
|
|
[
|
|
{
|
|
"staticSize": 32,
|
|
"dynamicSize": 0,
|
|
"exclusiveSize": 32,
|
|
"length": 0,
|
|
"capacity": 1,
|
|
"elementStaticSize": 24
|
|
}
|
|
]
|
|
'''
|
|
[cases.vector_present]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/312
|
|
param_types = ["std::optional<std::vector<std::uint64_t>>&"]
|
|
setup = "return {{{1,2,3,4,5}}};"
|
|
expect_json = '''
|
|
[
|
|
{
|
|
"staticSize": 32,
|
|
"dynamicSize": 40,
|
|
"exclusiveSize": 8,
|
|
"length": 1,
|
|
"capacity": 1,
|
|
"elementStaticSize": 24,
|
|
"members": [
|
|
{
|
|
"staticSize": 24,
|
|
"dynamicSize": 40,
|
|
"exclusiveSize": 64,
|
|
"length": 5
|
|
}
|
|
]
|
|
}
|
|
]
|
|
'''
|