# 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&"] setup = "return {};" expect_json = '[{"staticSize":80, "dynamicSize":0, "length":0, "capacity":0, "elementStaticSize":4}]' expect_json_v2 = '[{"size":656, "staticSize":80, "exclusiveSize":656, "length":0, "capacity":128}]' [cases.int_some] param_types = ["const std::deque&"] setup = "return {{1,2,3}};" expect_json = '[{"staticSize":80, "dynamicSize":12, "length":3, "capacity":3, "elementStaticSize":4}]' expect_json_v2 = '[{"size":656, "staticSize":80, "exclusiveSize":644, "length":3, "capacity":128}]' [cases.deque_int_empty] param_types = ["const std::deque>&"] setup = "return {};" expect_json = '[{"staticSize":80, "dynamicSize":0, "length":0, "capacity":0, "elementStaticSize":80}]' expect_json_v2 = '[{"size":624, "staticSize":80, "exclusiveSize":624, "length":0, "capacity":6}]' [cases.deque_int_some] param_types = ["const std::deque>&"] setup = "return {{{1,2,3},{},{4,5}}};" expect_json = '''[{ "staticSize":80, "dynamicSize":260, "length":3, "capacity":3, "elementStaticSize":80, "members":[ {"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} ]}]'''