diff --git a/src/test/unit/mock/mocker.py b/src/test/unit/mock/mocker.py index 0cfab84ff77c0914d976bcc9b77ffee6a04e6ecb..4d947b60ae4facee85ee63a460c7b6da104acef6 100755 --- a/src/test/unit/mock/mocker.py +++ b/src/test/unit/mock/mocker.py @@ -250,7 +250,10 @@ class FuncSignature(object): continue elif not self.is_pointer_type(arg[0]): continue + argtype = arg[0] + argname = arg[1] ref = '&' if special.ByValStructs.has(argtype) else '' + argname = subscript.sub('', argname) buf.append('\toptional_assignment({ref}{arg});'.format(ref=ref, arg=argname)) # Currently, local function doesn't check arguments.