object-introspection/test/integration/std_deque.toml

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

45 lines
2.2 KiB
TOML
Raw Normal View History

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]
param_types = ["const std::deque<int>&"]
setup = "return {};"
expect_json = '[{"staticSize":80, "dynamicSize":0, "length":0, "capacity":0, "elementStaticSize":4}]'
2024-01-23 16:44:01 +00:00
expect_json_v2 = '[{"size":656, "staticSize":80, "exclusiveSize":656, "length":0, "capacity":128}]'
2022-12-19 14:37:51 +00:00
[cases.int_some]
param_types = ["const std::deque<int>&"]
setup = "return {{1,2,3}};"
expect_json = '[{"staticSize":80, "dynamicSize":12, "length":3, "capacity":3, "elementStaticSize":4}]'
2024-01-23 16:44:01 +00:00
expect_json_v2 = '[{"size":656, "staticSize":80, "exclusiveSize":644, "length":3, "capacity":128}]'
2022-12-19 14:37:51 +00:00
[cases.deque_int_empty]
param_types = ["const std::deque<std::deque<int>>&"]
setup = "return {};"
expect_json = '[{"staticSize":80, "dynamicSize":0, "length":0, "capacity":0, "elementStaticSize":80}]'
2024-01-23 16:44:01 +00:00
expect_json_v2 = '[{"size":624, "staticSize":80, "exclusiveSize":624, "length":0, "capacity":6}]'
2022-12-19 14:37:51 +00:00
[cases.deque_int_some]
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":[
2024-01-23 16:44:01 +00:00
{"size":0, "staticSize":80, "dynamicSize":12, "length":3, "capacity":3, "elementStaticSize":4},
{"size":0, "staticSize":80, "dynamicSize":0, "length":0, "capacity":0, "elementStaticSize":4},
{"size":0, "staticSize":80, "dynamicSize":8, "length":2, "capacity":2, "elementStaticSize":4}
]}]'''
expect_json_v2 = '''[{
"size":2352,
"staticSize":80,
"exclusiveSize":384,
"length":3,
"capacity":6,
"members":[
{"size":656, "staticSize":80, "exclusiveSize":644, "length":3, "capacity":128},
{"size":656, "staticSize":80, "exclusiveSize":656, "length":0, "capacity":128},
{"size":656, "staticSize":80, "exclusiveSize":648, "length":2, "capacity":128}
2022-12-19 14:37:51 +00:00
]}]'''