提交 32c0af4c 编写于 作者: K Kenan Yao

Fix bug of automatic generation of optional_assignment() call for functions to

be mocked. Previously, only the last parameter of the mocked function can be
assigned a value by unit test.
上级 cd49bc06
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册