object-introspection/test/integration/std_deque.toml
2022-12-19 06:37:51 -08:00

31 lines
1.4 KiB
TOML

# 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}]'
[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}]'
[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}]'
[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":[
{"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}
]}]'''