mirror of
https://github.com/JakeHillion/object-introspection.git
synced 2024-11-10 05:26:56 +00:00
51 lines
3.5 KiB
TOML
51 lines
3.5 KiB
TOML
includes = ["folly/small_vector.h", "vector"]
|
|
[cases]
|
|
[cases.int_default_empty]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/321
|
|
param_types = ["const folly::small_vector<int>&"]
|
|
setup = "return {};"
|
|
expect_json = '[{"staticSize":16, "dynamicSize":0, "exclusiveSize":16, "length":0, "capacity":2, "elementStaticSize":4}]'
|
|
[cases.int_default_inlined]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/321
|
|
param_types = ["const folly::small_vector<int>&"]
|
|
setup = "return {{1,2}};"
|
|
expect_json = '[{"staticSize":16, "dynamicSize":0, "exclusiveSize":16, "length":2, "capacity":2, "elementStaticSize":4}]'
|
|
[cases.int_default_overflow]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/321
|
|
param_types = ["const folly::small_vector<int>&"]
|
|
setup = "return {{1,2,3,4}};"
|
|
expect_json = '[{"staticSize":16, "dynamicSize":24, "exclusiveSize":40, "length":4, "capacity":6, "elementStaticSize":4}]'
|
|
|
|
[cases.vector_3_empty]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/321
|
|
param_types = ["const folly::small_vector<std::vector<int>, 3>&"]
|
|
setup = "return {};"
|
|
expect_json = '[{"staticSize":80, "dynamicSize":0, "exclusiveSize":80, "length":0, "capacity":3, "elementStaticSize":24}]'
|
|
[cases.vector_3_inlined]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/321
|
|
param_types = ["const folly::small_vector<std::vector<int>, 3>&"]
|
|
setup = "return {{ {1,2,3}, {4}, {5,6} }};"
|
|
expect_json = '''[
|
|
{"staticSize":80, "dynamicSize":24, "length":3, "exclusiveSize":8, "capacity":3, "elementStaticSize":24, "members":[
|
|
{"staticSize":24, "dynamicSize":12, "exclusiveSize":36, "length":3, "capacity":3, "elementStaticSize":4},
|
|
{"staticSize":24, "dynamicSize":4, "exclusiveSize":28, "length":1, "capacity":1, "elementStaticSize":4},
|
|
{"staticSize":24, "dynamicSize":8, "exclusiveSize":32, "length":2, "capacity":2, "elementStaticSize":4}
|
|
]}]'''
|
|
[cases.vector_3_overflow]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/321
|
|
param_types = ["const folly::small_vector<std::vector<int>, 3>&"]
|
|
setup = "return {{ {1,2,3}, {4}, {5,6}, {7} }};"
|
|
expect_json = '''[
|
|
{"staticSize":80, "dynamicSize":148, "length":4, "exclusiveSize":104, "capacity":5, "elementStaticSize":24, "members":[
|
|
{"staticSize":24, "dynamicSize":12, "exclusiveSize":36, "length":3, "capacity":3, "elementStaticSize":4},
|
|
{"staticSize":24, "dynamicSize":4, "exclusiveSize":28, "length":1, "capacity":1, "elementStaticSize":4},
|
|
{"staticSize":24, "dynamicSize":8, "exclusiveSize":32, "length":2, "capacity":2, "elementStaticSize":4},
|
|
{"staticSize":24, "dynamicSize":4, "exclusiveSize":28, "length":1, "capacity":1, "elementStaticSize":4}
|
|
]}]'''
|
|
|
|
[cases.int_always_heap]
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/321
|
|
param_types = ["const folly::small_vector<int, 0>&"]
|
|
setup = "return {{1}};"
|
|
expect_json = '[{"staticSize":16, "dynamicSize":4, "exclusiveSize":20, "length":1, "capacity":1, "elementStaticSize":4}]'
|