2022-12-19 14:37:51 +00:00
|
|
|
includes = ["functional"]
|
|
|
|
[cases]
|
|
|
|
[cases.int]
|
|
|
|
param_types = ["const std::reference_wrapper<int>&"]
|
|
|
|
setup = "return std::ref(*new int(1));"
|
|
|
|
expect_json = '[{"staticSize":8, "dynamicSize":4, "length":1, "capacity":1, "elementStaticSize":4}]'
|
2024-01-09 15:49:37 +00:00
|
|
|
expect_json_v2 = '''[{
|
|
|
|
"size":12, "staticSize":8, "exclusiveSize":8, "length":1, "capacity":1, "members":[
|
|
|
|
{"size":4, "staticSize":4, "exclusiveSize":4, "members":[]}
|
|
|
|
]}]'''
|
2022-12-19 14:37:51 +00:00
|
|
|
[cases.vector]
|
|
|
|
param_types = ["const std::vector<std::reference_wrapper<int>>&"]
|
|
|
|
setup = "return {{std::ref(*new int(1)), std::ref(*new int(2)), std::ref(*new int(3))}};"
|
|
|
|
expect_json = '''[{
|
|
|
|
"staticSize":24,
|
|
|
|
"dynamicSize":36,
|
|
|
|
"length":3,
|
|
|
|
"capacity":3,
|
|
|
|
"elementStaticSize":8,
|
|
|
|
"members":[
|
|
|
|
{"staticSize":8, "dynamicSize":4, "length":1, "capacity":1, "elementStaticSize":4},
|
|
|
|
{"staticSize":8, "dynamicSize":4, "length":1, "capacity":1, "elementStaticSize":4},
|
|
|
|
{"staticSize":8, "dynamicSize":4, "length":1, "capacity":1, "elementStaticSize":4}
|
|
|
|
]}]'''
|
2024-01-09 15:49:37 +00:00
|
|
|
expect_json_v2 = '''[{
|
|
|
|
"size":60,
|
|
|
|
"staticSize":24,
|
|
|
|
"exclusiveSize":24,
|
|
|
|
"length":3,
|
|
|
|
"capacity":3,
|
|
|
|
"members":[
|
|
|
|
{"size":12, "staticSize":8, "exclusiveSize":8, "length":1, "capacity":1, "members":[
|
|
|
|
{"size":4, "staticSize":4, "exclusiveSize":4, "members":[]}
|
|
|
|
]},
|
|
|
|
{"size":12, "staticSize":8, "exclusiveSize":8, "length":1, "capacity":1, "members":[
|
|
|
|
{"size":4, "staticSize":4, "exclusiveSize":4, "members":[]}
|
|
|
|
]},
|
|
|
|
{"size":12, "staticSize":8, "exclusiveSize":8, "length":1, "capacity":1, "members":[
|
|
|
|
{"size":4, "staticSize":4, "exclusiveSize":4, "members":[]}
|
|
|
|
]}
|
|
|
|
]
|
|
|
|
}]'''
|