enable void smart pointer present tests

these tests were skipped as they can't record the dynamic size. however,
there isn't a dynamic size to report as the type of the pointer is void.
accept a dynamic size of 0 as it's the best we can do with no type
knowledge.
This commit is contained in:
Jake Hillion 2022-12-28 12:21:49 +00:00 committed by Jake Hillion
parent 358b4e9505
commit a6c3d30014

View File

@ -80,14 +80,13 @@ definitions = '''
] ]
''' '''
[cases.unique_ptr_void_present] [cases.unique_ptr_void_present]
skip = "we don't report the dynamic size"
param_types = ["std::unique_ptr<void, decltype(&void_int_deleter)>&"] param_types = ["std::unique_ptr<void, decltype(&void_int_deleter)>&"]
setup = "return {std::unique_ptr<void, decltype(&void_int_deleter)>(new int, &void_int_deleter)};" setup = "return {std::unique_ptr<void, decltype(&void_int_deleter)>(new int, &void_int_deleter)};"
expect_json = ''' expect_json = '''
[ [
{ {
"staticSize": 16, "staticSize": 16,
"dynamicSize": 8 "dynamicSize": 0
} }
] ]
''' '''
@ -165,14 +164,13 @@ definitions = '''
] ]
''' '''
[cases.shared_ptr_void_present] [cases.shared_ptr_void_present]
skip = "we don't report the dynamic size"
param_types = ["std::shared_ptr<void>&"] param_types = ["std::shared_ptr<void>&"]
setup = "return {std::shared_ptr<void>(new int)};" setup = "return {std::shared_ptr<void>(new int)};"
expect_json = ''' expect_json = '''
[ [
{ {
"staticSize": 16, "staticSize": 16,
"dynamicSize": 8 "dynamicSize": 0
} }
] ]
''' '''