2023-02-23 23:32:37 +00:00
|
|
|
includes = ["folly/sorted_vector_types.h"]
|
|
|
|
definitions = '''
|
|
|
|
using folly::sorted_vector_set;
|
|
|
|
'''
|
|
|
|
|
|
|
|
[cases]
|
|
|
|
[cases.no_ints]
|
|
|
|
param_types = ["const sorted_vector_set<int>&"]
|
|
|
|
setup = "return {};"
|
|
|
|
expect_json = '''[{
|
|
|
|
"staticSize":24,
|
|
|
|
"dynamicSize":0,
|
|
|
|
"length":0,
|
|
|
|
"capacity":0,
|
|
|
|
"elementStaticSize":4,
|
|
|
|
"members":[{
|
|
|
|
"staticSize": 24,
|
|
|
|
"dynamicSize": 0,
|
|
|
|
"length": 0,
|
|
|
|
"capacity": 0,
|
|
|
|
"elementStaticSize": 4
|
|
|
|
}]}]'''
|
2023-09-28 02:51:47 +01:00
|
|
|
expect_json_v2 = '''[{
|
|
|
|
"staticSize": 24,
|
|
|
|
"exclusiveSize": 24,
|
|
|
|
"length": 0,
|
|
|
|
"capacity": 0
|
|
|
|
}]'''
|
2023-02-23 23:32:37 +00:00
|
|
|
|
|
|
|
[cases.some_ints]
|
|
|
|
param_types = ["const sorted_vector_set<int>&"]
|
|
|
|
setup = '''
|
|
|
|
sorted_vector_set<int> is;
|
|
|
|
is.insert(1);
|
|
|
|
is.insert(3);
|
|
|
|
is.insert(2);
|
|
|
|
is.insert(3);
|
|
|
|
return is;
|
|
|
|
'''
|
|
|
|
expect_json = '''[{
|
|
|
|
"staticSize": 24,
|
|
|
|
"dynamicSize": 16,
|
2023-03-03 20:09:51 +00:00
|
|
|
"exclusiveSize": 0,
|
2023-02-23 23:32:37 +00:00
|
|
|
"length":3,
|
|
|
|
"capacity":4,
|
|
|
|
"elementStaticSize":4,
|
|
|
|
"members": [{
|
|
|
|
"staticSize": 24,
|
|
|
|
"dynamicSize": 16,
|
2023-03-03 20:09:51 +00:00
|
|
|
"exclusiveSize": 40,
|
2023-02-23 23:32:37 +00:00
|
|
|
"length": 3,
|
|
|
|
"capacity": 4,
|
|
|
|
"elementStaticSize": 4
|
|
|
|
}]}]
|
|
|
|
'''
|
2023-09-28 02:51:47 +01:00
|
|
|
expect_json_v2 = '''[{
|
|
|
|
"staticSize": 24,
|
|
|
|
"exclusiveSize": 28,
|
|
|
|
"length": 3,
|
|
|
|
"capacity": 4
|
|
|
|
}]'''
|