object-introspection/test/integration/folly_sorted_vector_map.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

51 lines
2.7 KiB
TOML
Raw Normal View History

includes = ["folly/sorted_vector_types.h", "vector"]
[cases]
[cases.int_int_empty]
param_types = ["const folly::sorted_vector_map<int, int>&"]
setup = "return {};"
expect_json = '[{"staticSize":24, "dynamicSize":0, "exclusiveSize":24, "length":0, "capacity":0, "elementStaticSize":8}]'
expect_json_v2 = '[{"staticSize":24, "exclusiveSize":24, "size":24, "length":0, "capacity":0, "members":[]}]'
[cases.int_int_some]
param_types = ["const folly::sorted_vector_map<int, int>&"]
setup = "return {{ {1,2}, {3,4} }};"
expect_json = '[{"staticSize":24, "dynamicSize":16, "exclusiveSize":40, "length":2, "capacity":2, "elementStaticSize":8}]'
expect_json_v2 = '''[{"staticSize":24, "exclusiveSize":24, "size":40, "length":2, "capacity":2, "members":[
{"staticSize":8, "exclusiveSize":0, "size":8, "members": [
{"name":"key", "staticSize":4, "exclusiveSize":4, "size":4},
{"name":"value", "staticSize":4, "exclusiveSize":4, "size":4}
2023-08-16 20:40:36 +01:00
]},
{"staticSize":8, "exclusiveSize":0, "size":8, "members": [
{"name":"key", "staticSize":4, "exclusiveSize":4, "size":4},
{"name":"value", "staticSize":4, "exclusiveSize":4, "size":4}
2023-08-16 20:40:36 +01:00
]}
]}]'''
[cases.int_int_reserve]
param_types = ["const folly::sorted_vector_map<int, int>&"]
setup = '''
folly::sorted_vector_map<int, int> m{{ {1,2}, {3,4} }};
m.reserve(10);
return m;
'''
expect_json = '[{"staticSize":24, "dynamicSize":80, "exclusiveSize":104, "length":2, "capacity":10, "elementStaticSize":8}]'
expect_json_v2 = '''[{"staticSize":24, "exclusiveSize":88, "size":104, "length":2, "capacity":10, "members":[
{"staticSize":8, "exclusiveSize":0, "size":8, "members": [
{"name":"key", "staticSize":4, "exclusiveSize":4, "size":4},
{"name":"value", "staticSize":4, "exclusiveSize":4, "size":4}
2023-08-16 20:40:36 +01:00
]},
{"staticSize":8, "exclusiveSize":0, "size":8, "members": [
{"name":"key", "staticSize":4, "exclusiveSize":4, "size":4},
{"name":"value", "staticSize":4, "exclusiveSize":4, "size":4}
2023-08-16 20:40:36 +01:00
]}
]}]'''
[cases.int_vector_empty]
skip = "Wrong results" # https://github.com/facebookexperimental/object-introspection/issues/258
param_types = ["const folly::sorted_vector_map<int, std::vector<int>>&"]
setup = "return {};"
expect_json = '[{"staticSize":24, "dynamicSize":0, "exclusiveSize":24, "length":0, "capacity":0, "elementStaticSize":32}]'
[cases.int_vector_some]
skip = "Wrong results" # https://github.com/facebookexperimental/object-introspection/issues/258
param_types = ["const folly::sorted_vector_map<int, std::vector<int>>&"]
setup = "return {{ {1,{2,3}}, {4,{5,6,7}} }};"
#expect_json = "TODO"