2022-12-19 14:37:51 +00:00
|
|
|
# TODO deque capacity: https://github.com/facebookexperimental/object-introspection/issues/637
|
|
|
|
# 8 times the object size on 64-bit libstdc++; 16 times the object size or 4096 bytes, whichever is larger, on 64-bit libc++
|
|
|
|
includes = ["deque"]
|
|
|
|
[cases]
|
|
|
|
[cases.int_empty]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/316
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::deque<int>&"]
|
|
|
|
setup = "return {};"
|
|
|
|
expect_json = '[{"staticSize":80, "dynamicSize":0, "length":0, "capacity":0, "elementStaticSize":4}]'
|
|
|
|
[cases.int_some]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/316
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::deque<int>&"]
|
|
|
|
setup = "return {{1,2,3}};"
|
|
|
|
expect_json = '[{"staticSize":80, "dynamicSize":12, "length":3, "capacity":3, "elementStaticSize":4}]'
|
|
|
|
[cases.deque_int_empty]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/316
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::deque<std::deque<int>>&"]
|
|
|
|
setup = "return {};"
|
|
|
|
expect_json = '[{"staticSize":80, "dynamicSize":0, "length":0, "capacity":0, "elementStaticSize":80}]'
|
|
|
|
[cases.deque_int_some]
|
2023-08-16 20:40:36 +01:00
|
|
|
oil_skip = 'not implemented for treebuilder v2' # https://github.com/facebookexperimental/object-introspection/issues/316
|
2022-12-19 14:37:51 +00:00
|
|
|
param_types = ["const std::deque<std::deque<int>>&"]
|
|
|
|
setup = "return {{{1,2,3},{},{4,5}}};"
|
|
|
|
expect_json = '''[{
|
|
|
|
"staticSize":80,
|
|
|
|
"dynamicSize":260,
|
|
|
|
"length":3,
|
|
|
|
"capacity":3,
|
|
|
|
"elementStaticSize":80,
|
|
|
|
"members":[
|
|
|
|
{"staticSize":80, "dynamicSize":12, "length":3, "capacity":3, "elementStaticSize":4},
|
|
|
|
{"staticSize":80, "dynamicSize":0, "length":0, "capacity":0, "elementStaticSize":4},
|
|
|
|
{"staticSize":80, "dynamicSize":8, "length":2, "capacity":2, "elementStaticSize":4}
|
|
|
|
]}]'''
|